summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/memtemp5.C
blob: faff68714c091a552949b98e6383aeb478239e12 (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
// { dg-do link  }
// GROUPS passed templates membertemplates
extern "C" int printf(const char*, ...);

struct S {
  template <class T>
  void operator+(T);
};


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



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