Skip to content

[expr.ref] Name after dot is never unqualified #880

@Endilll

Description

@Endilll

Consider [expr.ref] paragraph 1 and the note after it:

A postfix expression followed by a dot . or an arrow ->, optionally followed by the keyword template, and then followed by an id-expression or a splice-expression, is a postfix expression.

[Note 1: If the keyword template is used and followed by an id-expression, the unqualified name is considered to refer to a template ([temp.names]). If a simple-template-id results and is followed by a ​::​, the id-expression is a qualified-id. — end note]

The first sentence of the note talks about unqualified name, but its definition doesn't leave any room to have it in class member access expression after dot . or arrow ->. Could it be that unqualfied-id is meant here?

Additionally, "a simple-template-id results" in the second sentence of the note feels rather awkward. Can it be improved?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions