aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts4.C
blob: 5f08ae383ed8ead51c330a32cce98a2e6c076746 (plain)
1
2
3
4
5
6
7
8
9
10
// { dg-do compile { target c++20 } }

template <class T> struct A { static const int x = 42; };

template <class Ta> concept A42 = A<Ta>::x == 42;
template <class Tv> concept Void = __is_same_as(Tv, void);
template <class Tb, class Ub> concept A42b = Void<Tb> || A42<Ub>;
template <class Tc> concept R42c = A42b<Tc, Tc&>;

static_assert (R42c<void>);