| 45 | using namespace std::chrono_literals; |
| 46 | |
| 47 | inline auto error_code_remapper() { |
| 48 | return [](auto&& promise, asio::error_code e, auto&&... args) { |
| 49 | if (e) { |
| 50 | #if defined(CONTINUABLE_HAS_EXCEPTIONS) |
| 51 | promise.set_exception(std::make_exception_ptr(e)); |
| 52 | #else |
| 53 | promise.set_exception(cti::exception_t(e.value(), e.category())); |
| 54 | #endif |
| 55 | } else { |
| 56 | promise.set_value(std::forward<decltype(args)>(args)...); |
| 57 | } |
| 58 | }; |
| 59 | } |
| 60 | |
| 61 | struct functional_io_service { |
| 62 | asio::io_context service_; |
no test coverage detected