Boost logo

Boost Users :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2007-07-27 07:00:35


Hello Pedro,

boost_at_[hidden] ha escrito:

> Hi
>
> I was using multi_index nicely and then I wondered that although
> iterators are not invalidated when calling replace or modify, could it
> be that if I'm modifying inside a loop then incrementing the iterator no
> longer makes it iterate through all elements because of the index
> reordering?

Your concern is correct, modifying a range can be a tricky business
due to the reordering of elements. Please take a look at the following
discussion of the problem:

http://lists.boost.org/boost-users/2006/03/18048.php

which also provides some attached code you can try (look for
jeff.cpp). Does this solve your problem?

Thank you for using Boost.MultiIndex,

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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net