https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72768

--- Comment #3 from lh_mouse <lh_mouse at 126 dot com> ---
> 15.2 Constructors and destructors [except.ctor]
> 3 For an object of class type of any storage duration whose initialization or 
> destruction is terminated by an
> exception, the destructor is invoked for each of the object’s fully 
> constructed subobjects, that is, for each
> subobject for which the principal constructor (12.6.2) has completed 
> execution and the destructor has not
> yet begun execution, except that in the case of destruction, the variant 
> members of a union-like class are not
> destroyed. ...

Strangely enough, the standard says 'fully constructed' instead of 'completely
initialized' here. I tend to consider it a symbol indicating that the committee
think the two phrases are distinct from each other. From my point of view, the
object is 'completely initialized' once a (delegated or non-delegated,
including principle) ctor returns - if an exception is thrown, the dtor shall
be called -, despite the principal ctor in progress. The antonym of 'completely
initialized' should be 'partially initialized', being in a state when the ctor
of a subobject throws an exception, which is not the case here.

Reply via email to