2 // { dg-options "-std=c++17 -fconcepts" }
6 concept bool C() { return __is_class(T); }
9 concept bool D() { return __is_empty(T); }
12 struct Y { int n; } y;
16 // Test constrained member definitions
18 struct S1 { // { dg-message "defined here" }
19 void f1() requires C<T>() { }
20 void g1() requires C<T>() and true;
21 template<C U> void h1(U u) { called = 1; }
23 void g2() requires C<T>(); // { dg-message "candidate" }
27 void S1<T>::g2() requires D<T>() { } // { dg-error "no declaration matches" }
34 si.f1(); // { dg-error "matching" }
35 si.g1(); // { dg-error "matching" }
36 si.h1(0); // { dg-error "matching" }