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

2024-10-26


1929. template keyword following namespace nested-name-specifier

Section: _N4567_.5.1.1  [expr.prim.general]     Status: CD4     Submitter: David Krauss     Date: 2014-05-15

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

It is not clear whether the template keyword should be accepted in an example like

  template<typename> struct s {};
  ::template s<void> q; // innocuous disambiguation?

Although it is accepted by the grammar, the verbiage in _N4567_.5.1.1 [expr.prim.general] paragraph 10 does not mention the possibility, while the preceding paragraph dealing with class qualification calls it out explicitly.

Notes from the June, 2014 meeting:

CWG agreed that this usage should be accepted.

Proposed resolution (November, 2014):

Change _N4567_.5.1.1 [expr.prim.general] paragraph 10 as follows (the base wording is as modified by issue 1887):

The nested-name-specifier :: names the global namespace. A nested-name-specifier that names a namespace (9.8 [basic.namespace]), optionally followed by the keyword template (13.3 [temp.names]), and then followed by the name of a member of that namespace (or the name of a member of a namespace made visible by a using-directive), is a qualified-id...