M
Massimiliano Alberti
Can I specialize a template function in a subclass without overriding
it? (the main template function is defined in a base class).
Now I'm doing something like that:
(in base class)
template<class X>
void myfunc(X par1) { }
(in derived class)
template<class X>
void myfunc(X par1) { baseClass::myfunc(par1); } // where baseClass
is a typedef with the name of the baseclass
void myfunc(AClass par1) { }
If I take away the template redefinition (the first block of the
derived class) then I can't use the base template without directly
referencing to it (I need to be able to do myfunc(something), not
baseClass::myfunc(something))
(oh... yes... if you want to know what compiler I'm using, I'm using
VC .NET 7.1)
--- bye
it? (the main template function is defined in a base class).
Now I'm doing something like that:
(in base class)
template<class X>
void myfunc(X par1) { }
(in derived class)
template<class X>
void myfunc(X par1) { baseClass::myfunc(par1); } // where baseClass
is a typedef with the name of the baseclass
void myfunc(AClass par1) { }
If I take away the template redefinition (the first block of the
derived class) then I can't use the base template without directly
referencing to it (I need to be able to do myfunc(something), not
baseClass::myfunc(something))
(oh... yes... if you want to know what compiler I'm using, I'm using
VC .NET 7.1)
--- bye