I believe this should give you a good test:
if (iterator._Mycont == &MyContainer) { Probably a valid iterator! }
You can do tests to make sure the iterator is not equal to the end ...
iterator != MyContainer.end()
and
iterator >= MyContainer.begin()
John Jun 04 '09 at 18:28 2009-06-04 18:28
source share