This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-11-11
[Moved to DR at the November, 2014 meeting.]
One of the forms of pseudo-destructor-name is
Presumably the intent of this form is to allow the nested-name-specifier to designate a namespace; otherwise the
production would be used.
Since one of the forms of nested-name-specifier is
one can write something like p->decltype(x)::~Y(). However, the lookup rules in 6.5.5 [basic.lookup.qual] paragraph 6 are inappropriate for the decltype-specifier case:
If a pseudo-destructor-name (_N4778_.7.6.1.4 [expr.pseudo]) contains a nested-name-specifier, the type-names are looked up as types in the scope designated by the nested-name-specifier.
Since this form appears to be useless (use of a decltype-specifier is permitted after a ~, but only with no nested-name-specifer — but see issue 1586), perhaps it should be made ill-formed.
Proposed resolution (February, 2014):
Change the grammar in 7.6.1 [expr.post] paragraph 1 as follows: