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

Delete virtual keyword for overriding methods #805

Closed
hollasch opened this issue Nov 16, 2020 · 2 comments
Closed

Delete virtual keyword for overriding methods #805

hollasch opened this issue Nov 16, 2020 · 2 comments
Assignees
Milestone

Comments

@hollasch
Copy link
Collaborator

Just had this come up at work: the virtual keyword is redundant with override or final. Either of the last two imply that the function is virtual.

Hence a common recommendation is that the first declaration of a virtual function get the virtual keyword, and that all derived classes use either override or final and do not use the virtual keyword. Makes sense, and reduces unnecessary keyword clutter. I think we should adopt this convention.

@hollasch hollasch added this to the v4.0.0 milestone Nov 16, 2020
@hollasch hollasch self-assigned this Nov 16, 2020
@trevordblack
Copy link
Collaborator

I approve

hollasch added a commit that referenced this issue Nov 24, 2020
If a method is declared with the `override` keyword, then it is
implicitly virtual, so the `virtual` keyword is redundant and can be
removed.

Resolves #805
@hollasch
Copy link
Collaborator Author

Done.

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

No branches or pull requests

2 participants