Why is passing by value (if a copy is needed) recommended in C++11 if a const reference only costs a single copy as well? : <p>I am trying to understand move semantics, rvalue references, <code>std::move</code>, etc. I have been trying to figure out, by searching through various questions on this site, why passing a <code>const std::string &amp;name</code> + <code>_name(name)</code> is less recommended than a <code>std::string name</code> + <code>_name(std::move(name))</code> if a copy is needed.</p>

<p>If I understand correctly, the following requires a single copy (through the constructor) plus a move (from the temporary to the member):</p>

<pre><code>Dog::Dog(std::string name) : _name(std::move(name)) {}
</code></pre>

<p>The alternative (and old-fashioned) way is to pass it by reference and copy it (from the reference to the member):</p>

<pre><code>Dog::Dog(const std::string &amp;name) : _name(name) {}
</code></pre>

<p>If the first method requires a copy and move both, and the second method only requires a single copy, how can the first method be preferred and, in some cases, faster?</p>
