Boost logo

Boost Users :

From: boost_at_[hidden]
Date: 2007-08-04 08:39:24


On Fri, Jul 27, 2007 at 01:00:35PM +0200, Joaqu?n M? L?pez Mu?oz wrote:
> 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?

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_at_[hidden]
> 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/

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