// { dg-do compile { target c++20 } } // A poor mans Integral concept. template concept Integral = __is_same_as(T, int); template concept Nonnegative = N >= 0; template concept UnaryPack = (sizeof...(Args) == 1); template requires Integral // { dg-error "non-pack parameter" } void f1(); template requires Integral... // { dg-error "parameter packs not expanded|expected unqualified-id" } void f2(); template requires (Integral && ...) void f3() { } template void f4() { } // FIXME: This syntax is likely to be made invalid. template // { dg-error "does not constrain a type" } void f5() { } template // requires UnaryPack void f6() { } template // requires (... && UnaryPack) void f7() { } void driver() { f1(); // { dg-error "" } f3(); f3(); // { dg-error "" } f4(); f4(); // { dg-error "" } f7(); f7(); }