Skip to content

Instantly share code, notes, and snippets.

@andrey-malets
Created August 11, 2015 16:05
Show Gist options
  • Save andrey-malets/4a0708bedd8378107cbb to your computer and use it in GitHub Desktop.
Save andrey-malets/4a0708bedd8378107cbb to your computer and use it in GitHub Desktop.
template<typename> struct T {
};
template<typename T> struct S {
};
template<typename X> struct S<T<X>> {
static const int value = 1;
};
template<> struct S<int> {
static const int value = 2;
};
int main(void) {
return S<T<int>>::value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment