- Title
- Naming destructors
- Status
- cd3
- Section
- 11.4.7 [class.dtor]
- Submitter
- Jamie Schmeiser
Created on 2002-04-25.00:00:00 last changed 55 months ago
Messages
Date: 2022-02-18.07:47:23
Proposed resolution: This issue is resolved by the resolution of
issue 1435.
Date: 2026-07-25.21:52:10
Note that destructors suffer from similar problems as those of
constructors dealt with in issue 194
and in 263 (constructors as
friends). Also, the wording in 11.4.7 [class.dtor],
paragraph 1 does not permit a
destructor to be defined outside of the memberlist. Change 11.4.7 [class.dtor], paragraph 1 from to
...A special declarator syntax using an optional function-specifier
(9.2.3 [dcl.fct.spec]) followed by ~ followed by
the destructor's class name followed
by an empty parameter list is used to declare the destructor in a
class definition. In such a declaration, the ~ followed by the
destructor's class name can be enclosed in optional parentheses; such
parentheses are ignored....
...A special declarator syntax using an optional sequence of
function-specifiers (9.2.3 [dcl.fct.spec]),
an optional friend keyword, an optional
sequence of function-specifiers (9.2.3 [dcl.fct.spec])
followed by an optional ::
scope-resolution-operator followed by an optional
nested-name-specifier followed by ~
followed by the destructor's class
name followed by an empty parameter list is used to declare the
destructor. The optional nested-name-specifier shall not be specified
in the declaration of a destructor within the member-list of the class
of which the destructor is a member. In such a declaration, the
optional :: scope-resolution-operator followed by an optional
nested-name-specifier followed by ~
followed by the destructor's class
name can be enclosed in optional parentheses; such parentheses are
ignored....
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-02-18 07:47:23 | admin | set | messages: + msg6682 |
| 2014-03-03 00:00:00 | admin | set | status: open -> cd3 |
| 2002-04-25 00:00:00 | admin | create | |