Original Post
Okey, I am wondering is there a way to use template classes as interfaces or do templates complitely destroy polymorphism while deriving new classes from the interface class with a specified type.
Consider this
[edited by - EvilTachikoma on October 28, 2002 7:44:10 AM]
template <class T>
class IBaseA
{
// pure virtual stuff here
}
class A1 : IBaseA <type1>
{
// methods for doing stuff with type1 here
}
class A2 : IBaseB <type2>
{
// methods for doing stuff with type2 here
}
/* Is there a way to write this fuction so that it can deal with
derived classes with a specified type ? */
void DealWithIBaseA(IBaseA &a)
{
a.DoStuff()
}