Confusion on iterators invalidation in deque
问题 I'm bit confused regarding iterator invalidation in deque. (In the context of this question) Following is the excerpts from -- The C++ Standard Library: A Tutorial and Reference, By Nicolai M. Josuttis Any insertion or deletion of elements other than at the beginning or end invalidates all pointers, references, and iterators that refer to elements of the deque. Following is the excerpts from SGI site: The semantics of iterator invalidation for deque is as follows. Insert (including push_front