We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 970ae03 commit 40c6a45Copy full SHA for 40c6a45
include/boost/decimal/string.hpp
@@ -22,7 +22,7 @@ auto from_string_impl(const std::string& str, std::size_t* idx)
22
DecimalType val;
23
const auto r {from_chars(str, val)};
24
25
- if (r.ec == std::errc::result_out_of_range)
+ if (r.ec == std::errc::result_out_of_range || val == std::numeric_limits<DecimalType>::infinity())
26
{
27
val = std::numeric_limits<DecimalType>::signaling_NaN();
28
BOOST_DECIMAL_THROW_EXCEPTION(std::out_of_range("Conversion is outside the range of the type"));
0 commit comments