Boost logo

Boost Users :

From: Black Ice (yg-boost-users_at_[hidden])
Date: 2003-03-28 03:53:31


When lexical_cast used under VC, and the option "Treat wchar_t as Build-in
Type" is off
The following code will cause compile error:
int main(int argc, char * argv[])
{
 string str("10");
 unsigned short n = lexical_cast<unsigned short>(str);
 return 0;
}

Because in lexical_cast::detail::widest_char, treat unsigned short as
wchar_t!!

--
/*******************/
×ÔÓÉ£¨liberty£©Î޷ǾÍÊÇÕâÑùÒ»ÖÖ³Ðŵ£ºÃ¿¸öÈ˽«»áµÃµ½Ò»ÖÖ±£ÕÏ£¬±£ÕÏÎÒÃÇ¿ÉÒÔÓë
ȨÍþ¡¢¶àÊý¡¢Á÷Ë×¼°ÓßÂÛµÄÓ°ÏìÏ࿹ºâ¡£
/*******************/

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