c++: prvalue of array type [PR111286]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / alias-decl-75a.C
blob8adbd6f65ac163a2095e06cc370c494a0bd5046b
1 // PR c++/90679
2 // A version of alias-decl-75.C where the specializations of the
3 // complex alias template first_t are dependent.
4 // { dg-do compile { target c++11 } }
6 template<class T, class...>
7 using first_t = T;
9 template<class T>
10 struct A;
12 template<class T>
13 struct traits;
15 template<class T>
16 struct traits<A<first_t<T, T&>>> {
17   static constexpr int value = 1;
20 template<class T>
21 struct traits<A<first_t<const T, T&>>> {
22   static constexpr int value = 2;
25 static_assert(traits<A<int>>::value == 1, "");
26 static_assert(traits<A<const int>>::value == 2, ""); // { dg-bogus "ambiguous" }