aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/memtemp5.C
blob: 14647a3056036b3b1846ee31c34a4bf90ccfb1e4 (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
// Build don't run:
// 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");
}