mirror of
https://github.com/boostorg/asio.git
synced 2026-01-28 06:42:08 +00:00
The prepend completion token adapter can be used to pass additional
before the existing completion handler arguments. For example:
timer.async_wait(
boost::asio::experimental::prepend(
[](int i, std::error_code ec)
{
// ...
},
42)
);
std::future<std::tuple<int, std::error_code>> f = timer.async_wait(
boost::asio::experimental::prepend(
boost::asio::use_future,
42
)
);