Share via


10.3 (Paragraph 5) Covariant Return Types

Virtual base classes are not supported as covariant return types when the virtual function has a variable number of arguments.

For example, the following sample will not compile:

// CovariantReturn.cpp
class A 
{
   virtual A* f(int c, ...);   // remove ...
};

class B : virtual A
{
   B* f(int c, ...);   // C2688 remove ...
};

See Also

Other Resources

Nonstandard Behavior