Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementation of a "smart" linked list.
With a standard linked list, iterators are never invalidated unless they point to an element that was erased (or the list is destroyed). This implementation takes that one step further and never invalidates iterators (unless the list is destroyed). From the perspective of the list, erased elements no longer exist, but an iterator that still points to an erased element can be dereferenced, incremented, and decremented. I was having trouble implementing this based on STL and Boost, so I went ahead and coded this from scratch. The standard list interface is implemented, aside from assignment (since I could not reconcile assignment with the goal of not invalidating iterators).
- Loading branch information