This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 109b. See for the official list.


1029. Type of a destructor call

Section: 11.4.7  [class.dtor]     Status: C++11     Submitter: Johannes Schaub     Date: 2010-02-08

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

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.)

Proposed resolution (September, 2010):

Change [] 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.