title: Use an Anonymous Stringstream to Construct a String
body: <p>I want to read directly into a string with code like this:</p>
  
  <pre><code>std::string myString(( std::ostringstream() &lt;&lt; myInt &lt;&lt; " "
                                              &lt;&lt; myFloat &lt;&lt; " "
                                              &lt;&lt; std::boolalpha &lt;&lt; myBool ).str());
  </code></pre>
  
  <p>But VS2012 is giving me a complaint that <code>basic_ostream</code> doesn't have an <code>str()</code> method.</p>
  
  <p>Is there a way to do this with an anonymous stringstream?</p>