Complexity requirements for std::deque::push_back/front
As a result of this question from a few days ago there are a few things that have been bugging me about the complexity requirements for std::deque::push_back/push_front vs the actual std::deque implementations out in the wild. The upshot of the previous question was that these operations are required to have O(1) worst case complexity. I verified that this was indeed the case in c++11 : from 23.3.3.4 deque modifiers, refering to insert, push/emplace front/back Complexity: The complexity is linear in the number of elements inserted plus the lesser of the distances to the beginning and end of