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

Cleanup of [class.virtual] #3987

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

Conversation

sdkrystian
Copy link
Contributor

This is an attempt to make our definition of "override" and "final overrider" more consistent with its use, and includes some small cleanups along the way.

In [class.cdtor] p4 we have the following wording:

[...] the function called is the final overrider in the constructor's or destructor's class [...]

We also have the following wording in [expr.call] p3:

Otherwise, its final overrider in the dynamic type of the object expression is called

In both of these cases, we refer to the final overrider relative to another class. Changing the definition to match the use here seems reasonable. The approach taken here is to define the final overrider of a function relative to a class (as far as I can tell this wording shouldn't change semantics; it accounts for redeclared members not being members of the derived class).

There also was a missing \grammarterms around ref-qualifier, and cv-qualification was changed to be cv-qualifier-seq to match function declarators. Since we no longer need to consider virtual functions to override themselves, it allows us to simplify the wording a bit in other places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

2 participants