- both are pointers to classes or references to classes
- the class in the return type of B::f is the same class as the class in the return type of D::f or, is an unambiguous direct or indirect base class of the class in the return type of D::f and is accessible in D
- both pointers or references have the same cv-qualification and the class type in the return type of D::f has the same cv-qualification as or less cv-qualification than the class type in the return type of B::f.
This problem was corrected in Microsoft Visual C++ .NET.
Steps to Reproduce BehaviorThe following sample code demonstrates the error:
// compiler option needed: none
virtual A* function();
class B : public A
ID do Artigo: 240862 - Última Revisão: 5 de jul de 2005 - Revisão: 1