Boost logo

Boost :

From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2005-12-12 16:59:11


On 12/12/05, Michael Goldshteyn <mgoldshteyn_at_[hidden]> wrote:
>
>
> // 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);

According to the docs:

http://boost.org/libs/ptr_container/doc/ptr_sequence_adapter.html#pointer-container-requirements

"You cannot use transfer() to move elements between two different types of
> containers. This is to avoid problems with different allocators. The
> requirement might be weakened in the future."
>

--
Caleb Epstein
caleb dot epstein at gmail dot com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk