7 Sep
2012
7 Sep
'12
6:17 a.m.
2012/9/6 Chris Stankevitz
Hello,
Does boost provide a replacement for std::ostringstream? If so, can you please tell me the name so I can read the docs on it? The first thing I am going to read is whether or not such a best would provide "reserve". I would like to do this:
//-----
std::ostringstream Stream;
// Stream.reserve(99999); // error: std::ostringstream does not provide reserve
Stream.write(pBuffer, 99999);
You could use filtering_ostream with underlying vector and reserve() on that vector. Take a look at the very bottom of "container_sink" in Tutorials section for usage example. -- Szymon Gatner The Lordz Games Studio www.thelordzgamesstudio.com