Re:Range-Checks and Recklessness
by bmm6o on Sunday March 23, 2014 @04:30PM
(#7454997)
Java can do it without too much trouble, you just have a version number on the collection that gets incremented with every mutation, and the iterator just checks to see if that has changed. C++ is much more complicated, allowing patterns like map.erase(i++) being legal but similar usages not.
[ Parent
| on HN ]
There are no comments on this comment yet.