Boost logo

Boost :

From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2003-03-17 15:40:20


>From: "Gennaro Prota" <gennaro_prota_at_[hidden]>

> On Mon, 17 Mar 2003 14:47:20 +0300, Vladimir Prus <ghost_at_[hidden]>
> wrote:
>
> >Gennaro Prota wrote:
> >
> >>>Ok. I've forwarded this to Kevlin.
> >>
> >> Maybe there's more than one problem here. I see that Vladimir talks
> >> about warnings while Jeff about errors. Also maybe it helps to see the
> >> exact condition to define BOOST_NO_STRINGSTREAM in
> >> config/stdlib/sgi.hpp, with the comment therein? Just trying to lend a
> >> hand...
> >
> >I'm sorry, "warning" in my post is typo. It should have been "error", and
> >the error message is precisely the same as previously reported. I just
> >wanted to note that lexical_cast was not broken with gcc 2.95.4 until
> >recently.
>
> Ok. That compiler has always used the new <sstream> header. I think
> the problem is that while the old lexical_cast just used
> std::stringstream the new version uses the more general
> std::basic_stringstream<>.

Aha. I think this may be the key. Thanks a lot. :) I was really wondering
what the heck was different. :)

Well, I think this reinforces the suggestion to define BOOST_NO_STRINGSTREAM
for 2.95.x. Comments?

Either that, or to have some way to detect where std::basic_stringstream<>
is not supported, and turn off wide character support for that, in
lexical_cast. Currently, it disables wide character support if one of the
following macros are set:

BOOST_NO_STRINGSTREAM
BOOST_NO_STD_WSTRING
BOOST_NO_INTRINSIC_WCHAR_T

even though it may work partially or fully with wide characters, despite one
of these set. For example, Intel C++ 7.0 on Windows has intrinsic wchar_t,
and passes all the lexical_cast tests, but as the intrinsic characters have
to be turned on with a switch (for compatibility with MSVC 6/7), and there
appears to be no macro to detect the switch, the config sets
BOOST_NO_INTRINSIC_WCHAR_T.

Regards,

Terje


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk