// PR c++/122494 // { dg-do compile { target c++20 } } template concept C = false; template requires (!C) struct A { static constexpr unsigned v = 0; }; template struct B { static constexpr unsigned v = A::v; constexpr static bool f() { return [](auto) { if (v == 0) { } return true; }(0); } }; static_assert(B::f());