The information in this article applies to:
SYMPTOMSClass A has a member function that converts an instance of class B to an instance of class A. Class B also has a member function that converts an instance of class B to an instance of class A. Therefore, when you assign an instance of class B to an instance of class A, the compiler could use both conversion methods, resulting in an ambiguity. However, the C/C++ compiler does not generate an error message in this situation, as demonstrated by the sample code in the "MORE INFORMATION" section, below. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. MORE INFORMATIONYou can use the following sample code to reproduce this problem: Sample Code
REFERENCES"The Annotated C++ Reference Manual" (ARM), Ellis and Stroustrup, Section 12.3.2, "Conversion Functions." Additional query words: kbVC400bug 8.00 8.00c 9.00
Keywords : kbCompiler kbCPPonly kbVC kbVC100bug kbVC151bug kbVC200bug kbVC400bug kbVC410bug kbVC420bug kbVC500bug kbVC600bug |
Last Reviewed: April 15, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |