
12 Dec
2005
12 Dec
'05
8:35 p.m.
It is my understanding that ptr_containers allow and support pointers to polymorphic types. But, the following does not appear to be possible: class Animal { }; class Cow: public Animal { }; ptr_vector<Cow> cows; ptr_vector<Animal> animals; ... // Add in some cows to the cows container ... // Transfer all cows to the animal container // Error: transfer() is not a class member function template // it expects the "from" container to be of the same types of pointers animals.transfer(animals.end(),cows.begin(),cows.end(),cows); Thanks, Mike