Index: boost/lexical_cast.hpp =================================================================== --- boost/lexical_cast.hpp (revision 82179) +++ boost/lexical_cast.hpp (working copy) @@ -1870,7 +1870,7 @@ #elif defined( __BORLANDC__ ) # pragma option push -w-8041 #endif - utype const comp_val = static_cast(-(std::numeric_limits::min)()); + utype const comp_val = static_cast(1) << std::numeric_limits::digits; succeed = succeed && out_tmp<=comp_val; output = -out_tmp; #if (defined _MSC_VER)