1//PR c++/27329 2 3template<int> struct A // { dg-message "forward declaration" } 4! // { dg-error "expected unqualified-id" } 5 ; 6 7template<int> struct A { int foo(); }; // { dg-error "not a template" } 8 9int i = A<0>().foo(); // { dg-error "not a template|invalid use" } 10 11 12template<int> struct B 13! // { dg-error "expected unqualified-id" } 14 ; 15 16template<int> struct B { static int bar(); }; // { dg-error "not a template" } 17 18int j = B<0>::bar(); // { dg-error "not a template|incomplete type" } 19 20