145
|
1 // PR c++/67427
|
|
2 // { dg-do compile { target c++2a } }
|
|
3 // { dg-additional-options "-fconcepts-ts" }
|
|
4
|
|
5 template <bool... Values> struct and_c_impl {
|
|
6 static constexpr bool value = true;
|
|
7 };
|
|
8
|
|
9 template <bool ValueFirst, bool... ValuesRest>
|
|
10 struct and_c_impl<ValueFirst, ValuesRest...> {
|
|
11 static constexpr bool value = ValueFirst && and_c_impl<ValuesRest...>::value;
|
|
12 };
|
|
13
|
|
14 template <bool... Values> constexpr bool and_c() {
|
|
15 return and_c_impl<Values...>::value;
|
|
16 }
|
|
17
|
|
18 template<class T> concept bool C() {
|
|
19 return true;
|
|
20 }
|
|
21
|
|
22 template<class... Tx>
|
|
23 struct A {
|
|
24 A() requires and_c<C<Tx>()...>() = default;
|
|
25 };
|
|
26
|
|
27 int main() {
|
|
28 A<int, double> a;
|
|
29 return 0;
|
|
30 }
|