Skip to content

[expr.call]/2 Unclear specification for virtual function calls P4176 #9300

Description

@BlowingWind314

[expr.call]/2 says

If the selected function is non-virtual, or if the id-expression in the class member access expression is a qualified-id, that function is called. Otherwise, its final overrider in the dynamic type of the object expression is called; such a call is referred to as a virtual function call.

First, it should use "of" instead of "in". Consider ::x.foo().

Second, the "class member access expression" comes from nowhere, lacking a condition like "if the postfix-expression is a class member access expression".

Note that both would be resolved if P4176 is adopted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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