Skip to content

STL: Should we avoid repeating virtual for override functions? #303

Description

Currently, we follow a convention of saying both virtual and override on derived implementations. One of many examples:

STL/stl/inc/functional

Lines 861 to 863 in 58bb49d

virtual _Rx _Do_call(_Types&&... _Args) override { // call wrapped function
return _Invoker_ret<_Rx>::_Call(_Mypair._Myval2, _STD forward<_Types>(_Args)...);
}

We started doing this when override was new and we weren't familiar with reading it. Now that we are, should we avoid this redundancy? The advantage to doing so, aside from reducing verbosity, is that it would make the remaining virtual occurrences stand out. Those indicate either base declarations, or derived implementations that should be marked override (see #207 for that).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSomething can be improvedfixedSomething works now, yay!

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions