Boost logo

Boost :

Subject: Re: [boost] Question about boost::multi_index::random_access splice()
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2009-04-14 06:38:15

Michael Watkins <condenser <at>> writes:

> It appears that when calling splice() for a random_access index in a
> multi_index container, the splice calls a copy constructor. This is
> apparently by design (since the documentation says that it will do an
> insert) but why was this chosen? Is there another method to move an
> item from one container to another without having to call the copy
> constructor? Or can the code be changed to do splice the same way
> that std::list does?

Sorry, there is currently no way to have actual moving of nodes
between multi_index_containers. This design decision was made basically
in order to minimize the number of primitive operations (see ) that each index has to implement.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

Boost list run by bdawes at, gregod at, cpdaniel at, john at