// { dg-do compile { target c++20 } } template struct are_same; template<> struct are_same<> { static constexpr bool value = true; }; template struct are_same { static constexpr bool value = true; }; template struct are_same { static constexpr bool value = __is_same_as(T, U) && are_same::value; }; template concept Same = are_same::value; template concept Int = __is_same_as(T, int); // NOTE: The use of Same is misleading; it constraints each T, not // the pack of Ts. template struct S1 { }; // requires (C && ...) S1 s1; S1 s2; // // NOTE: The use of Same is misleading; it constraints each deduced // // type, not the pack of Ts. template struct S2 { }; // requires (C && ...) with each X deduced S2 s3; S2 s4; // OK template struct S3 { }; // requires (C && ...) S3 x0; // { dg-error "template constraint failure" } template struct S4 { }; // requires (C && ...) with each X deduced S4<0, 1, 2, 'a'> x1; // { dg-error "placeholder constraints not satisfied" }