aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-requires26.C
blob: 824d23431f0e38e8da632b16b02877ff63622034 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/101181
// { dg-do compile { target c++20 } }

template<class T,
	 bool = requires { typename T::type; }>
struct p { using type = void; };

template<class T>
struct p<T, true> { using type = typename T::type; };

template<class T> using P = typename p<T>::type;

using type1 = P<int>;
using type1 = void;

struct A { using type = char; };
using type2 = P<A>;
using type2 = char;