-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Placement of the word virtual
#754
Comments
Here is the rationale for putting the
Unless you are extending the class, callers would not notice replacing a virtual function with a non-virtual function calling a private virtual function. |
To give a few thoughts:
|
FWIW, I do think we should have a consistent story for placement. I think the most unsurprising story is to have a sequence of keywords before For example, given the concrete suggestions we currently have, I would suggest:
|
See also the discussion towards the end of #665; in particular, this comment provides some thoughts for when we should put annotations either before or after the |
Ok, let's close this as consensus then. Discussion with Kate seemed aligned. |
Context for this question is this Google doc proposing inheritance.
This option puts the word
virtual
after the signature, and is optimized for callers of the method:This option puts the word
virtual
in a place familiar to C++ users:The text was updated successfully, but these errors were encountered: