
From: Rene Rivera <grafik.list@redshift-software.com>
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@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;