title: Why can I not use the "<<" operator in a return statement?
body: <p>For instance:</p>
  
  <pre><code>std::stringstream formatMemUsage(...) {
      std::stringstream ss ...
      ...
      return ss &lt;&lt; "MB";   // Error here
  }
  </code></pre>
  
  <p>results in the the error <code>no suitable user-defined conversion from "std::basic_ostream&lt;char, std::char_traits&lt;char&gt;&gt;" to "std::stringstream" exists</code>.</p>
  
  <p>I <em>can</em> separate the return statement into 2 statements <code>ss &lt;&lt; "MB"; return ss;</code> and the error disappears - why?</p>
  
  <p>(Using MSVC++ 2010)</p>