title: What should I use instead of std::ostrstream?
body: <p>I like to use <a href="http://en.cppreference.com/w/cpp/io/ostrstream" rel="noreferrer"><code>std::ostrstream</code></a> to format text but not print it to stdout but instead write it into an <code>std::string</code> (by accessing the <code>std::ostrstream::str()</code> member). Apparently this is <em>deprecated</em> now. So, how am I supposed to write formatted objects to a string, with the same convenience as when writing to a stream?</p>