aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/spec13.C
blob: b72794acd25db43aaaf666afb81a3455dfbb5c1b (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// { dg-do run  }
template <class T>
void f(T t);

template <class T>
void f(T* t);

template <>
void f(int* ip) {}

struct S1
{
  template <class T>
  void f(T t);

  template <class T>
  void f(T* t);
};

template <>
void S1::f(int* ip) {}

template <class U>
struct S2
{
  template <class T>
  void f(T t);

  template <class T>
  void f(T* t);
};

template <>
template <>
void S2<double>::f(int* ip) {}

int main()
{
  int* ip;
  S1 s1;
  s1.f(ip);
  S2<double> s2;
  s2.f(ip);
}