|
Boost Users : |
Subject: Re: [Boost-users] ASIO async_accept() and c++2011 lambas
From: Igor R (boost.lists_at_[hidden])
Date: 2011-07-27 05:25:56
> I would like to get something like this:
>
> async_accept(socket, [=] (const boost::system::error_code &error)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â { // });
>
> if (!error)
> {
> Â //here there are a valid connection
> }
"error" is just an argument of the anonymous function (lambda), and
it's accessible only inside that function (like any other function
argument).
What do you try to achieve?
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