Boost logo

Boost :

From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2003-03-19 03:13:43


>From: "Beman Dawes" <bdawes_at_[hidden]>

> A fresh version of the Win32 regression tests has just been posted. See
> http://boost.sourceforge.net/regression-logs/cs-win32-RC_1_30_0-diff.html
>
> There are seven new fails in date_time tests; presumably all caused by
> lexical_cast.hpp problems. See typical error message below.

I see that all of the new failing tests are on MSVC 6, and it seems the
errors is due to allowing wide character support on MSVC 6. In the Date/Time
tests there are calls such as lexical_cast<unsigned short>(<std::string>),
which lexical_cast on MSVC 6 interprets as trying to convert from
std::string to wchar_t. This also fails in the lexical_cast unit test for
MSVC 6.

Ok, it seems we may have to exclude wide character support for lexical_cast
on MSVC 6, to avoid breaking Date/Time. I suggest something like:

#if defined(BOOST_NO_STRINGSTREAM) || \
    defined(BOOST_NO_STD_WSTRING) || \
    defined(BOOST_NO_STD_LOCALE) || \
    defined(BOOST_NO_CWCHAR) || \
    defined(BOOST_MSVC) && (BOOST_MSVC <= 1200)
#define DISABLE_WIDE_CHAR_SUPPORT
#endif

(Testing for BOOST_NO_INTRINSIC_WCHAR_T, instead, would also disable wide
character support on Intel C++ (on Windows), which does work with
lexical_cast)

I've tested this with Date/Time's testclock.cpp (one of the failing tests)
on MSVC 6 and Intel C++ 7, and it now works.

On the plus side, it appears to now work on g++ 2.95.

Regards,

Terje


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