Type of a destructor call
11.4.7 [class.dtor]
Johannes Schaub

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


Date: 2010-11-15.00:00:00

[Voted into the WP at the November, 2010 meeting.]

Date: 2010-09-15.00:00:00

Proposed resolution (September, 2010):

Change [expr.call] paragraph 3 as follows:

The If the postfix-expression designates a destructor (11.4.7 [class.dtor]), the type of the function call expression is void; otherwise, the type of the function call expression is the return type of the statically chosen function (i.e., ignoring the virtual keyword), even if the type of the function actually called is different. This type shall be a complete object type, a reference type or the type void.
Date: 2020-12-15.00:00:00

The Standard does not define the type of a destructor call. Although that is not of any practical importance, it should do so as a matter of completeness. (_N4778_. [expr.pseudo] paragraph 1 defines the type of a pseudo-destructor call as void.)

Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetstatus: dr -> fdis
2010-11-29 00:00:00adminsetmessages: + msg3183
2010-11-29 00:00:00adminsetstatus: tentatively ready -> dr
2010-10-18 00:00:00adminsetmessages: + msg2987
2010-10-18 00:00:00adminsetstatus: drafting -> tentatively ready
2010-08-23 00:00:00adminsetstatus: open -> drafting
2010-02-08 00:00:00admincreate