----- Mensaje original -----
De: Stuart Dootson
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