c++, coroutines: Simplify separation of the user function body and ramp.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / lambda-init11.C
blob4d434cd9ca08913fc19bc9e5b3687f89ebe079b5
1 // PR c++/61402
2 // { dg-do run { target c++14 } }
4 extern "C" void abort();
6 template<typename T>
7 void foo(T t) {
8   auto test = [ i = ++t ](T v) {
9     if (i != v)
10       abort();
11   };
12   test(t);
15 int main(){
16   foo(3.14f);
17   foo(0);
18   foo('a');