Boost logo

Boost :

Subject: Re: [boost] [asio] [bind] ambiguous bind templates for asio::write() and asio::read()
From: Gregory Dai (gregory.dai_at_[hidden])
Date: 2008-10-18 04:56:33


*code:*
    ....
    asio::streambuf response;
    size_t siz = asio::read(sslSock, response);
    ....

*compilation error (g++ 3.4.6 on RHEL4):*
asio/1.3.0/asio/impl/read.ipp:107: instantiated from `size_t
asio::read(SyncReadStream&, asio::basic_streambuf<Allocator>&) [with
SyncReadStream = asio::ssl::stream<asio::basic_stream_socket<asio::ip::tcp,
asio::stream_socket_service<asio::ip::tcp> >, asio::ssl::stream_service>,
Allocator = std::allocator<char>]'
asio/1.3.0/asio/ssl/detail/openssl_stream_service.hpp:415: error: call of
overloaded `bind(int (*)(SSL*, void*, int), boost::arg<1>, void*, int)' is
ambiguous
boost/1.36/boost/bind.hpp:1298: note: candidates are: boost::_bi::bind_t<R,
F, typename boost::_bi::list_av_3<A1, A2, A3>::type> boost::bind(F, A1, A2,
A3) [with R = int, F = int (*)(SSL*, void*, int), A1 = boost::arg<1>, A2 =
void*, A3 = int]
boost/1.36/boost/bind/bind_cc.hpp:47: note:
boost::_bi::bind_t<R, R (*)(B1, B2, B3), typename boost::_bi::list_av_3<A1,
A2, A3>::type> boost::bind(R (*)(B1, B2, B3), A1, A2, A3) [with R = int, B1
= SSL*, B2 = void*, B3 = int, A1 = boost::arg<1>, A2 = void*, A3 = int]

Also, asio::write(sslSock, response); resulted in a similar error.


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