Debian Codegraph @

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

raw
1 // { dg-do run }
2 template <class T>
3 void f(T t);
4
5 template <class T>
6 void f(T* t);
7
8 template <>
9 void f(int* ip) {}
10
11 struct S1
12 {
13 template <class T>
14 void f(T t);
15
16 template <class T>
17 void f(T* t);
18 };
19
20 template <>
21 void S1::f(int* ip) {}
22
23 template <class U>
24 struct S2
25 {
26 template <class T>
27 void f(T t);
28
29 template <class T>
30 void f(T* t);
31 };
32
33 template <>
34 template <>
35 void S2<double>::f(int* ip) {}
36
37 int main()
38 {
39 int* ip;
40 S1 s1;
41 s1.f(ip);
42 S2<double> s2;
43 s2.f(ip);
44 }