Skip to content

Commit

Permalink
Promote the comparison type instead of using the decimal sig type
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed Jan 21, 2025
1 parent 0c9411f commit 1116018
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/boost/decimal/detail/comparison.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE DecimalType = decimal32, BOOST_DEC
constexpr auto equal_parts_impl(T1 lhs_sig, U1 lhs_exp, bool lhs_sign,
T2 rhs_sig, U2 rhs_exp, bool rhs_sign) noexcept -> std::enable_if_t<std::is_same<DecimalType, decimal32>::value || std::is_same<DecimalType, decimal64>::value || std::is_same<DecimalType, decimal128>::value, bool>
{
using comp_type = typename DecimalType::significand_type;
using comp_type = std::conditional_t<(std::numeric_limits<T1>::digits10 > std::numeric_limits<T2>::digits10), T1, T2>;

BOOST_DECIMAL_ASSERT(lhs_sig >= 0);
BOOST_DECIMAL_ASSERT(rhs_sig >= 0);
Expand Down

0 comments on commit 1116018

Please sign in to comment.