title: Is it possible to improve code performance by using reserve() before moving a vector with a bigger size into a vector with a smaller capacity?
body: <p>sorry in advance if this question is quite incomplete, unclear or a duplicate (it's my first one here). While studying move semantics and working on a small project for my OOP course I stumbled upon a question that I can't answer myself. As far as I know std::move() works by converting l-values into r values, but let's suppose we were moving a vector with a lot of elements into a second vector that has a capacity of 1. Could I use reserve() to avoid 
   a lot of automatic memory re-allocations of the second vector or would using reserve() have no effect due to std::move() moving r-values into the second vector? A simple realization of my question can be found below.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;algorithm&gt;
  int main() {
      std::vector&lt;int&gt; first (1000000);
      std::vector&lt;int&gt; second (1);
      std::fill(first.begin(),first.end(),7);
      second.reserve(1000000);//is this needed??
      second=std::move(first);
      return 0;
  }
  </code></pre>