Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

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 ...
};

Community Additions

ADD
Show:
© 2015 Microsoft