Boost logo

Boost :

Subject: Re: [boost] asio library
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2009-10-27 12:52:27

Peter Foelsche wrote:
> "Olaf van der Spek" <olafvdspek_at_[hidden]> wrote in message
> >> What is the use of the socket object created in the first line?
> >
> > Doesn't the third line use it?
> The point is that there must be always something following
> this statement --
> by itself it does not make any sense. Thus this code could have been
> combined with any possible following code.

Two-stage construction is a common, if somewhat awkward idiom. I can imagine -- but don't know -- that this was done to give the option of not getting exceptions when they aren't wanted, though I know you find that disturbing.

Perhaps the constructor can be overloaded to allow both approaches?

Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.

Boost list run by bdawes at, gregod at, cpdaniel at, john at