title: inserting element to a sorted vector and keeping elements sorted
body: <p>So I have a vector, and I want the elements to be sorted at all times. How should I go about inserting an element into that vector and keeping the elements sorted when I pop them out. I looked into <code>std::lower_bound</code>, however, that gave the opposite of what I wanted. </p>
  
  <p>For example, this is what I want: When I pop all the elements in the vector it should be:
  1 2 3 4 5. That means the vector has to store them as 5 4 3 2 1. If use lower bound, the vector stores them as 1 2 3 4 5, and it is popped as 5 4 3 2 1. Also, a compare functor is going to be passed in so that the <code>lower_bound</code> function uses the compare functor. Is there a way to take the opposite of a compare functor?</p>