Re: [boost] [multi_index] iterator invalidation of ordered_indezes after erase?

Hi Oliver, Kowalke Oliver (QD IT PA AS) escribió:
Hello, become iterators of an ordered_non_unique index invalidated if I call:
iterator erase(iterator position)?
Or are all other iterators still valid and point to the same item as before?
All iterators except those pointing to the deleted element will remain valid and pointing to whatever they were pointing before deletion. This is true of all types of indices, not only ordered ones. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

joaquin@tid.es wrote:
Hi Oliver,
Kowalke Oliver (QD IT PA AS) escribió:
Hello, become iterators of an ordered_non_unique index invalidated if I call:
iterator erase(iterator position)?
Or are all other iterators still valid and point to the same item as before?
All iterators except those pointing to the deleted element will remain valid and pointing to whatever they were pointing before deletion. This is true of all types of indices, not only ordered ones.
Even for random_access_index?

Andrey Semashev escribió:
joaquin@tid.es wrote:
All iterators except those pointing to the deleted element will remain valid and pointing to whatever they were pointing before deletion. This is true of all types of indices, not only ordered ones.
Even for random_access_index?
Even for that: see http://boost.org/doc/libs/1_35_0/libs/multi_index/doc/tutorial/indices.html#... Best, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
participants (2)
-
Andrey Semashev
-
joaquin@tid.es