|
Boost : |
From: Marc VIALA (mviala_at_[hidden])
Date: 2006-01-26 02:53:55
Hi Chris,
Thanks for your path. Here again we have to deal with VC7.1's subtleties...
A+
Marc Viala
mailto:mviala_at_[hidden]
-----Message d'origine-----
De : boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] De
la part de Christopher Kohlhoff
Envoyé : mardi 24 janvier 2006 13:23
À : boost_at_[hidden]
Objet : Re: [boost] [BOOST][asio] Compilation problem w/
Serializationexample
Hi Marc,
--- Marc Viala <mviala_at_[hidden]> wrote:
> We are just trying to use Asio (ver 0.3.6) w/ BOOST 1.33.1 and
> we have some troubles during the compilation of the
> serialization example, more precisely the file
> "connection.hpp" @ line 79 : "boost::bind can't deduced
> arguments..." I've tried to replace with boost::lambda::bind
> but without success...
>
> Is there any patch of this example with our C++ platform?
Can you try the following change to connection.hpp, thanks.
@@ -73,8 +73,10 @@
void async_read(T& t, Handler handler)
{
// Issue a read operation to read exactly the number of bytes in a
header.
+ void (connection::*f)(const asio::error&, T&,
boost::tuple<Handler>)
+ = &connection::handle_read_header<T, Handler>;
asio::async_read(socket_, asio::buffer(inbound_header_),
- boost::bind(&connection::handle_read_header<T, Handler>,
+ boost::bind(f,
this, asio::placeholders::error, boost::ref(t),
boost::make_tuple(handler)));
}
@@ -105,8 +107,10 @@
// Start an asynchronous call to receive the data.
inbound_data_.resize(inbound_data_size);
+ void (connection::*f)(const asio::error&, T&,
boost::tuple<Handler>)
+ = &connection::handle_read_data<T, Handler>;
asio::async_read(socket_, asio::buffer(inbound_data_),
- boost::bind(&connection::handle_read_data<T, Handler>, this,
+ boost::bind(f, this,
asio::placeholders::error, boost::ref(t), handler));
}
}
Cheers,
Chris
_______________________________________________
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