As a vector, a deque supports random access iterators. But in addition to the vector, which only allows constant time insert and erase operations at the end, a deque supports the constant time execution of these operations at the end as well as at the beginning. Insert and erase in the middle take constant time.
Because of these constant insert and erase operations at the beginning, a deque provides the member functions push_front and pop_front. Note, that insert, push, erase and pop invalidate all the iterators and references to the deque.
Further information concerning the deque can be found in , 8.1.3.
Continue with section 5.5
Back to index
Johannes Weidl (J.Weidl@infosys.tuwien.ac.at) - Apr 16, 1996