You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
struct Node {
struct Node* Next; // OK: Refers to Node at global scope
struct Data* Data; // OK: Declares type Data at global scope and member Data
};
The first comment above should be replaced by "Refers to the injected class name Node" according to the previous paragraph which says:
If the elaborated-type-specifier has no nested-name-specifier, and unless the elaborated-type-specifier appears in a declaration with the following form:
class-keyattribute-specifier-seqoptidentifier;
the identifier is looked up according to [basic.lookup.unqual] but ignoring any non-type names that have been declared.
Finally, [basic.lookup.unqual/7 confirms that the lookup for the name Node started in struct Node * Next; finds the injected class name Node, not the Node in global scope.
The text was updated successfully, but these errors were encountered:
Aside: should the example in [basic.lookup.elab] p3 be a new paragraph? It seems to be showing the rules of the entire sub-clause, not just those in paragraph 3 that it's attached to.
Yes, you're right. In that case it makes some sense to move the example to a new paragraph, although I don't feel uncomfortable with the way it's laid out now.
The example in [basic.lookup.elab]/3 starts with the following:
The first comment above should be replaced by "Refers to the injected class name Node" according to the previous paragraph which says:
Finally, [basic.lookup.unqual/7 confirms that the lookup for the name
Node
started instruct Node * Next;
finds the injected class nameNode
, not theNode
in global scope.The text was updated successfully, but these errors were encountered: