title: Why are by-value parameters excluded from NRVO?
body: <p>Imagine:</p>
  
  <pre><code>S f(S a) {
    return a;
  }
  </code></pre>
  
  <p>Why is it not allowed to alias <code>a</code> and the return value slot?</p>
  
  <pre><code>S s = f(t);
  S s = t; // can't generally transform it to this :(
  </code></pre>
  
  <p>The spec doesn't allow this transformation if the copy constructor of <code>S</code> has side effects. Instead, it requires at least two copies (one from <code>t</code> to <code>a</code>, and one from <code>a</code> to the return value, and another from the return value to <code>s</code>, and only that last one can be elided. Note that I wrote <code>= t</code> above to represent the fact of a copy of <code>t</code> to f's <code>a</code>, the only copy which would still be mandatory in the presence of side effects of move/copy constructor).</p>
  
  <p>Why is that?</p>