• Advertisement
Sign in to follow this  

List iterator question

This topic is 3818 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

Does list iterator remain valid after some insertion or deletion operations on the list?

Share this post


Link to post
Share on other sites
Advertisement
In std::list, an iterator becomes invalidated if the object it refers to is erased. Otherwise the iterator remains valid.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement