Title
cv-qualifiers on pseudo-destructor type
Status
cd1
Section
_N4778_.7.6.1.4 [expr.pseudo]
Submitter
Mark Mitchell

Created on 2004-03-18.00:00:00 last changed 196 months ago

Messages

Date: 2006-04-15.00:00:00

[Voted into WP at April, 2006 meeting.]

Date: 2005-10-15.00:00:00

Proposed resolution (October, 2005):

Change _N4778_.7.6.1.4 [expr.pseudo] paragraph 2 as follows:

The left-hand side of the dot operator shall be of scalar type. The left-hand side of the arrow operator shall be of pointer to scalar type. This scalar type is the object type. The type designated by the pseudo-destructor-name shall be the same as the object type. The cv-unqualified versions of the object type and of the type designated by the pseudo-destructor-name shall be the same type. Furthermore, the two type-names in a pseudo-destructor-name of the form
    ::opt nested-name-specifieropt type-name ::~ type-name
shall designate the same scalar type. The cv-unqualified versions of the object type and of the type designated by the pseudo-destructor-name shall be the same type.
Date: 2020-12-15.00:00:00

_N4778_.7.6.1.4 [expr.pseudo] paragraph 2 says both:

The type designated by the pseudo-destructor-name shall be the same as the object type.
and also:
The cv-unqualified versions of the object type and of the type designated by the pseudo-destructor-name shall be the same type.
Which is it? "The same" or "the same up to cv-qualifiers"? The second sentence is more generous than the first. Most compilers seem to implement the less restrictive form, so I guess that's what I think we should do.

See also issues 305 and 399.

History
Date User Action Args
2008-10-05 00:00:00adminsetstatus: wp -> cd1
2006-11-05 00:00:00adminsetstatus: dr -> wp
2006-04-22 00:00:00adminsetmessages: + msg1361
2006-04-22 00:00:00adminsetstatus: ready -> dr
2005-10-22 00:00:00adminsetstatus: review -> ready
2005-05-01 00:00:00adminsetmessages: + msg1142
2005-05-01 00:00:00adminsetstatus: open -> review
2004-03-18 00:00:00admincreate