aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/nested1.C
blob: 3df7c47abb6f10093557500cdce9fc75e6f2d867 (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
45
46
47
// Build don't link:

template <class T1,class T2>
struct X
{
  T1 a;

  struct Y
  {
    T2 x;
    Y (T2 _x) { x=_x; }
  };

};

template <class T1>
struct X<T1,int>
{
  T1 a;

  struct Y
  {
    int x;
    Y (int _x) { x=_x; }
  };

};

template <>
struct X<int,int>
{
  int a;

  struct Y
  {
    int x;
    Y (int _x) { x=_x; }
  };

};

void f ()
{
  X<char,char> t1;
  X<char,int> t2; 
  X<int,int> t3;  
}