Boost logo

Boost :

From: Samuel Krempp (krempp_at_[hidden])
Date: 2004-05-23 09:50:18

On Sun, 2004-05-23 at 12:30, Gennadiy Rozental wrote:
> Hi,
> I finished anothher round of modification in wrap_stringstream makeing it
> more generic (actually it now template basic_wrap_stringstream and
> specializations). Is there still interest in putting it uner boost/utility
> and do we need a fast review for it? If yes I will prepare doc page.

among the libraries currently in boost, stringstreams are used by :

-test_tools, using wrap_stringstream

- math/quaternion.hpp and octonions, and date_time. It seems those use
stringstreams but could use wrap_stringstream just as well

- spirit which does its own wrapping of str/string stream (at first
glance it looks as if it could use wrap_stringstream instead)

-lexical_cast, which handles internally either strstreams or
stringstreams. I think it could also use wrap_stringstream.

- boost::format. stringstreams are in fact a performance bottleneck for
format, and I wrote an alternative stringstream class supporting most
platforms, to overcome std::stringstream limitations (making it possible
to reuse stringbufs, and the likes). BTW I'm also asking for opinions on
the status to give to this class, see

It seems to me most libraries that need stringstream features only use
the basic interface (operator<< and then str() ) and could just as well
use wrap_stringstream.

About the code :
I'm wondering, why have the str() function return a const-reference to
string rather than a value, like stringstream does ?


Boost list run by bdawes at, gregod at, cpdaniel at, john at