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

template<bool> struct A;

template<class... Ts>
using wrap = A<1 != (0 + ... + requires { Ts(); })>;

template<class... Ts> using type = wrap<Ts...>;

using ty0 = type<>;
using ty0 = A<true>;

using ty1 = type<int>;
using ty1 = A<false>;

using ty2 = type<int, int>;
using ty2 = A<true>;