Hello Pedro, boost@larroy.com 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