override
is a special keyword extension from Microsoft that can be used in C++/CLI and Visual C++ implementations. It is similar to the @Override
annotation in Java or override
in C#, and provides better compile time checks just in case you didn't override something you meant to.
From the first link:
override indicates that a member of a managed type must override a base class or a base interface member. If there is no member to override, the compiler will generate an error.
override is also valid when compiling for native targets (without /clr). See Override Specifiers and Native Compilations for more information.
override is a context-sensitive keyword. See Context-Sensitive Keywords for more information.
As of the C++11 standard, the override
specifier is now a standardized keyword. Support is still limited, and as per this page from Apache StdCxx, override
is supported by GCC 4.7+, Intel C++ 12.0+, and Visual C++ 2012 (with pre-standardization support in Visual C++ 2005).