This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-12-19
[Moved to DR at the November, 2014 meeting.]
The description of the required syntax for declaring a destructor in 11.4.7 [class.dtor] paragraph 1 says,
A declaration of a destructor uses a function declarator (9.3.4.6 [dcl.fct]) of the form
ptr-declarator ( parameter-declaration-clause ) exception-specificationopt attribute-specifier-seqopt
where the ptr-declarator...
A declaration such as
(~S())
arguably “uses” a declarator of the required form, since the cited wording does not forbid placing a declarator of that form inside parentheses. (Similar considerations apply to the syntax of constructors in 11.4.5 [class.ctor] paragraph 1.) There is implementation divergence on this point. The wording should be clarified as to whether parentheses surrounding a declarator of the required form are permitted or not.
Proposed Resolution (July, 2014):
Change 11.4.5 [class.ctor] paragraph 1 as follows:
Constructors do not have names.AIn a declaration of a constructor,usesthe declarator is a function declarator (9.3.4.6 [dcl.fct]) of the form...
Change 11.4.7 [class.dtor] paragraph 1 as follows:
AIn a declaration of a destructor,usesthe declarator is a function declarator (9.3.4.6 [dcl.fct]) of the form...