title: Should I return an rvalue reference (by std::move'ing)?
body: <p>A <a href="http://web.archive.org/web/20140110115411/http://cpp-next.com/archive/2009/09/making-your-next-move/" rel="nofollow noreferrer">C++Next blog post</a> said that</p>
  
  <pre><code>A compute(…)
  {
      A v;
      …
      return v;
  }
  </code></pre>
  
  <p>If <code>A</code> has an accessible copy or move constructor, the compiler may choose to elide the copy.  Otherwise, if <code>A</code> has a move constructor, <code>v</code> is moved.  Otherwise, if <code>A</code> has a copy constructor, <code>v</code> is copied. 
   Otherwise, a compile time error is emitted.</p>
  
  <p>I thought I should always return the value without <code>std::move</code>
  because the compiler would be able to figure out the best choice for users.  But in another example from the blog post</p>
  
  <pre><code>Matrix operator+(Matrix&amp;&amp; temp, Matrix&amp;&amp; y)
    { temp += y; return std::move(temp); }
  </code></pre>
  
  <p>Here the <code>std::move</code> is necessary because <code>y</code> must be treated as an lvalue inside the function. </p>
  
  <p>Ah, my head almost blow up after studying this blog post. I tried my best to understand the reasoning but the more I studied, the more confused I became.  Why should we return the value with the help of <code>std::move</code>?</p>