Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/concepts-requires26.C

raw
1 // PR c++/101181
2 // { dg-do compile { target c++20 } }
3
4 template<class T,
5 bool = requires { typename T::type; }>
6 struct p { using type = void; };
7
8 template<class T>
9 struct p<T, true> { using type = typename T::type; };
10
11 template<class T> using P = typename p<T>::type;
12
13 using type1 = P<int>;
14 using type1 = void;
15
16 struct A { using type = char; };
17 using type2 = P<A>;
18 using type2 = char;