Is it possible for a specialized version of a class to share some or all functionalities of the original template class?
i.e. consider there is a template class,
template <typename T>
class A
{
A()
{}
A(const A& ref)
{}
void f1()
{
//do something
}
void f2()
{
//do something
}
void f3()
{
//do something
}
}
and it has a specialized version for a specific datatype, which only intend to add some addition functionalities to the generic version in addition the original generic functionalities.
template<>
class A<int>
{
void f4()
{
//do something
}
}
now what I specifically want is that this specialized version to be sharing everything from its generic version including the constructors if possible.