1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
// Special g++ Options: // execution test - XFAIL *-*-* // excess errors test - XFAIL *-*-* int i = 0; template <class T> struct S { struct X {}; }; template <class T> void f(T) { S<T>::X(); } template <> struct S<int> { static void X() { i = 1; } }; int main() { f(3); if (i != 1) return 1; else return 0; }