Created
April 25, 2018 16:32
-
-
Save loliGothicK/8258162340ccb4c64581e726466f1c33 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
template < class T > | |
struct X | |
{ | |
X( T t ) { } | |
}; | |
int main() | |
{ | |
X x1(0); // X<int>. | |
X x2(0.0); // X<double>. | |
X x3("hello"); // X<char const *>. | |
X x4 = 0; // X<int>. Same as x1. | |
X x5 = 0.0; // X<double>. Same as x2. | |
X x6 = "hello"; // X<char const *>. Same as x3. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment