Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/class-deduction101b.C

raw
1 // PR c++/91911
2 // { dg-do compile { target c++17 } }
3 // A variant of class-deduction101.C where SpanType has fewer 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 T>
13 using SpanType = decltype(span{T()});
14
15 template<class>
16 struct B {
17 template<class T>
18 using ConstSpanType = span<const typename SpanType<T>::value_type>;
19 };
20
21 using type = B<int>::ConstSpanType<int>;
22 using type = span<const int>;