How can I get the same strstream functionality now that's deprecated?
<p>I use to write code like this:</p>

<pre><code>void fun(char *buff, unsigned size)
{
    std::strstream str(buff, size);
    str &lt;&lt; "hello world: " &lt;&lt; 5;
}
</code></pre>

<p>so I can use stream output over an arbitrary buffer. I've found this technique both efficient (no allocations) and useful (streams!). Now that std::strstream is deprecated, how can I get the same speed+flexibility that I can get with this code? </p>
