Hacker News new | past | comments | ask | show | jobs | submit login

Having list iterators carry a field pointing to their container wouldn't help you determine the number of objects between two iterators when you splice, which is what you need in order to maintain the object count.

Storing an index in the iterator would not be a solution either. That would mean updating the index in all the existing iterators when you insert an object in the list.




Of course. Thanks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: