Boost logo

Boost :

From: tslettebo_at_[hidden]
Date: 2003-07-23 00:18:55


> From: Rodolfo Lima
>
> I had some problems with lexical_cast and not using wchar_t as a built-in
> type. For instance...
>
> std::stringstream ss;
> ss << boost::lexical_cast<unsigned short>("23");
>
> lexical_cast would return a wstring, and a compile failure, because
> internally there is a the template that matches unsigned short as wchar_t,
> which makes lexical_cast return a wstring.

This is similar to an earlier posting I just sent a reply to. From the error message you quote, I'm guessing you're using MSVC. As mentioned in the posting I just sent, the 1.30 version of lexical_cast had some problems when used on platforms without intrinsic wchar_t. Could you perhaps tried the latest CVS version (if you haven't), and if it still doesn't work, could you have given the name and version of the compiler you tried it on?

Regards,

Terje


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