description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||
---|---|---|---|---|---|---|---|
Learn more about: Compiler Error C2688 | Compiler Error C2688 | 11/04/2016 |
|
| 168c9e9d-8f65-4664-af86-db71d3e6ee46 |
'C2::fgrv' : covariant returns with multiple or virtual inheritance not supported for varargs functions
Covariant return types are not supported in Visual C++ when a function contains variable arguments.
To resolve this error, either define your functions so that they do not use variable arguments or make the return values the same for all virtual functions.
The following sample generates C2688:
// C2688.cppstructG1 {}; structG2 {}; structG3 : G1, G2 {}; structG4 {}; structG5 {}; structG6 : G4, G5 {}; structG7 : G3, G6 {}; structC1 { virtual G4& fgrv(int,...); }; structC2 : C1 { virtual G7& fgrv(int,...); // C2688, does not return G4& };