I\'ve a basic template class, but I\'d like to restrain the type of the specialisation to a set of classes or types. e.g.:
template
class
Im not sure about this, but you could add another template specialization for double template
class MyClass
{
.../...
private:
T* _p;
};
template class MyClass
{};
which would work for your example, but not for the general case.
In general, I would add a compile assert to check for unwanted types.
Hope it helps.