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

[class.virtual] Explicit object member functions cannot be virtual CWG2553 #5145

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jensmaurer
Copy link
Member

including when overriding a virtual function.
Remove a prohibition focusing on 'declared virtual'
from [dcl.fct].

Fixes #5144

@jensmaurer jensmaurer added the cwg Issue must be reviewed by CWG. label Dec 10, 2021
@@ -3578,7 +3578,7 @@
A \grammarterm{member-declarator} with an explicit-object-parameter-declaration
shall not include
a \grammarterm{ref-qualifier} or a \grammarterm{cv-qualifier-seq} and
shall not be declared \keyword{static} or \keyword{virtual}.
shall not be declared \keyword{static}.
Copy link
Member

@zygoloid zygoloid Dec 10, 2021

Choose a reason for hiding this comment

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

Do we have the same problem with the implicit static for allocation functions?

struct A {
  // I'm not sure which parameter needs to be size_t, but
  // one of them does...
  /*implicitly static*/
  void *operator new(this size_t a, size_t b);
};

Copy link
Member Author

Choose a reason for hiding this comment

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

See separate commit.

source/classes.tex Outdated Show resolved Hide resolved
@wg21bot wg21bot added the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Jan 23, 2022
including when overriding a virtual function.
Remove a prohibition focusing on 'declared virtual'
from [dcl.fct].
@jensmaurer jensmaurer removed the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Jan 23, 2022
@jensmaurer
Copy link
Member Author

CWG2553

@jensmaurer jensmaurer added the not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking. label Mar 24, 2022
@jensmaurer jensmaurer changed the title [class.virtual] Explicit object member functions cannot be virtual [class.virtual] Explicit object member functions cannot be virtual CWG2553 Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cwg Issue must be reviewed by CWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[class.virtual] Overriding virtual function through an explicit object member function CWG2554
4 participants