The problem I see is I don't know if C++ would know how to convert a
container<X> to a container<Y>. Even if C++ can switch between X and Y
without thinking, you're not working with X and Y, but container<X>
and <Y>.
But, as I said, C++ might not have a problem switching between X and
Y. What if you copy the contents of a std::vector<Derived*> to a
std::vector<Base*>? (And I DON'T mean std::vector<Base*> a = b, but
for the elements in b, assign to a.)
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


|