Created
November 30, 2023 22:41
-
-
Save srele96/18da760cad7fd3bba881b64279be624e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct foo { | |
template <typename T> | |
foo(T p_object) { | |
p_object.process("hello"); | |
} | |
}; | |
struct bar { | |
void process(const std::string& p_value) { std::cout << p_value << "\n"; } | |
}; | |
struct baz {}; | |
foo f{bar{}}; | |
foo b{baz{}}; // Fails at compile time. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment