Skip to content

Commit 7a26b54

Browse files
authored
Merge pull request #931 from cppalliance/integral_conv
Remove duplicated test for infinity
2 parents c090cbb + 4565cce commit 7a26b54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/boost/decimal/detail/to_integral.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ constexpr auto to_integral(Decimal val) noexcept
4848
}
4949
return static_cast<TargetType>(std::numeric_limits<TargetType>::max());
5050
}
51-
if (isinf(val) || val > max_target_type || val < min_target_type)
51+
if (val > max_target_type || val < min_target_type)
5252
{
5353
#if defined(__clang__) && __clang_major__ >= 20
5454
if (!BOOST_DECIMAL_IS_CONSTANT_EVALUATED(val))
@@ -109,7 +109,7 @@ constexpr auto to_integral_128(Decimal val) noexcept
109109

110110
return static_cast<TargetType>(std::numeric_limits<TargetType>::max());
111111
}
112-
if (isinf(val) || val > max_target_type || val < min_target_type)
112+
if (val > max_target_type || val < min_target_type)
113113
{
114114
#if defined(__clang__) && __clang_major__ >= 20
115115
if (!BOOST_DECIMAL_IS_CONSTANT_EVALUATED(val))

0 commit comments

Comments
 (0)