c++, coroutines: Simplify separation of the user function body and ramp.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / lambda-generic-const9.C
blob491c7c322c3e73890a5ca5a2ade0debc936bbc16
1 // PR c++/86429
2 // { dg-do compile { target c++14 } }
4 struct A
6   int i;
7   constexpr int f(const int&) const { return i; }
8 };
10 void g()
12   constexpr A a = { 42 };
13   [&](auto x) {
14     constexpr auto y = a.f(x);
15   }(24);