Boost logo

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
What do you try to achieve?

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at