Boost logo

Boost :

From: John Maddock (jm_at_[hidden])
Date: 2003-03-18 07:01:43

OK, here's chapter and verse on how the config macros are supposed to work:

BOOST_NO_STRINGSTREAM: implies that std::stringstream is not available, when
not defined does not imply that new style (or wide character) streams are

BOOST_NO_INTRINSIC_WCHAR_T: whcar_t is either not defined, or is a typedef,
if it's typedef we can still use wide character streams - check for
BOOST_NO_CWCHAR to see if whar_t is present or not (and include cwchar in
case it's a typedef).

BOOST_NO_STD_LOCALE: defined if there is no std::locale and hence no new
style streams.

So I think the initial check should be:

#if defined(BOOST_NO_STRINGSTREAM) || \
  defined(BOOST_NO_STD_WSTRING) || \
  defined(BOOST_NO_STD_LOCALE) || \

# include <cwchar>

and then at the end we need:

std::strstream stream;
#elif defined(BOOST_NO_STD_LOCALE)
std::stringstream stream;
std::basic_stringstream<char_type> stream;

I don't have gcc 2.95 available to test with though: and frankly this may be
too big a change at this stage, hope this helps though...


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