You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
Just had this come up at work: the
virtual
keyword is redundant withoverride
orfinal
. 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 eitheroverride
orfinal
and do not use thevirtual
keyword. Makes sense, and reduces unnecessary keyword clutter. I think we should adopt this convention.The text was updated successfully, but these errors were encountered: