In section 3.4.3 basic.lookup.qual paragraph 6, change the grammar snippet as follows:
In section 3.4.3.2 namespace.qual, replace as indicated:::optnested-name-specifieropt class-name :: ~ class-name
If the nested-name-specifier of a qualified-id nominates a namespace, the name specified after the nested-name-specifier is looked up in the scope of the namespaceStrike 5.1.1 expr.prim.general paragraph 3 entirely:,. If a qualified-id starts with::
, the name after the::
is looked up in the global namespace. In either case,except thatthe names in a template-argument of a template-id are looked up in the context in which the entire postfix-expression occurs.
Drafting note: It's covered by 5.1.1p7 (type, lvalue-ness, member-ness, reference to 3.4.3.2) and 3.4.3.2 (qualified lookup for namespace members).The operator::
followed by an identifier, a qualified-id, an operator-function-id, or a literal-operator-id is a primary-expression. Its type is specified by the declaration of the identifier, qualified-id, operator-function-id, or literal-operator-id. The result is the entity denoted by the identifier, qualified-id, operator-function-id, or literal-operator-id. The result is an lvalue if the entity is a function or variable and a prvalue otherwise. The identifier, qualified-id, operator-function-id, or literal-operator-id shall have global namespace scope or be visible in global scope because of a using-directive (7.3.4 namespace.udir). [ Note: the use of::
allows an entity declared in the global namespace to be referred to even if its name has been hidden (3.4.3 basic.lookup.qual). -- end note ]
In section 5.1.1 expr.prim.general paragraph 6, change the grammar snippet as follows:
In section 5.1.1 expr.prim.general paragraph 7, replace as indicated:qualified-id:::optnested-name-specifier templateopt unqualified-id :: identifier :: operator-function-id :: literal-operator-id :: template-id nested-name-specifier: ::opt type-name :: ::opt namespace-name :: decltype-specifier :: nested-name-specifier identifier :: nested-name-specifier templateopt simple-template-id ::
A ::
, or a
nested-name-specifier that names a namespace (7.3
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; 3.4.3.2 namespace.qual describes
name lookup for namespace members that appear in
qualified-ids. ...
In section 5.1.1 expr.prim.general paragraph 9, replace as indicated:
In a qualified-id, if theIn section 5.2 expr.post paragraph 1, change the grammar as indicated:id-expressionunqualified-id is a conversion-function-id, its conversion-type-id shall denote the same type in both the context in which the entire qualified-id occurs and in the context of the class denoted by the nested-name-specifier.
In section 5.2.4 expr.pseudo paragraph 2, change the grammar snippet as indicated:... pseudo-destructor-name:::optnested-name-specifieropt type-name :: ~ type-name::optnested-name-specifier template simple-template-id :: ~ type-name::optnested-name-specifieropt ~ type-name ~ decltype-specifier
In 7.1.6.2 dcl.type.simple paragraph 1, change the grammar snippet as indicated:::optnested-name-specifieropt type-name :: ~ type-name
In 7.1.6.3 dcl.type.elab before paragraph 1, change the grammar snippet as indicated:simple-type-specifier:::optnested-name-specifieropt type-name::optnested-name-specifier template simple-template-id char ...
In 7.1.6.3 dcl.type.elab paragraph 1, change the grammar snippet as indicated:elaborated-type-specifier: class-key attribute-specifieropt::optnested-name-specifieropt identifier class-key::optnested-name-specifieropt templateopt simple-template-id enum::optnested-name-specifieropt identifier
class-key attribute-specifieropt identifier ; friend class-key ::opt identifier ; friend class-key ::opt simple-template-id ; friend class-key::optnested-name-specifier identifier ; friend class-key::optnested-name-specifier templateopt simple-template-id ;
In 7.3.2 namespace.alias paragraph 1, change the grammar snippet as indicated:
In 7.3.3 namespace.udecl paragraph 1, change the grammar snippet as indicated:qualified-namespace-specifier:::optnested-name-specifieropt namespace-name
In section 7.3.4 namespace.udir before paragraph 1, change the grammar snippet as indicated:using-declaration: using typenameopt::optnested-name-specifier unqualified-id ; using :: unqualified-id ;
In clause 8 dcl.decl paragraph 4, change the grammar snippet as indicated:using-directive: attribute-specifieropt using namespace::optnested-name-specifieropt namespace-name ;
In section 8.3.3 dcl.mptr paragraph 1, change the grammar snippet as indicated:... ptr-operator: * attribute-specifieropt cv-qualifier-seqopt & attribute-specifieropt && attribute-specifieropt::optnested-name-specifier * attribute-specifieropt cv-qualifier-seqopt ... declarator-id: ...opt id-expression::optnested-name-specifieropt class-name
In section 9.2 class.mem before paragraph 1, change the grammar snippet as indicated:::optnested-name-specifier * attribute-specifieropt cv-qualifier-seqopt D1
In clause 10 class.derived paragraph 1, change the grammar snippet as indicated:member-declaration: attribute-specifieropt decl-specifier-seqopt member-declarator-listopt ; function-definition ;opt::optnested-name-specifier templateopt unqualified-id ; using-declaration static_assert-declaration template-declaration alias-declaration
In section 14.6 temp.res paragraph 3, change the grammar snippet as indicated:... class-or-decltype:::optnested-name-specifieropt class-name decltype-specifier ...
typename-specifier: typename::optnested-name-specifier identifier typename::optnested-name-specifier templateopt simple-template-id