1 // { dg-options "-std=c++17 -fconcepts" }
3 template<typename... Ts> struct are_same;
7 static constexpr bool value = true;
12 static constexpr bool value = true;
15 template<typename T, typename U, typename... Ts>
16 struct are_same<T, U, Ts...> {
17 static constexpr bool value =
18 __is_same_as(T, U) && are_same<U, Ts...>::value;
21 constexpr bool all_of() { return true; }
22 constexpr bool all_of(bool b) { return b; }
24 template<typename... Ts>
25 constexpr bool all_of(bool a, bool b, Ts... args) {
26 return (a && b) && all_of(b, args...);
29 template<typename... Ts>
30 concept bool C1 = are_same<Ts...>::value;
33 concept bool C2 = all_of(Bs...);
35 template<C1... Ts> struct S1 { };
36 template<C1...> struct S2 { };
37 template<C2... Bs> struct S4 { };
38 template<C2...> struct S5 { };
41 S4<true, true, true> s4;