Override requirements are:
1 For non-overloaded methods, the override keyword cannot be added, otherwise a compilation error will occur.
2 For overloaded methods, the override keyword must be used; If you want to hide the methods in the base class, you need to use the new keyword.
3 With IDE, as long as you enter override and space in Visual Studio.Net, you can automatically list all overloaded methods in the base class.
In this respect, I think that with the help of typedef, template or macro function of C++, we may be able to simulate the function of override keyword.
One of my shapeless ideas is:
1 Define VIRTUAL as virtual, and then define the name of the written virtual function as illegal. Overloading directly in subclasses will lead to compile-time errors.
2 To define OVERRIDE, first check whether the overloaded function name is illegally defined. If not, define an illegal result, resulting in a compile-time error, so that the OVERRIDE keyword cannot be applied to non-overloaded functions.
If there is an illegal definition, let it first cancel the illegal definition of the overloaded function name, then overload it normally and redefine it illegally again, so that the virtual function can be overloaded correctly.
However, there are still some problems, that is, there will be some problems when writing the implementation of overloaded functions and calling such declared functions, because the corresponding function names have been defined as illegal and cannot be used directly. More complex macro definitions may be needed to solve it.
The idea is this, but there are many problems in concrete implementation. I haven't succeeded in the experiment yet, so I keep my ideas here for future reference.