2 // Templates defined outside must be declared inside
5 // trick it to provide some prior declaration
8 template<class T>class X; // { dg-message "note: previous declaration" }
13 bar::foo(T const &a) // { dg-error "" "" { xfail *-*-* } } not declared in bar -
18 template<> void bar::foo<int>() // { dg-error "different namespace" "" { target c++98_only } }
22 template<class T,class U>
23 class bar::X{}; // { dg-error "redeclared with 2 template parameter" }