]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/g++.old-deja/g++.ns/template13.C
re PR c++/16224 (internal compiler error: in write_unscoped_name (template/namespace))
[gcc.git] / gcc / testsuite / g++.old-deja / g++.ns / template13.C
1 // { dg-do assemble { xfail *-*-* } }
2 // Templates defined outside must be declared inside
3 namespace bar
4 {
5 // trick it to provide some prior declaration
6 template<class T>
7 void foo(); // { dg-error "definition" }
8 template<class T>class X; // { dg-error "" } previous declaration
9 }
10
11 template <typename T>
12 T const
13 bar::foo(T const &a)
14 { // { dg-error "" "" { xfail *-*-* } } not declared in bar -
15 return a;
16 }
17
18 template<> void bar::foo<int>()
19 { // { dg-error "" }
20 }
21
22 template<class T,class U>
23 class bar::X{}; // { dg-error "" } does not match declaration
This page took 0.040232 seconds and 5 git commands to generate.