Boost logo

Boost Users :

Subject: Re: [Boost-users] Why do socket::receive() and socket::async_receive() have different return types?
From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2018-06-14 14:59:34


On Thu, Jun 14, 2018 at 7:47 AM Álvaro Cebrián Juan via Boost-users
<boost-users_at_[hidden]> wrote:
> the asynchronous version socket::async_receive() returns "void".

If you want to get pendatic, the return type from an initiating
function is not void, but

    typename async_result<decay_t<CompletionToken>, Signature>::return_type

See:

<https://www.boost.org/doc/libs/1_67_0/doc/html/boost_asio/reference/asynchronous_operations/production_of_initiating_function_return_value.html>

Thanks


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net