| 109 | } |
| 110 | |
| 111 | boost::asio::experimental::coro<int(int)> throwing_stacked( |
| 112 | boost::asio::any_io_executor exec, int &val, |
| 113 | bool &destroyed_inner, bool &destroyed) |
| 114 | { |
| 115 | BOOST_ASIO_CHECK((co_await boost::asio::this_coro::throw_if_cancelled())); |
| 116 | |
| 117 | on_scope_exit x = [&]() noexcept { destroyed = true; }; |
| 118 | (void)x; |
| 119 | |
| 120 | auto gen = throwing_generator(exec, val, destroyed_inner); |
| 121 | while (auto next = co_await gen) // 1, 2, 4, 8, ... |
| 122 | BOOST_ASIO_CHECK(42 ==(co_yield *next)); // offset is delayed by one cycle |
| 123 | } |
| 124 | |
| 125 | boost::asio::awaitable<void> throwing_generator_stacked_test() |
| 126 | { |
no test coverage detected