// { dg-do compile } // Origin: // c++/8266: Explicit instantiation of a template outside its namespace is // broken namespace N { template T foo (T) { return T (); } struct A { template struct B {}; }; template struct C {}; template double foo(double); template float foo(float); template struct A::B<0>; template struct C<0>; } template int N::foo(int); template char N::foo(char); template struct N::A::B<1>; template struct N::C<1>;