Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 922 Bytes

compiler-error-c2688.md

File metadata and controls

36 lines (29 loc) · 922 Bytes
descriptiontitlems.datef1_keywordshelpviewer_keywordsms.assetid
Learn more about: Compiler Error C2688
Compiler Error C2688
11/04/2016
C2688
C2688
168c9e9d-8f65-4664-af86-db71d3e6ee46

Compiler Error C2688

'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& };
close