Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2005-08-29 12:17:03


Jeff,

I've been playing with date_time to try and get it to do the right thing
with VC++ when /Zc:wchar_t is *not* specified, and I've come up with a list
of questions for you if you don't mind :-)

1) What's the meaning of USE_DATE_TIME_PRE_1_33_FACET_IO? Without it the
testtime_wstream.cpp test case fails even with /Zc:wchar_t, this is a source
of confusion if you're building the building the tests in your IDE for
whatever reason.

2) Without USE_DATE_TIME_PRE_1_33_FACET_IO the testgrep_wstream.cpp test
doesn't compile irrespective of the /Zc:wchar_t option:

testgreg_wstream.cpp
c:\data\boost\develop\boost\boost\date_time\date_facet.hpp(640) : error
C2678: binary '+' : no operator found which takes a left-hand operand of
type 'const char [35]' (or there is no acceptable conversion)
c:\data\boost\develop\boost\boost\date_time\date_facet.hpp(606) : while
compiling class-template member function
'std::istreambuf_iterator<_Elem,_Traits>
boost::date_time::date_input_facet<date_type,CharT>::get(InItrT &,InItrT
&,std::ios_base
&,boost::date_time::date_input_facet<date_type,CharT>::duration_type &)
const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits<wchar_t>,
date_type=boost::gregorian::date,
CharT=wchar_t,
InItrT=std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>
]
c:\data\boost\develop\boost\boost\date_time\gregorian\gregorian_io.hpp(78) :
see reference to class template instantiation
'boost::date_time::date_input_facet<date_type,CharT>' being compiled
with
[
date_type=boost::gregorian::date,
CharT=wchar_t
]
c:\data\boost\develop\boost\libs\date_time\test\gregorian\testgreg_wstream.cpp(50)
: see reference to function template instantiation
'std::basic_istream<_Elem,_Traits> &boost::gregorian::operator
>><wchar_t,std::char_traits<wchar_t>>(std::basic_istream<_Elem,_Traits>
&,boost::gregorian::date &)' being compiled
with
[
_Elem=wchar_t,
_Traits=std::char_traits<wchar_t>
]

3) Finally there are a lot of places where an unsigned short is written to
or read from a stream: unfortunately the dinkumware lib treats these "as if"
they were a wide character value, rather than an integer. Casting to
unsigned int in these cases would fix that, but it's a horrid cludge, and I
don't know what you might think about that!

Thanks,

John.


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