gcc/testsuite/g++.dg/cpp0x/decltype62.C
raw| 1 | // PR c++/64398 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | template<typename T> struct template1; |
| 5 | |
| 6 | template<typename T, typename> // second param required |
| 7 | struct struct1{ |
| 8 | using type1 = decltype(T::x); |
| 9 | using type2 = template1<type1>; |
| 10 | }; |
| 11 | |
| 12 | template<typename T> using alias1 = template1<decltype(T::x)>; |
| 13 | |
| 14 | // just for instantiation: |
| 15 | template<typename T> using alias2 = alias1<T>; |