vendredi 23 janvier 2015

Using a std::multimap, is it guaranteed that the begin() method returns the newest element?

I am a novice of C++. I was wondering: if there is some insertion-time preservation in the iterators for std::multimap (C++11) collections?


I think, that, since it's indexed by an arbitrary value, there is no guarantee that the ordering of elements from an iterator preserves insertion time, but I am working on some code that makes a different assumption, i.e. that the element returned by begin() is related to insertion order.


Aucun commentaire:

Enregistrer un commentaire