Boost logo

Boost :

From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2006-02-20 10:44:28


What is the rationale for boost::asio::placeholders::error and
boost::asio::placeholders::bytes_transfered?

acceptor_ptr->async_accept
( *socket_ptr
, boost::bind( &handle_accept
             , acceptor_ptr
             , socket_ptr
             , boost::asio::placeholders::error
             )
);

I find this a foreign and confusing usage a boost::bind. Granted I jumped
over the Tutorial explicitly introducing these, instead starting with the
Tutorial DayTime.3 that addressed my interests. I see the familiar
boost::bind, with the lack of _1, _2, so I'm thinking bind is generating a
function of type void ()(). ... but handle_accept is expecting a
boost::asio::error&???

Thanks, Jeff


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk