This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 110c. See for the official list.


1920. Qualification mismatch in pseudo-destructor-name

Section: _N4778_.  [expr.pseudo]     Status: CD4     Submitter: David Majnemer     Date: 2014-05-01

[Moved to DR at the May, 2015 meeting.]

An example like

  typedef int T;
  typedef const T CT;

  void blah2(T *a) {

is ill-formed, because _N4778_. [expr.pseudo] paragraph 2 requires that the two type-names in the qualified-id be the same type. The corresponding case for a real destructor, however, is allowed because of the provision in 11.3 [] paragraph 5 ignoring cv-qualifiers in a typedef-name referring to a class type. The specification for pseudo-destructors should be adjusted accordingly.

Proposed resolution (November, 2014):

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

...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

shall designate the same scalar type (ignoring cv-qualification).