$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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://listarchives.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