Article ID: 130546
Article Last Modified on 7/5/2005
int* p; / ... p->int::~int();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.
// Compile options needed: none
template<class Item>
class classX {
public:
void funcX();
Item* cpR;
};
template<class Item>
void classX<Item>::funcX() {
cpR->Item::~Item();
};
template classX<int>;
129132 BUG: Can't Use Simple Type in Explicit Call of a Destructor
130547 BUG: C2300 on Explicit Destructor Call in Class Template
Additional query words: 9.00 9.10 Intrinsic
Keywords: kbbug kbfix kbvc400fix kbcpponly kbcompiler KB130546