0

I am just learning C++ and came to know that iterators shouldn't be used when container is changed as it might gets invalidated but I just want to know is there anything in C++ standard which says under what situation iterators will get invalidated?

Thanks

anonymous
  • 1,790
  • 2
  • 17
  • 28
  • See the related question [**Iterator invalidation rules**](http://stackoverflow.com/questions/6438086/iterator-invalidation-rules) – jedwards Sep 23 '13 at 18:32
  • "I just want to know is there anything in C++ standard which says under what situation iterators will get invalidated?" - It would be quite weird if there was nothing in the Standard about iterator invalidation. –  Sep 23 '13 at 18:33
  • @H2CO3: there are some very under-specified languages out there, C++ has the distinction of not being one of them ;-) – Steve Jessop Sep 23 '13 at 18:38
  • @SteveJessop Well that's true. If everything goes fine, I will enrich the world of under-specified scripting languages with my own little beloved monster within a few weeks... :P Experimental languages FTW! –  Sep 23 '13 at 18:42

0 Answers0