1 // PR c++/86429 2 // { dg-do compile { target c++14 } } 3 4 struct A 5 { 6 int i; fA7 constexpr int f(const int&) const { return i; } 8 }; 9 g()10 void g() 11 { 12 constexpr A a = { 42 }; 13 [&](auto x) { 14 constexpr auto y = a.f(x); 15 }(24); 16 } 17