1 2 3 4 5 6 7 | template< typename > class t {}; template<> struct t< int > { int a; } r; int main() { r; } |
dGVtcGxhdGU8IHR5cGVuYW1lID4gY2xhc3MgdCB7fTsKCnRlbXBsYXRlPD4gc3RydWN0IHQ8IGludCA+IHsgaW50IGE7IH0gcjsKCmludCBtYWluKCkgewoJcjsKfQ==
prog.cpp:3: warning: unused variable ‘r’ prog.cpp: In function ‘int main()’: prog.cpp:6: error: ‘r’ was not declared in this scope
-
result: Compilation error (maybe you wish to see an example for C++ 4.7.2)


