Boost logo

Boost Users :

Subject: Re: [Boost-users] error: no matching function for call to ‘boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >::basic_stream_socket()’
From: Jonathan Franklin (franklin.jonathan_at_[hidden])
Date: 2010-02-19 10:52:34


On Fri, Feb 19, 2010 at 2:07 AM, David Kaplan <davkaplan_at_[hidden]> wrote:
> On 18 February 2010 18:00, Jonathan Franklin
> <franklin.jonathan_at_[hidden]> wrote:
>>
>> Note that if you need to delay the creation of the socket, you might
>> consider using a smart pointer to a socket.
>
> This should solve the issue - thanks! Will try it out...

I wasn't recommending that you use this idiom to solve your io service
initialization problem. For that, you should use the idiom that Igor
suggested.

But I frequently find myself not knowing how many sockets will be
needed a priori, or otherwise needing to delay allocation. In which
case, some form of smart pointer works great.

Jon


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net