summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/enum5.C
blob: c4ceebed71ef57e979c1ae91a5f7b3c9be210cc7 (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-options "-std=c++0x" }

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;