Boost logo

Boost Users :

From: Miro Jurisic (macdev_at_[hidden])
Date: 2004-04-30 18:32:41

In article <CLEKIHLHCHBBNPGGHFMBKEHBCIAA.tony_at_[hidden]>,
 "Tony Djordjevski" <tony_at_[hidden]> wrote:

> 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.

You can't do that. lexical_cast from X to Y requires that there is a stream to
which X can be written and from which Y can be read. However, string can only be
read from basic_stream<char> and wstring can only be written to

However, if you add an operator that can read a wstring from a stream<char>, and
one that can read a string from a stream<wchar_t>, then it will work.



If this message helped you, consider buying an item
from my wish list: <>

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at