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.call] Clarify the value of this #5399

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

languagelawyer
Copy link
Contributor

@languagelawyer languagelawyer commented Apr 19, 2022

There is no such thing as «this parameter of the function», after all

@jensmaurer
Copy link
Member

The automatic check fails.

Also, I'm not convinced this is a net clarification.

@languagelawyer
Copy link
Contributor Author

The automatic check fails.

I've used \termref.

Also, I'm not convinced this is a net clarification.

Any details?

@jensmaurer jensmaurer added the changes requested Changes to the wording or approach have been requested and not yet applied. label Apr 19, 2022
as if by an explicit type conversion\iref{expr.cast}.
If the function is an implicit object member function,
the object for which it is invoked\iref{expr.prim.this}
is the object which would be pointed to by the result
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why "would"? There is nothing hypothetical here. The member function is invoked for a certain subobject (or possibly the entire object) of the object designated by the object expression.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why "would"? There is nothing hypothetical here.

We don't do any code transformations or anything else to make this conversion «really exist».

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do convert the object expression to the type of the base class, and the result of that transformation is the value of "this" inside the member function, in my view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes requested Changes to the wording or approach have been requested and not yet applied. needs rebase The pull request needs a git rebase to resolve merge conflicts.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants