#include <type_traits>
#include <memory>
#include <boost/asio/async_result.hpp>
+#include <boost/asio/post.hpp>
#include <boost/system/error_code.hpp>
#include <tuple>
errored = true;
#endif
auto & h = init.completion_handler;
- ios.post(
- [h, ec]() mutable
- {
- h(boost::system::error_code(ec.value(), boost::system::system_category()), -1);
- });
+ boost::asio::post(
+ ios.get_executor(),
+ [h, ec]() mutable
+ {
+ h(boost::system::error_code(ec.value(), boost::system::system_category()), -1);
+ });
}
BOOST_ASIO_INITFN_RESULT_TYPE(ExitHandler, void (boost::system::error_code, int))
{
#if defined(BOOST_POSIX_API)
if (errored)
- return [](int exit_code, const std::error_code & ec){};
+ return [](int , const std::error_code &){};
#endif
auto & h = init.completion_handler;
return [h](int exit_code, const std::error_code & ec) mutable