Movatterモバイル変換


[0]ホーム

URL:


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

2025-12-20


344. Naming destructors

Section:11.4.7  [class.dtor]    Status:CD3    Submitter:Jamie Schmeiser    Date:25 April 2002

Note that destructors suffer from similar problems as those ofconstructors dealt with inissue 194and in263 (constructors asfriends). Also, the wording in 11.4.7 [class.dtor],paragraph 1 does not permit adestructor to be defined outside of the memberlist.

Change 11.4.7 [class.dtor], paragraph 1 from

...A special declarator syntax using an optionalfunction-specifier(9.2.3 [dcl.fct.spec]) followed by~ followed bythe destructor's class name followedby an empty parameter list is used to declare the destructor in aclass definition. In such a declaration, the~ followed by thedestructor's class name can be enclosed in optional parentheses; suchparentheses are ignored....

to

...A special declarator syntax using an optional sequence offunction-specifiers (9.2.3 [dcl.fct.spec]),an optional friend keyword, an optionalsequence offunction-specifiers (9.2.3 [dcl.fct.spec])followed by an optional::scope-resolution-operator followed by an optionalnested-name-specifier followed by~followed by the destructor's classname followed by an empty parameter list is used to declare thedestructor. The optionalnested-name-specifier shall not be specifiedin the declaration of a destructor within the member-list of the classof which the destructor is a member. In such a declaration, theoptional:: scope-resolution-operator followed by an optionalnested-name-specifier followed by~ followed by the destructor's classname can be enclosed in optional parentheses; such parentheses areignored....

Proposed resolution:

This issue is resolved by the resolution ofissue 1435.




[8]ページ先頭

©2009-2026 Movatter.jp