title: C++ return by reference multiple times
body: <p>I have been using return by reference to try to speed up my code and avoid multiple expensive copy operations.</p>
  
  <p>I have an access member function that looks like this:</p>
  
  <pre><code>    std::string const&amp; access_element(int index) const;
  </code></pre>
  
  <p>If I have another member function that calls access_element(), do I need to also return that by reference?</p>
  
  <p>For instance.</p>
  
  <pre><code>    float const&amp; access_element2(int index) const {
         return atof(access_element(index));
      }
  </code></pre>
  
  <p>versus</p>
  
  <pre><code>    float access_element2(int index) {
         return atof(access_element(index));
      }
  </code></pre>