summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/memtemp14.C
blob: 015aa25dcd16a85a829293ad6453c0fc9a93a639 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// { dg-do link  }
// GROUPS passed templates membertemplates
extern "C" int printf (const char *, ...);

template <class T>
struct S
{
  template <class U, class V>
  void foo(U, V);
};


template <class T>
template <class U, class V>
void S<T>::foo(U, V)
{
  printf("Hello, world.\n");
}


int main()
{
  S<int> s;
  s.foo(3, 3);
  s.foo("hello", s);

  S<char*> s2;
  s2.foo(3, 3);
  s2.foo("hello", s);
}