This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-08-11
1887. Problems with :: as nested-name-specifierSection: 9.10 [namespace.udecl] Status: CD4 Submitter: Jeff Snyder Date: 2014-03-04[Moved to DR at the November, 2014 meeting.]
Issue 1411 added :: as a production for nested-name-specifier. However, the grammar for using-declarations should have been updated but was overlooked:
In addition, there is some verbiage in 6.5.5.3 [namespace.qual] paragraph 1 and 9.10 [namespace.udecl] paragraph 9 that should probably be revised.
Proposed resolution (October, 2014):
Change the grammar in 9.10 [namespace.udecl] paragraph 1 as follows:
Change 6.5.5.3 [namespace.qual] paragraph 1 as follows:
If the nested-name-specifier of a qualified-id nominates a namespace (including the case where the nested-name-specifier is ::, i.e., nominating the global namespace), the name specified after the nested-name-specifier is looked up in the scope of the namespace. If a qualified-id starts with ::, the name after the :: is looked up in the global namespace. In either case, the The names in a template-argument of a template-id are looked up in the context in which the entire postfix-expression occurs.
Change _N4567_.5.1.1 [expr.prim.general] paragraph 10 as follows:
A ::, or a The nested-name-specifier :: names the global namespace. Anested-name-specifier that names a namespace (9.9 [basic.namespace]), in either case 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; 6.5.5.3 [namespace.qual] describes name lookup for namespace members that appear in qualified-ids. The result is...
Change 9.10 [namespace.udecl] paragraph 9 as follows:
Members declared by a using-declaration can be referred to by explicit qualification just like other member names (6.5.5.3 [namespace.qual]). In a using-declaration, a prefix :: refers to the global namespace. [Example:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4