// PR c++/92654 // { dg-do compile { target c++17 } } struct A { constexpr operator int () { return 42; } }; template struct C { static const bool ap = I; }; template void am() { [](auto an) { if constexpr (C::ap) ; }(A{}); } void fn() { am<42>(); }