Boost logo

Boost Users :

From: Stuart Dootson (stuart.dootson_at_[hidden])
Date: 2005-08-09 07:26:45


On 8/9/05, JOAQUIN LOPEZ MU?Z <joaquin_at_[hidden]> wrote:
> ----- Mensaje original -----
> De: Stuart Dootson <stuart.dootson_at_[hidden]>
> Fecha: Martes, Agosto 9, 2005 11:01 am
> Asunto: [Boost-users] [multi_index] - iterator validity?
>
> > Hi - I've just started using multi_index. I'm wondering - does
> > multi_index satisfy the same iterator validity constraints as the
> > standard associative containers, i.e:
> >
> > The insert members shall not affect the validity of iterators and
> > references to the container, and the erase members shall invalidate
> > only iterators and references to the erased elements.
> >
> > I *have* looked in the documentation, but haven't been able to find
> > anything which tells me.
> >
>
> This guarantee (stability) is held for all types of indices
> --ordered, sequenced and hashed (the last case is not so obvious, as
> TR1 does not require hashed containers to be stable.)
>
> There is no statement on the docs ensuring that
> multi_index_containers are stable because this is not a property
> of the container, but rather of each particular type of
> index: conceivably, a future index type may not guarantee
> stability for whatever reason, though currently this is not the
> case.
> So, you can see stability is referred to in the reference
> section of each type of index. For instance, for ordered indices
> stability is (succintly) stated in
>
> http://boost.org/libs/multi_index/doc/reference/ord_indices.html#ord_in
> dices
>
> Does this clear things up for you?
>
> Best,
>
> Joaquín M López Muñoz
> Telefónica, Investigación y Desarrollo
>

Thanks - that's exactly what I wanted. Just one thing - this statement
doesn't appear to be made generally for sequenced indices, just for
certain methods (that's in the 1.33 RC2 documentation).

Stuart Dootson


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