aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/enum5.C
blob: f896440fe1ecfdaae1d47ecba923a745ad870e31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/40639
// { dg-do compile { target c++11 } }

template< typename T >
struct wrap {
   enum E : T { val };
};

template< typename T >
struct dependant {
   enum E : typename T::type { val };
};

template<typename T>
struct identity {
   typedef T type;
};

wrap<int> x;
dependant<identity<int>> y;