The information in this article applies to:
SYMPTOMSYou can receive the following error message if you try to override a virtual function with a covariant return type: Please refer to the sample code in the "More Information" section for details. CAUSEThe compiler does not support virtual functions with covariant return types as specified in the C++ Standard, section 10.3, which is quoted below: 5- The return type of an overriding function shall be either identical to the return type of the overridden function or covariant with the classes of the functions. If a function D::f overrides a function B::f, the return types of the functions are covariant if they satisfy the following criteria: STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. MORE INFORMATIONSteps to Reproduce BehaviorThe following sample code demonstrates the error:
Additional query words:
Keywords : kbCompiler kbCPPonly kbVC kbVC500 kbVC500bug kbVC600 kbVC600bug |
Last Reviewed: November 20, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |