Boost logo

Boost :

From: François Dumont (francois.cppdevs_at_[hidden])
Date: 2005-05-01 14:51:47


Hello

    I think I found a configuration issue while building boost 1.32.0
with VC .Net 2003 (VC71) using STLport 5.0 beta (latest from cvs
STLPORT_5_0 branch). Maybe someone already notive this problem but the
latest boost CVS version still show it.

    With the STLport lib the macro configuration is :

- BOOST_NO_INTRINSIC_WCHAR_T defined
- BOOST_NO_STD_WSTRING _not_ defined, wstring are supported

    Thanks to the BOOST_NO_STD_WSTRING macro the date_time lib
instanciate code for wstring specific type. For instance in
libs/date_time/src/gregorian/greg_month.cpp you will find a block of
code in a #ifndef BOOST_NO_STD_WSTRING block.

    The date_time lib use the lexical_cast tool. But the lexical_cast
tool do not care about BOOST_NO_STD_WSTRING and rather check, among
other macros, BOOST_NO_INTRINSIC_WCHAR_T and so do not grant the
necessary specialization for wchar_t and wstring. The error message is
then something like:

D:\boost_1_32_0\boost/lexical_cast.hpp(137): error: no operator
"<<" matches these operands operand types are:
std::basic_stringstream<wchar_t, std::char_traits<wchar_t> ,
std::allocator<wchar_t> > << const std::basic_string<char,
std::char_traits<char> , std::allocator<char>> return stream << input;

Sorry for not having the accurate message but I have the compiler on an other computer.

I see 2 possible solutions to this problem:

- concider that there is no wstring support if there is no intrinsic wchar_t support.
- make lexical_cast less strict and do not require intrinsic wchar_t support.

Bests


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