title: std::string and multiple concatenations
body: <p>Let’s consider that snippet, and please suppose that a, b, c and d are non-empty strings.</p>
  
  <pre><code>    std::string a, b, c, d;
      d = a + b + c;
  </code></pre>
  
  <p>When computing the sum of those 3 <code>std::string</code> instances, the standard library implementations create a first temporary <code>std::string</code> object, copy in its internal buffer the concatenated buffers of <code>a</code> and <code>b</code>, then perform the same operations between the temporary string and the <code>c</code>. </p>
  
  <p>A fellow programmer was stressing that instead of this behaviour, <code>operator+(std::string, std::string)</code> could be defined to return a <code>std::string_helper</code>.</p>
  
  <p>This object’s very role would be to defer the actual concatenations to the moment where it’s casted into a <code>std::string</code>. Obviously, <code>operator+(std::string_helper, std::string)</code> would be defined to return the same helper, which would "keep in mind" the fact that it has an additional concatenation to carry out.</p>
  
  <p>Such a behavior would save the CPU cost of creating n-1 temporary objects, allocating their buffer, copying them, etc. So my question is: why doesn’t it already work like that ?I can’t think of any drawback or limitation.</p>