Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.pt/memtemp3.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 foo(T);
8 };
9
10
11 template <class T>
12 void S::foo(T)
13 {
14 printf("Hello, world.\n");
15 }
16
17
18
19 int main()
20 {
21 S s;
22 s.foo(3);
23 s.foo(s);
24 }