Sign in to follow this  
fyhuang

STL - checking if iterators are valid?

Recommended Posts

Hello, I have a question about STL iterators - is it possible to check whether STL iterators (i.e. std::list< int >::iterator) are still valid? In other words, is it possible to check if the item that the iterator points to has been removed/deleted yet? Thanks in advance!

Share this post


Link to post
Share on other sites
Quote:
Original post by DigitalDelusion
Nope, although I've heard that some implementations like STLport offers such functoianlity as an extension during debug builds.


Check out this. Tried it a little myself, but not for anything serious, but I'm very impressed. Looks like a very powerful addition to help debugging.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this