| 1 |
// PR c++/91911 |
| 2 |
// { dg-do compile { target c++17 } } |
| 3 |
// A variant of class-deduction101.C where SpanType has more levels than |
| 4 |
// ConstSpanType. |
| 5 |
|
| 6 |
template<class T> |
| 7 |
struct span { |
| 8 |
using value_type = T; |
| 9 |
span(T); |
| 10 |
}; |
| 11 |
|
| 12 |
template<class> |
| 13 |
struct A { |
| 14 |
template<class T> |
| 15 |
using SpanType = decltype(span{T()}); |
| 16 |
}; |
| 17 |
|
| 18 |
template<class T> |
| 19 |
using ConstSpanType = span<const typename A<int>::SpanType<const T>::value_type>; |
| 20 |
|
| 21 |
using type = ConstSpanType<int>; |
| 22 |
using type = span<const int>; |