Boost logo

Boost :

From: Jose (jmalv04_at_[hidden])
Date: 2007-09-18 14:40:00


Hi, I was wondering the same thing but Chris explained before

http://article.gmane.org/gmane.comp.lib.boost.asio.user/136

Have you replaced the tuples in all handlers and tested the example ? I'd
prefer to use boost::protect too but there may be a small performance
penalty by having to use boost::function instead of a regular function
pointer. It would be good to know whether this performance penalty is
negligible or not

regards
jose

On 9/18/07, Chris Fairles <chris.fairles_at_[hidden]> wrote:
>
> In svn, the serialization example wraps a mem func ptr in a tuple to
> be tossed through various bind calls.
>
> In client.cpp, I found that using boost::protect around the bind call
> prevents the compile errors but I'm not sure why.
>
> connection_.async_read(stocks_,
> boost::protect(boost::bind(&client::handle_read, this,
> boost::asio::placeholders::error)));
>
> Any ideas as to why this works?
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


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