Daily bit(e) of C++ | override specifier
Daily bit(e) of C++ ♻️111, Explicitly marking functions that intend to override a base implementation using the override specifier.
The override specifier (C++11) denotes a virtual method that intends to override a base implementation.
If the compiler does not find a corresponding virtual method in one of the base classes, it will treat the override specifier as an error.
Follow this guideline (see C.128 in Cpp Core Guidelines):
when introducing a new virtual method, use only the virtual keyword
when overriding an existing method, use only the override specifier