Is the destructor called when a delegating constructor throws?

The lifetime of an object begins when any constructor (i.e., in the case of delegation, the ultimate target constructor) is successfully completed. For the purposes of [C++03] §3.8, “the constructor call has completed” means any constructor call. This means that an exception thrown from the body of a delegating constructor will cause the destructor to be invoked automatically.

source.

And here is a nice article about delegating constructors, should anybody want to read it.


The rule is that the destructor is called for all fully constructed objects. The object is considered fully constructed once any constructor has finished, including the delegated constructor (even though the program continues in another constructor).