| 217 | |
| 218 | template <typename CompletionToken> |
| 219 | decltype(auto) async_std_error_code(CompletionToken&& token) |
| 220 | { |
| 221 | using signature_type = void(std::error_code); |
| 222 | return asio_impl::async_initiate<CompletionToken, signature_type>( |
| 223 | [](auto&& h) |
| 224 | { std::invoke(std::forward<decltype(h)>(h), make_error_code(std::errc::not_enough_memory)); }, |
| 225 | token); |
| 226 | } |
| 227 | |
| 228 | TEST_CASE("Standard error codes are transformed into a std::system_error " |
| 229 | "(note that in the case of standalone Asio the error code native to that " |