NickNick/astrant-extensions — pull request #2 by sgielen (2013-09-23 21:49:15+00:00)
Title: Add index_container: a container that has amortized O(1) push_back, push...

..._front and random access, and guarantees that its older indices will stay the same. Deletion is not yet implemented, as well as random insertions.

This container is useful if you want to permanently refer to elements in the index_container, while still being able to push_front elements into it. It works by only doing push_backs to an internal vector, and keeping a deque of iterators to keep the actual order stable.
Some TODO's as of this commit:
* iterators
* deletion of elements while keeping further guarantees
* documentation
* tests
* further API additions that make this container as close to STL API as possible