Boost logo

Boost :

From: Rob Stewart (stewart_at_[hidden])
Date: 2004-03-30 12:52:32


From: Rene Rivera <grafik.list_at_[hidden]>
> Rob Stewart wrote:
> >
> > Until the ctor finishes -- after the closing } -- there is no
> > object (see 3.8/1).
>
> Yes the object lifetime hasn't started... but the object is initialized. Which
> according to 12.7 allows for referring to members of the object directly or
> indirectly, in this case by a copy ctor function.

A copy ctor requires an object to copy. Until the closing brace,
there is no object. You can justify your actions by saying that
all of the dms have been initialized and that the copy ctor is
just accessing those dms via a pointer, but that doesn't change
the fact that you're invoking a cctor with a non-object. (3.8/3)

Pragmatically, what you've done should work fine on any compiler.

-- 
Rob Stewart                           stewart_at_[hidden]
Software Engineer                     http://www.sig.com
Susquehanna International Group, LLP  using std::disclaimer;

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