1 // PR c++/84421 2 // { dg-do compile { target c++17 } } 3 4 struct A{ 5 constexpr operator bool() const { return true; } 6 }; 7 main()8 int main(){ 9 auto f = [](auto v){ 10 if constexpr(v){} 11 }; 12 A a; 13 f(a); 14 } 15