gcc/testsuite/g++.dg/cpp1z/class-deduction101.C
raw| 1 | // PR c++/91911 |
| 2 | // { dg-do compile { target c++17 } } |
| 3 | |
| 4 | template<class T> |
| 5 | struct span { |
| 6 | using value_type = T; |
| 7 | span(T); |
| 8 | }; |
| 9 | |
| 10 | template<class T> |
| 11 | using SpanType = decltype(span{T()}); |
| 12 | |
| 13 | template<class T> |
| 14 | using ConstSpanType = span<const typename SpanType<T>::value_type>; |
| 15 | |
| 16 | using type = ConstSpanType<int>; |
| 17 | using type = span<const int>; |