Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::asio::asyn_accept handler
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2017-03-29 13:28:05


AMDG

On 03/29/2017 07:07 AM, Christopher Pisz via Boost-users wrote:
> If I change it to
> std::function<void(const
> boost::system::error_code &error)> callback = ...
>
> then the connection is not passed.

Yes it is. The connection is stored inside the std::function.

> If it is not passed, then there is no
> way to store it, change its state, etc.
> It is passed in the tutorial code, so why can't I pass it with
> std::function?
>

In Christ,
Steven Watanabe


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