The information in this article applies to:
SYMPTOMSCompiling a program that includes a class template that makes an explicit reference to the destructor of the template argument <type_name> generates the following errors if the class template is instantiated with a simple type:
RESOLUTIONThe Annotated C++ Reference Manual (Jan '94), section 12.4 contains the following example:
But this syntax is not supported by Visual C++, even through a typeddef or
template type. The only workaround is to remove the explicit call to the
destructor.
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 4.0. MORE INFORMATIONSample Code to Demonstrate Problem
REFERENCESFor more information, please see the following articles in the Microsoft Knowledge Base: Q129132 BUG: Can't Use Simple Type in Explicit Call of a Destructor Q130547 BUG: C2300 on Explicit Destructor Call in Class Template Additional query words: 9.00 9.10 Intrinsic
Keywords : kbCompiler kbCPPonly kbVC kbVC400fix |
Last Reviewed: January 31, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |