the initiating function returns a std::future
templated on result_type.
In the above example, this is std::size_t.
If the asynchronous operation fails, the error_code
is converted into a system_error
exception and passed back to the caller through the future.

Where a handler signature has the form:

voidhandler(asio::error_codeec);

the initiating function returns std::future<void>. As above, an error is passed back
in the future as a system_error
exception.