
Hi again,
Imho easiest to adopt would be Hinant's implementation:
replying to myself, I know, but wanted to share ;) Just played with modified Hinant's and Ion's (sorry for not crediting earlier just noticed your name in copyright's info) and it all seems to work properly. My simple test code: int main() { using namespace boost; // Foo is marked MOVABE_BUT_NOT_COPYABLE unique_ptr<Foo> f1(new Foo), f2(new Foo), f3(new Foo); container::vector<unique_ptr<Foo> > foos1, foos2; // moving from named pointers foos1.push_back(move(f1)); foos1.push_back(move(f2)); foos1.push_back(move(f3)); // move() algorithm tested along with moving back_inserter move(foos1.begin(), foos1.end(), back_move_inserter(foos2)); std::cin.get(); } Attaching tested code. Regards, Simon