C++ Logo


Advanced search

Behavior of implicitly defined destructor unspecified?

From: Stephan Bergmann <sbergman_at_[hidden]>
Date: Thu, 12 Dec 2019 15:53:54 +0100
There appears to be no description of the behavior of an implicitly
defined destructor (in neither C++17 nor the current draft).
[class.dtor]/4 says: "After executing the body of the destructor [...]",
but I can't find mention of what the body of an implicitly defined
destructor should look like. Something like "For an implicitly defined
destructor, the body is empty" seems to be missing.

(For example for an implicitly defined default constructor,
[class.ctor]/7 says: "The implicitly-defined default constructor
performs the set of initializations [...]")

Received on 2019-12-12 08:56:25