// PR c++/81525 // { dg-do run { target c++14 } } template struct A { constexpr operator int () const { return i; } }; template constexpr A a = {}; template void foo (F f) { f (42); } template void bar (T) { constexpr auto N = a<1>; auto f = [&] (auto i) { if (static_cast(N) != 1) __builtin_abort(); }; foo (f); } int main () { bar (0); }