MCPcopy Create free account
hub / github.com/boostorg/cobalt / stackful_generator

Function stackful_generator

test/experimental/context.cpp:63–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63int stackful_generator(experimental::context<generator<int>> c)
64{
65 static_assert(experimental::detail::has_await_transform<decltype(c)::promise_type>);
66 BOOST_CHECK(c.await(this_coro::executor) == c.promise().get_executor());
67
68 c.yield(1);
69 c.yield(2);
70 c.yield(3);
71 c.yield(4);
72
73 return 5;
74}
75
76CO_TEST_CASE(generator_)
77{

Callers

nothing calls this directly

Calls 4

awaitMethod · 0.80
yieldMethod · 0.80
get_executorMethod · 0.45
promiseMethod · 0.45

Tested by

no test coverage detected