Hi,
I am having problems with inheritance in templates classes. Say I
have the following classes:
class A {};
class B: public A {};
template<typena me Tclass C {};
Now in my code I have something like:
C<A **myAPtr;
myAPtr = new C<B *>();
I'm getting an error saying that conversion from C<B *to C<A *is
not possible. Does it mean I can no use subclassing with templates
without using ugly casts?
Thanks,
Isaac
I am having problems with inheritance in templates classes. Say I
have the following classes:
class A {};
class B: public A {};
template<typena me Tclass C {};
Now in my code I have something like:
C<A **myAPtr;
myAPtr = new C<B *>();
I'm getting an error saying that conversion from C<B *to C<A *is
not possible. Does it mean I can no use subclassing with templates
without using ugly casts?
Thanks,
Isaac
Comment