3 // template parm in a class
7 // boiler-plate for tests of codegen
8 #define USE_AWAIT_TRANSFORM
9 #include "../coro1-ret-int-yield-int.h"
15 auto get_lam (int parm)
18 auto l = [=](T y) -> coro1
21 co_return co_await x + y + local;
30 auto ll = inst.get_lam (10);
32 PRINT ("main: create coro1");
33 int arg = 17; // avoid a dangling reference
39 PRINT ("main: after resume (initial suspend)");
42 PRINT ("main: after resume (co_await)");
44 /* Now we should have the co_returned value. */
45 int y = x.handle.promise().get_value();
48 PRINTF ("main: wrong result (%d).", y);
54 PRINT ("main: apparently not done...");
57 PRINT ("main: returning");