title: Do arguments get copied if they're stored
body: <p>Are arguments copied if they are stored in the following cases</p>
  
  <p>Literal string passed:</p>
  
  <pre><code>std::string globalStr;
  void store(const std::string &amp;str)
  {
      globalStr = str;
  }
  store("Literal");
  </code></pre>
  
  <p>Variable string passed:</p>
  
  <pre><code>std::string globalStr;
  void store(const std::string &amp;str)
  {
      globalStr = str;
  }
  store(varStr);
  </code></pre>
  
  <p>And what if globalStr stores reference</p>
  
  <pre><code>std::string &amp;globalStr;
  void store(const std::string &amp;str)
  {
      globalStr = str;
  }
  store("Literal"); //Should this cause any problem?
  store(varStr);
  </code></pre>
  
  <p>Does C++ optimize to prevent making unnecessary copies in any of the above cases?</p>