@@ -288,7 +288,7 @@ BOOST_DECIMAL_EXPORT class decimal32_t final // NOLINT(cppcoreguidelines-special
288288 #else
289289 template <typename T1, typename T2, std::enable_if_t <detail::is_unsigned_v<T1> && detail::is_integral_v<T2>, bool > = true >
290290 #endif
291- constexpr decimal32_t (T1 coeff, T2 exp, bool sign = false ) noexcept ;
291+ constexpr decimal32_t (T1 coeff, T2 exp, bool is_negative = false ) noexcept ;
292292
293293 #ifdef BOOST_DECIMAL_HAS_CONCEPTS
294294 template <BOOST_DECIMAL_SIGNED_INTEGRAL T1, BOOST_DECIMAL_INTEGRAL T2>
@@ -642,20 +642,20 @@ template <BOOST_DECIMAL_UNSIGNED_INTEGRAL T1, BOOST_DECIMAL_INTEGRAL T2>
642642#else
643643template <typename T1, typename T2, std::enable_if_t <detail::is_unsigned_v<T1> && detail::is_integral_v<T2>, bool >>
644644#endif
645- constexpr decimal32_t::decimal32_t (T1 coeff, T2 exp, bool sign ) noexcept // NOLINT(readability-function-cognitive-complexity,misc-no-recursion)
645+ constexpr decimal32_t::decimal32_t (T1 coeff, T2 exp, bool is_negative ) noexcept // NOLINT(readability-function-cognitive-complexity,misc-no-recursion)
646646{
647647 static_assert (detail::is_integral_v<T1>, " Coefficient must be an integer" );
648648 static_assert (detail::is_integral_v<T2>, " Exponent must be an integer" );
649649
650- bits_ = sign ? detail::d32_sign_mask : UINT32_C (0 );
650+ bits_ = is_negative ? detail::d32_sign_mask : UINT32_C (0 );
651651
652652 // If the coeff is not in range, make it so
653653 // Only count the number of digits if we absolutely have to
654654 int coeff_digits {-1 };
655655 auto biased_exp {static_cast <int >(exp + detail::bias)};
656656 if (coeff > detail::d32_max_significand_value || biased_exp < -(detail::precision_v<decimal32_t > - 1 ))
657657 {
658- coeff_digits = detail::coefficient_rounding<decimal32_t >(coeff, exp, biased_exp, sign , detail::num_digits (coeff));
658+ coeff_digits = detail::coefficient_rounding<decimal32_t >(coeff, exp, biased_exp, is_negative , detail::num_digits (coeff));
659659 }
660660
661661 auto reduced_coeff {static_cast <significand_type>(coeff)};
@@ -708,7 +708,7 @@ constexpr decimal32_t::decimal32_t(T1 coeff, T2 exp, bool sign) noexcept // NOLI
708708 {
709709 exp -= digit_delta;
710710 reduced_coeff *= detail::pow10 (static_cast <significand_type>(digit_delta));
711- *this = decimal32_t (reduced_coeff, exp, sign );
711+ *this = decimal32_t (reduced_coeff, exp, is_negative );
712712 }
713713 else if (coeff_digits + biased_exp <= detail::precision)
714714 {
@@ -729,13 +729,13 @@ constexpr decimal32_t::decimal32_t(T1 coeff, T2 exp, bool sign) noexcept // NOLI
729729 const auto offset {detail::precision - coeff_digits};
730730 exp -= offset;
731731 reduced_coeff *= detail::pow10 (static_cast <significand_type>(offset));
732- *this = decimal32_t (reduced_coeff, exp, sign );
732+ *this = decimal32_t (reduced_coeff, exp, is_negative );
733733 }
734734 else
735735 {
736736 // Reset the value and make sure to preserve the sign of 0/inf
737737 bits_ = exp < 0 ? UINT32_C (0 ) : detail::d32_inf_mask;
738- bits_ |= sign ? detail::d32_sign_mask : UINT32_C (0 );
738+ bits_ |= is_negative ? detail::d32_sign_mask : UINT32_C (0 );
739739 }
740740 }
741741}
0 commit comments