Edit

Share via


Compiler Error C2507

'identifier' : too many virtual modifiers on the base class

A class or structure is declared as virtual more than once. Only one virtual modifier can appear for each class in a list of base classes.

The following sample generates C2507:

// C2507.cpp
// compile with: /c
class A {};
class B : virtual virtual public A {};   // C2507
class C : virtual public A {};   // OK