CWG Issue 1440 (original) (raw)

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

2025-04-13


1440. Acceptable _decltype-specifier_s used as _nested-name-specifier_s

Section: _N4567_.5.1.1 [expr.prim.general]Status: CD3Submitter: Mike MillerDate: 2012-01-05

[Moved to DR at the October, 2012 meeting.]

The current wording of the Standard does not describe what happens when a decltype-specifier is used as a_nested-name-specifier_ and the type denoted by the_decltype-specifier_ is neither a class type nor an enumeration type. Such _nested-name-specifier_s should be prohibited, presumably somewhere around paragraphs 8-10 of _N4567_.5.1.1 [expr.prim.general]. (The corresponding prohibition for named types is handled as part of lookup in 6.5.5 [basic.lookup.qual] paragraph 1.)

Proposed resolution (February, 2012):

Add the following immediately after the grammar in _N4567_.5.1.1 [expr.prim.general] paragraph 8 and move the text following that point into a new paragraph:

The type denoted by a decltype-specifier in a_nested-name-specifier_ shall be a class or enumeration type.

A nested-name-specifier that denotes a class...