2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / memtemp16.C
blobc5597eab737f98a142311abc445f24dffeae96db
1 // { dg-do link  }
2 // GROUPS passed templates membertemplates
3 extern "C" int printf(const char*, ...);
5 template <class U>
6 struct S {
7   template <class T>
8   void operator+(T);
9 };
11 template <class U>
12 template <class T>
13 void S<U>::operator+(T)
15   printf("Hello, world.\n");
19 int main()
21   S<int> s;
22   s + 3;
23   s + s;
24   s.operator+("Hi");
26   S<S<int> > s2;
27   s2 + 3;
28   s2 + s;
29   s2.operator+("Hi");