----- Mensaje original -----
De: Jeff Holle
The two code snippets were not equivalent because I was only using the iterator returned from the multi_index container's erase method in the one using YIndex::iterators. I have found that this iterator doesn't point to an element in the container. Instead its pointing to some memory that is zeroed. Prior to erasing the element I inserted some test code that looks though the entire container and doesn't find such an element. Given my constructor, this only makes sense.
Do you have an explanation?
Banning a bug in B.MI, the only plausible explanation is that this weird-behaving iterator is index.end(), which is not dereferenceable. This is the expected return value of erase() when the element erased is the last one in the index. Can you verify this hypothesis? Thank you! Joaquín M López Muñoz Telefónica, Investigación y Desarrollo