aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/partial1.C
blob: 1f9ae551ba2e3c15e2d529ae5e7a73829723b71b (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
// { dg-do run  }
template<class T_type, int N>
class foo {
public:
  enum bar { z = 0 };
};

template<int N>
class foo<double, N> {
public:
  enum bar { z = 1 };
};

template<class T_type>
class foo<T_type, 2> {
public:
  enum bar { z = 2 };
};

int main()
{
    if ((foo<int,3>::z == 0) && (foo<double,3>::z == 1) 
       && (foo<float,2>::z == 2))
           return 0;
    else
        return 1;
}