title: What is the most effective way to move items within a vector?
body: <p>I've seen some special cases where <code>std::rotate</code> could be used or a combination with one of the search algorithms but generally: when one has a vector of N items and wants to code function like:</p>
  
  <pre><code>void move( int from, int count, int to, std::vector&lt;int&gt;&amp; numbers );
  </code></pre>
  
  <p>I've been thinking about creation of a new vector + <code>std::copy</code> or combination of insert/erase but I can't say I ended up with some nice and elegant solution.</p>