|
Boost Users : |
Subject: Re: [Boost-users] [lexical_cast] bad_lexical_cast behavior?
From: Hrvoje Prge¹a (hrvoje.prgesa_at_[hidden])
Date: 2008-09-06 12:00:25
And another weirdness:
boost::uint64_t max = numeric_limits<boost::uint64_t>::max();
s = lexical_cast<string, boost::uint64_t>(max);
BOOST_CHECK_EQUAL(max, lexical_cast<boost::uint64_t>(s));
// crashes: std::bad_cast: bad lexical cast: source type value could not
be interpreted as target
Converting 64bit unsigned int to it's max value string representation
and back results in exception.
-- Hrvoje Prge¹a
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