Title
Which members does a destructor destroy?
Status
c++11
Section
11.4.7 [class.dtor]
Submitter
Ryou Ezoe

Created on 2011-02-08.00:00:00 last changed 96 months ago

Messages

Date: 2011-03-15.00:00:00

[Voted into the WP at the March, 2011 meeting as part of paper N3262.]

Date: 2011-02-08.00:00:00

The current wording of 11.4.7 [class.dtor] paragraph 7 says,

After executing the body of the destructor and destroying any automatic objects allocated within the body, a destructor for class X calls the destructors for X's direct non-variant members...

This is incorrect; it is only the non-static members that are destroyed.

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetmessages: + msg3365
2011-04-10 00:00:00adminsetstatus: open -> fdis
2011-02-08 00:00:00admincreate