Hi,
I'm using Boost 1.31.0 with VC++ 7.1 and I'm having some problems converting
std::string to std::wstring and back.
Here's the code that I'm trying to get to compile:
std::wstring x = boost::lexical_caststd::wstring(
std::string("this doesn't work"));
std::string y = boost::lexical_caststd::string(
std::wstring(L"neither does this"));
The error I get for string to wstring:
lexical_cast.hpp(150): error C2679: binary '>>' : no operator found which
takes a right-hand operand of type 'std::wstring' (or there is no acceptable
conversion)
And the errors I get for wstring to string:
lexical_cast.hpp(144): error C2679: binary '<<' : no operator found which
takes a right-hand operand of type 'const
std::basic_string<_Elem,_Traits,_Ax>' (or there is no acceptable conversion)
with
[
_Elem=wchar_t,
_Traits=std::char_traits