title: Binary operator-overloading string-class for primitives
body: <p>I have one simple qusetion about the std::string class.</p>
  
  <p>Why isn't + overloaded for primitives so that strings easily can be concatenated?</p>
  
  <p>For instance - if I have a double</p>
  
  <pre><code>double d = 1000.5:
  </code></pre>
  
  <p>And a string</p>
  
  <pre><code>std::string s = "my value is ";
  </code></pre>
  
  <p>And I want to concatenate this string with the double in an easy manner</p>
  
  <pre><code>s = s + d;
  </code></pre>
  
  <p>And the result should be:</p>
  
  <pre><code>my value is 1000.5
  </code></pre>
  
  <p>This is easily made in languages such as Java</p>
  
  <pre><code>public static void main (String[] args) {
      double d = 1000.5;
      String s = "my Value is ";
      s += d;
      System.out.println(s);
  }
  </code></pre>
  
  <p>Instead this is an example of how to do it in c++</p>
  
  <pre><code>int main() {
     double d = 1000.5;
     std::ostringstream strs;
     strs &lt;&lt; d;
     std::string s = "My value is " + strs.str();
     cout &lt;&lt; s;
  
     return 0;
  }
  </code></pre>
  
  <p>Its not complicated but it would be much simpler if concatenation in the "java-way" was allowed. </p>