Controls the recognition of a non-virtual member function that hides a virtual function in a superclass.
#pragma warn_hidevirtual on | off | reset
If you enable this pragma, the compiler issues a warning message if you declare a non-virtual member function that hides a virtual function in a superclass. One function hides another if it has the same name but a different argument type. Hidden Virtual Functions shows an example.
class A {
public:
virtual void f(int);
virtual void g(int);
};
class B: public A {
public:
void f(char); // WARNING: Hides A::f(int)
virtual void g(int); // OK: Overrides A::g(int)
};
The ISO/IEC 14882:2003 C++ Standard does not require this pragma.
This pragma corresponds to the Hidden Virtual Functions setting in the CodeWarrior IDE's Properties > C/C++ Build > Settings > Tool Settings > PowerPC Compiler > Warniings C/C++ Language settings panel.