Created
November 22, 2017 07:21
-
-
Save habfast/73cb0e2b288fdb35c43248b45caa3bc0 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
#include <cstdio> | |
template<int n> struct confusing | |
{ | |
static int q; | |
}; | |
template<> struct confusing<1> | |
{ | |
template<int n> | |
struct q | |
{ | |
q(int x) | |
{ | |
printf("Separated syntax and semantics.\n"); | |
} | |
operator int () { return 0; } | |
}; | |
}; | |
char x; | |
int main() | |
{ | |
int x = confusing<sizeof(x)>::q < 3 > (2); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment