// PR c++/99501 // { dg-do compile { target c++20 } } template struct X; template requires requires{V.a;} struct X; template requires requires{V.b;} struct X; template requires requires{V.a;} struct X { static const bool v = false; }; template requires requires{V.b;} struct X { static const bool v = true; }; struct A { int a; }; static_assert(!X::v); struct B { int b; }; static_assert(X::v);