// { dg-do run} // { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } template concept bool D() { return __is_empty(T); } struct X { } x; struct Y { int n; } y; int called = 0; // Test constrained member definitions template struct S1 { void f1() requires C() { } void g1() requires C() and true; template void h1(U u) { called = 1; } void g2() requires C(); // { dg-error "candidate" } }; template void S1::g2() requires D() { } // { dg-error "prototype" } int main() { S1 sx; S1 sy; S1 si; si.f1(); // { dg-error "matching" } si.g1(); // { dg-error "matching" } si.h1(0); // { dg-error "matching" } }