A template class is not actually a class, until it is substantiated for a particular type. That is, it is merely a "template" for the compiler to generate multiple classes at instantiation-time. This means that when you substantiate a template class for "double" and substantiate it for "int", both instantiations will be of a different type (since they will be instances of unrelated classes).
That is different from a regular class, where all instances are of the same type.