On Fri, Jul 27, 2007 at 01:00:35PM +0200, Joaqu?n M? L?pez Mu?oz wrote:
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?
Yes, very mucho so. Perhaps it will be nice to have this in the docs.
Thank you for using Boost.MultiIndex,
Thank you for writting it and making it open source. Regards.
Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Pedro Larroy Tovar, pedro at larroy dot com | http://pedro.larroy.com/ * Las patentes de programación son nocivas para la innovación * http://proinnova.hispalinux.es/