class BaseA
{
}
class B : public BaseA
{
}
template <class T>
class C : public vector<T>
{
}
void someFunction (void)
{
C<B> myClass;
// I can't seem to do this...is it not possible?
vector<BaseA> converted = ((vector<BaseA>) myClass);
}
See comment in code for what I am trying to do.
A vector of B isn’t a vector of A even if B is an A (I assume a mixup between A and BaseA)
Try
which is probably what you want to express.
(BTW inheriting from vector is bad idea in general, it isn’t designed for that.)