The information in this article applies to:
SYMPTOMSWhen attempting to use a base class' operator delete, and using the /GX switch to enable Visual C++ Exception Handling, the following error may be generated:
CAUSEThis error will be generated if the base class has a virtual function, the derived class uses the base class operator delete via a using declaration or an access declaration, and the derived class has a function prototyped to return a pointer to a base class, but actually returns a pointer to the derived class. An example can be found in the sample code below. RESOLUTIONDo not use the /GX switch when attempting to use the base class operator delete. -or-Implement an operator delete in the derived class that calls the base class operator delete. STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This bug has been fixed in Visual Studio
97 Service Pack 3.
Q170365 INFO: Visual Studio 97 Service Packs - What, Where, and Why MORE INFORMATIONThe following two samples cause an internal compiler error when built with the compiler's /GX switch. The second sample shows how this can occur when using MFC. Sample 1
Sample 2
Additional query words: ICE
Keywords : kbcode kberrmsg kbCompiler kbCPPonly kbVC kbVC500bug kbVS97sp3fix |
Last Reviewed: August 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |