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);
}
请参阅代码中的注释以了解我正在尝试做的事情。