Daily bump.
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.ns / template13.C
blob722666ffe4ab7b3624e5783bbe49b5f0ec50a32a
1 // Build don't link:
2 // Templates defined outside must be declared inside
3 // crash test - XFAIL *-*-*
4 namespace bar
6   template<class T>
7   void foo(); // trick it to provide some prior declaration
8   template<class T>class X; // ERROR - previous declaration
11 template <typename T>
12 T const
13 bar::foo(T const &a)    
14 {                        // ERROR - not declared in bar - XFAIL *-*-*
15   return a;
18 template<> void bar::foo<int>()
19 {                        // ERROR - not declared in bar - XFAIL *-*-*
22 template<class T,class U>
23 class bar::X{};         // ERROR - does not match declaration