Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.old-deja / g++.ns / template5.C
blob8338fef10d7b82c0101ade297cac0259dd2da2ed
1 // { dg-do run  }
2 //Check whether namespace-scoped template instantiations
3 //are mangled differently.
5 namespace X{
6   template<class T>
7   struct Y{
8    int f(T){
9      return 1;
10    }
11    template<class X>void g(){}
12   };
15 template<class T>
16 struct Y{
17   int f(T){
18     return 2;
19   }
22 int main()
24   X::Y<int> z;
25   if (z.f(4) != 1)
26     return 1;
27   z.g<long>();
29   Y<int> z1;
30   if (z1.f(5) != 2)
31     return 1;
32   return 0;