Let's say I have some kind of collection, and I got an iterator to get started. Now let me say that I modified the collection. Can I use an iterator safely, regardless of the type of collection or iterator?
To avoid confusion, here is the order of operations I'm talking about:
- Get the iterator of the collection.
- Change the collection (obviously not the element in it, but the collection itself).
- Use the iterator obtained in step 1. Is it valid according to the STL standard ?!
c ++ iterator stl containers
user88637 Jul 25 '10 at 16:17 2010-07-25 16:17
source share