warn_no_explicit_virtual

Controls the issuing of warning messages if an overriding function is not declared with a virtual keyword.

Syntax
  #pragma warn_no_explicit_virtual on | off | reset   
Remarks

The following listing shows an example.

Listing: Example of warn_no_explicit_virtual pragma
#pragma warn_no_explicit_virtual on 
struct A { 
 virtual void f(); 
}; 
struct B { 
 void f(); 
 // WARNING: override B::f() is declared without virtual keyword 
} 
Tip: This warning message is not required by the ISO/IEC 14882-2003 C++ standard, but can help you track down unwanted overrides.

This pragma does not correspond to any panel setting. By default, this pragma is off.