The information in this article applies to:
SYMPTOMSWhen enumerated types are used in some (+-*/|&^%) operator overloads, the Microsoft compilers listed above may generate the following message: In Visual C++, 32-bit edition, version 2.1, the following warnings are also displayed: The "Sample Code" section in this article demonstrates this problem. CAUSEWithout determining that there is an exact operator overload match, the compiler is considering the enumerator types promoted to int type. This causes the C2593 ambiguous error. RESOLUTIONUse one of the following three workarounds:
-or- -or- STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ version 5.0. MORE INFORMATIONSample Code to Reproduce Problem
Sample Code to Work Around Problem
REFERENCESMore information about operator overloading can be found in "The Annotated C++ Reference Manual (Jan '94)" section 13.4. Additional query words: kbVC400bug cpp 9.00 8.00 8.00c 10.00 10.10 10.20
Keywords : kbcode kbtool kbCompiler kbCPPonly kbVC kbVC500fix |
Last Reviewed: February 2, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |