Using std::move() when returning a value from a function to avoid to copy
<p>Consider a type T supporting the default move semantics. Also consider the function below:</p>

<pre><code>T f() {
   T t;
   return t;
}

T o = f();
</code></pre>

<p>In the old C++03, some non-optimal compilers might call the copy constructor twice, one for the "return object" and one for <code>o</code>.</p>

<p>In c++11, since <code>t</code> inside <code>f()</code> is an lvalue, those compilers might call the copy constructor one time as before, and then call the move constructor for o.</p>

<p>Is it correct to state that the only way to avoid the first "extra copy" is to move <code>t</code> when  returning?</p>

<pre><code>T f() {
   T t;
   return std::move(t);
}
</code></pre>
