Do destructors have names by standard?

Do class destructors have names in a pedantic sense according to the standard?

Recall that the constructors obviously have no names:

12.1.1:

Constructors have no names. special declarator syntax using an optional sequence of specifier functions (7.1.2) by the name of the constructor class followed by a list of parameters for declaring or defining the constructor. In such a statement, the optional parentheses around the constructor of the class name are ignored.

The standard does not explicitly state that destructors have or do not have names, but there are many references to how to call and declare a destructor using a special language, none of which refers directly to the name of the destructor. The problem seems to go around in different places:

12.4.1:

A special declarator syntax using the optional function specifier (7.1.2) followed by ~, followed by the name of the destructor class, followed by an empty list of parameters used to declare the destructor in the class definition.

5.2.4.1:

Using a pseudo-destructor-name after the dot. or the arrow β†’ represents the destructor for the non-class type, called the type name. the result should be used only as an operand for the function call operator (), and the result of such a call is of type void. The only effect is the evaluation of the postfix expression in front of the point or arrow.

12.4.12:

~ , . (9.3), .. , , undefined ( delete ).

(12.4.12) , , . 12.4.12 "- " " , ".

, ?

+5
1

, "", . -, ( , ++ 0x)

- (2.11), operator-function-id (13.5), id-- (12.3.2) (14.2), (6.6.4, 6.1).

"", , foo::bar. "". , , ::, . bar , .

- , , , , , - . ~ class-name (. 3.4.5/3 3.4.3/6). ~ , . "" ( , "" 3.4.3.1/2 " " ), .

, , , , . ( - !). ++ 0x , (. 3.4.3.1/2, ).

. . .

+8

All Articles