Compiler Error C2897

'Declaration' : destructors cannot be templates

You cannot declare a destructor as a template. This is because destructors of a normal class cannot be overloaded. Defining a destructor as a template is the same as defining a set of destructors. Therefore, it is illegal. For example,

class X {
public:
   template<typename T> ~X() {...} //Error
};