1 // PR c++/92654 2 // { dg-do compile { target c++17 } } 3 4 struct A { 5 constexpr operator int () { return 42; } 6 }; 7 template <int I> struct C { 8 static const bool ap = I; 9 }; 10 template <auto I> am()11void am() { 12 [](auto an) 13 { 14 if constexpr (C<an>::ap) ; 15 }(A{}); 16 } fn()17void fn() { am<42>(); } 18