Movatterモバイル変換


[0]ホーム

URL:


This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118c. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-10-11


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 asa matter of completeness. (_N4778_.7.6.1.4 [expr.pseudo] paragraph 1defines the type of a pseudo-destructor call asvoid.)

Proposed resolution (September, 2010):

Change 7.6.1.3 [expr.call] paragraph 3 as follows:

TheIf thepostfix-expression designates adestructor (11.4.7 [class.dtor]), the type of the function callexpression isvoid; otherwise, the type of the functioncall expression is the return type of the statically chosen function(i.e., ignoring thevirtual keyword), even if the type of thefunction actually called is different. This type shall be a completeobject type, a reference type or the typevoid.



[8]ページ先頭

©2009-2025 Movatter.jp