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

fix missing override keyword #8

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

Conversation

roidanton
Copy link

Did not use final b/c being not sure if these classes are ought to be subclassed by consumers.

@AntonioNoack
Copy link

Didn't you just move the override keyword from the front of a function farther towards the end of its head?

@roidanton
Copy link
Author

roidanton commented Jun 28, 2022

No.
Having the override (or final) keyword in place enables a compile time check if the derived function signature exists in the base class. Using virtual on an already virtual function is meaningless and doesn't provide any compile time protection -> in case the function signature between a derived and the base class changes. the compiler wouldn't recognize and just add an additional function then.

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

Successfully merging this pull request may close these issues.

2 participants