• Advertisement
Sign in to follow this  

STL - checking if iterators are valid?

This topic is 4619 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Nope, although I've heard that some implementations like STLport offers such functoianlity as an extension during debug builds.

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
Sign in to follow this  

  • Advertisement