title: C++11 rvalues and move semantics confusion (return statement)
body: <p>I'm trying to understand rvalue references and move semantics of C++11.</p>
  <p>What is the difference between these examples, and which of them is going to do no vector copy?</p>
  <h2>First example</h2>
  <pre><code>std::vector&lt;int&gt; return_vector(void)
  {
      std::vector&lt;int&gt; tmp {1,2,3,4,5};
      return tmp;
  }
  
  std::vector&lt;int&gt; &amp;&amp;rval_ref = return_vector();
  </code></pre>
  <h2>Second example</h2>
  <pre><code>std::vector&lt;int&gt;&amp;&amp; return_vector(void)
  {
      std::vector&lt;int&gt; tmp {1,2,3,4,5};
      return std::move(tmp);
  }
  
  std::vector&lt;int&gt; &amp;&amp;rval_ref = return_vector();
  </code></pre>
  <h2>Third example</h2>
  <pre><code>std::vector&lt;int&gt; return_vector(void)
  {
      std::vector&lt;int&gt; tmp {1,2,3,4,5};
      return std::move(tmp);
  }
  
  std::vector&lt;int&gt; &amp;&amp;rval_ref = return_vector();
  </code></pre>