Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.pt/memtemp5.C

raw
1 // { dg-do link }
2 // GROUPS passed templates membertemplates
3 extern "C" int printf(const char*, ...);
4
5 struct S {
6 template <class T>
7 void operator+(T);
8 };
9
10
11 template <class T>
12 void S::operator+(T)
13 {
14 printf("Hello, world.\n");
15 }
16
17
18
19 int main()
20 {
21 S s;
22 s + 3;
23 s + s;
24 s.operator+("Hi");
25 }