Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2003-06-26 14:25:46


On 26 Jun 2003 18:20:27 +0200, Claus Tondering wrote
> If I include "boost/date_time/posix_time/posix_time.hpp" in a file
> and compile the file using the Gnu C++ compiler, everything works fine.
>
> But if I compile the file using Miscrosoft Visual C++, I get this
> error message from the lexical_cast.hpp file:
>
> ...\boost\lexical_cast.hpp(147): error C2678: binary '<<' : no
> operator found which takes a left-hand operand of type
> 'std::basic_stringstream<_Elem,_Traits,_Alloc>' (or there is no
> acceptable conversion)
> with
> [
> _Elem=wchar_t,
> _Traits=std::char_traits<wchar_t>,
> _Alloc=std::allocator<wchar_t>
> ]
>
> The offending line in lexical_cast.hpp contains this function:
> bool operator<<(const Source &input)
> {
> return stream << input;
> }
>
> What am I doing wrong?

I believe this is an issue with the 1.30 version of lexical cast. Basically
you need to upgrade to the CVS version of lexical_cast.hpp to fix this.

Jeff


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net