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

2022-07-01


2069. Do destructors have names?

Section: 11.4.7  [class.dtor]     Status: CD4     Submitter: Richard Smith     Date: 2015-01-13

[Adopted at the February, 2016 meeting.]

According to 9.9 [namespace.udecl] paragraph 4,

[Note: Since destructors do not have names, a using-declaration cannot refer to a destructor for a base class....

However, 11.4.7 [class.dtor] paragraph 13 says,

In an explicit destructor call, the destructor name appears as a ~ followed by a type-name or decltype-specifier that denotes the destructor's class type...

See also 6.5.5.2 [class.qual] bullet 1.1:

a destructor name is looked up as specified in 6.5.5 [basic.lookup.qual];

Proposed resolution (September, 2015):

  1. Change 6.5.5.2 [class.qual] bullet 1.1 as follows:

  2. Change 11.4.7 [class.dtor] paragraph 13 as follows:

  3. In an explicit destructor call, the destructor name appears as is specified by a ~ followed by a type-name or decltype-specifier that denotes the destructor's class type. The invocation...