summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/memtemp16.C
blob: c5597eab737f98a142311abc445f24dffeae96db (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 U>
struct S {
  template <class T>
  void operator+(T);
};

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


int main()
{
  S<int> s;
  s + 3;
  s + s;
  s.operator+("Hi");

  S<S<int> > s2;
  s2 + 3;
  s2 + s;
  s2.operator+("Hi");
}