Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[expr.mtr.oper]/6 refers to "the operand for the function call operator", as if there can only be one #5877

Open
t3nsor opened this issue Oct 1, 2022 · 0 comments

Comments

@t3nsor
Copy link
Contributor

t3nsor commented Oct 1, 2022

[expr.mptr.oper]/6 says

If the result of .* or ->* is a function, then that result can be used only as the operand for the function call operator ().

which suggests that a function call operator only has one operand, and that the argument expressions don't count. This is not consistent with [expr.ref]/6.3.2, which refers to "the left-hand operand of a member function call".

The wording of [expr.mptr.oper]/6 should be changed to also say "left-hand operand".

In case there is any doubt that the argument expressions should be considered operands, consider [intro.execution]/3.1. If we consider argument expressions to be operands, then [intro.execution]/3.1 implies that they are subexpressions of the function call expression. This is obviously what was intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant