// PR c++/103198 // { dg-do compile { target c++20 } } template struct A { T val; template requires requires { val.x; } void f(U); static void g(int) requires requires { val.x; }; void h(int) requires requires { val.x; }; }; struct B { int x; }; struct C { }; int main() { A().f(0); A().g(0); A().h(0); A().f(0); // { dg-error "no match" } A().g(0); // { dg-error "no match" } A().h(0); // { dg-error "no match" } }