Skip to content

Commit 0b2ca35

Browse files
committed
Bulk refactoring of constants and header inclusions as needed
1 parent 59ed8dd commit 0b2ca35

File tree

11 files changed

+120
-116
lines changed

11 files changed

+120
-116
lines changed

include/boost/decimal/decimal128_t.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2256,7 +2256,7 @@ class numeric_limits_impl128
22562256
// Member functions
22572257
static constexpr auto (min) () -> boost::decimal::decimal128_t { return {UINT32_C(1), min_exponent}; }
22582258
static constexpr auto (max) () -> boost::decimal::decimal128_t { return {boost::int128::uint128_t{UINT64_C(0b1111011010000100110111110101011011000011111000000), UINT64_C(0b0011011110001101100011100110001111111111111111111111111111111111)}, max_exponent - digits + 1}; }
2259-
static constexpr auto lowest () -> boost::decimal::decimal128_t { return {boost::int128::uint128_t{UINT64_C(0b1111011010000100110111110101011011000011111000000), UINT64_C(0b0011011110001101100011100110001111111111111111111111111111111111)}, max_exponent - digits + 1, true}; }
2259+
static constexpr auto lowest () -> boost::decimal::decimal128_t { return {boost::int128::uint128_t{UINT64_C(0b1111011010000100110111110101011011000011111000000), UINT64_C(0b0011011110001101100011100110001111111111111111111111111111111111)}, max_exponent - digits + 1, construction_sign::negative}; }
22602260
static constexpr auto epsilon () -> boost::decimal::decimal128_t { return {UINT32_C(1), -digits + 1}; }
22612261
static constexpr auto round_error () -> boost::decimal::decimal128_t { return epsilon(); }
22622262
static constexpr auto infinity () -> boost::decimal::decimal128_t { return boost::decimal::from_bits(boost::decimal::detail::d128_inf_mask); }

include/boost/decimal/decimal32_t.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2324,7 +2324,7 @@ class numeric_limits_impl32
23242324
// Member functions
23252325
static constexpr auto (min) () -> boost::decimal::decimal32_t { return {UINT32_C(1), min_exponent}; }
23262326
static constexpr auto (max) () -> boost::decimal::decimal32_t { return {boost::decimal::detail::d32_max_significand_value, max_exponent - digits + 1}; }
2327-
static constexpr auto lowest () -> boost::decimal::decimal32_t { return {boost::decimal::detail::d32_max_significand_value, max_exponent - digits + 1, true}; }
2327+
static constexpr auto lowest () -> boost::decimal::decimal32_t { return {boost::decimal::detail::d32_max_significand_value, max_exponent - digits + 1, construction_sign::negative}; }
23282328
static constexpr auto epsilon () -> boost::decimal::decimal32_t { return {UINT32_C(1), -digits + 1}; }
23292329
static constexpr auto round_error () -> boost::decimal::decimal32_t { return epsilon(); }
23302330
static constexpr auto infinity () -> boost::decimal::decimal32_t { return boost::decimal::from_bits(boost::decimal::detail::d32_inf_mask); }

include/boost/decimal/decimal64_t.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2233,7 +2233,7 @@ class numeric_limits_impl64
22332233
// Member functions
22342234
static constexpr auto (min) () -> boost::decimal::decimal64_t { return {UINT32_C(1), min_exponent}; }
22352235
static constexpr auto (max) () -> boost::decimal::decimal64_t { return {boost::decimal::detail::d64_max_significand_value, max_exponent - digits + 1}; }
2236-
static constexpr auto lowest () -> boost::decimal::decimal64_t { return {boost::decimal::detail::d64_max_significand_value, max_exponent - digits + 1, true}; }
2236+
static constexpr auto lowest () -> boost::decimal::decimal64_t { return {boost::decimal::detail::d64_max_significand_value, max_exponent - digits + 1, construction_sign::negative}; }
22372237
static constexpr auto epsilon () -> boost::decimal::decimal64_t { return {UINT32_C(1), -digits + 1}; }
22382238
static constexpr auto round_error () -> boost::decimal::decimal64_t { return epsilon(); }
22392239
static constexpr auto infinity () -> boost::decimal::decimal64_t { return boost::decimal::from_bits(boost::decimal::detail::d64_inf_mask); }

include/boost/decimal/decimal_fast128_t.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ BOOST_DECIMAL_EXPORT class decimal_fast128_t final
216216
#else
217217
template <typename T1, typename T2, std::enable_if_t<detail::is_unsigned_v<T1> && detail::is_integral_v<T2>, bool> = true>
218218
#endif
219-
constexpr decimal_fast128_t(T1 coeff, T2 exp, detail::construction_sign_wrapper resultant_sign) noexcept;
219+
constexpr decimal_fast128_t(T1 coeff, T2 exp, detail::construction_sign_wrapper resultant_sign = construction_sign::positive) noexcept;
220220

221221
#ifdef BOOST_DECIMAL_HAS_CONCEPTS
222222
template <BOOST_DECIMAL_SIGNED_INTEGRAL T1, BOOST_DECIMAL_INTEGRAL T2>
@@ -1618,7 +1618,7 @@ class numeric_limits_impl128f
16181618
// Member functions
16191619
static constexpr auto (min) () -> boost::decimal::decimal_fast128_t { return {UINT32_C(1), min_exponent}; }
16201620
static constexpr auto (max) () -> boost::decimal::decimal_fast128_t { return {boost::int128::uint128_t{UINT64_C(0b1111011010000100110111110101011011000011111000000), UINT64_C(0b0011011110001101100011100110001111111111111111111111111111111111)}, max_exponent - digits + 1}; }
1621-
static constexpr auto lowest () -> boost::decimal::decimal_fast128_t { return {boost::int128::uint128_t{UINT64_C(0b1111011010000100110111110101011011000011111000000), UINT64_C(0b0011011110001101100011100110001111111111111111111111111111111111)}, max_exponent - digits + 1, true}; }
1621+
static constexpr auto lowest () -> boost::decimal::decimal_fast128_t { return {boost::int128::uint128_t{UINT64_C(0b1111011010000100110111110101011011000011111000000), UINT64_C(0b0011011110001101100011100110001111111111111111111111111111111111)}, max_exponent - digits + 1, construction_sign::negative}; }
16221622
static constexpr auto epsilon () -> boost::decimal::decimal_fast128_t { return {UINT32_C(1), -digits + 1}; }
16231623
static constexpr auto round_error () -> boost::decimal::decimal_fast128_t { return epsilon(); }
16241624
static constexpr auto infinity () -> boost::decimal::decimal_fast128_t { return boost::decimal::direct_init_d128(boost::decimal::detail::d128_fast_inf, 0, false); }

include/boost/decimal/decimal_fast32_t.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,7 @@ class numeric_limits_impl32f
15801580
// Member functions
15811581
static constexpr auto (min) () -> boost::decimal::decimal_fast32_t { return {UINT32_C(1), min_exponent}; }
15821582
static constexpr auto (max) () -> boost::decimal::decimal_fast32_t { return {UINT32_C(9'999'999), max_exponent - digits + 1}; }
1583-
static constexpr auto lowest () -> boost::decimal::decimal_fast32_t { return {UINT32_C(9'999'999), max_exponent - digits + 1, true}; }
1583+
static constexpr auto lowest () -> boost::decimal::decimal_fast32_t { return {UINT32_C(9'999'999), max_exponent - digits + 1, construction_sign::negative}; }
15841584
static constexpr auto epsilon () -> boost::decimal::decimal_fast32_t { return {UINT32_C(1), -digits + 1}; }
15851585
static constexpr auto round_error () -> boost::decimal::decimal_fast32_t { return epsilon(); }
15861586
static constexpr auto infinity () -> boost::decimal::decimal_fast32_t { return boost::decimal::direct_init(boost::decimal::detail::d32_fast_inf, UINT8_C((0))); }

include/boost/decimal/decimal_fast64_t.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ class numeric_limits_impl64f
15541554
// Member functions
15551555
static constexpr auto (min) () -> boost::decimal::decimal_fast64_t { return {UINT32_C(1), min_exponent}; }
15561556
static constexpr auto (max) () -> boost::decimal::decimal_fast64_t { return {UINT64_C(9'999'999'999'999'999), max_exponent - digits + 1}; }
1557-
static constexpr auto lowest () -> boost::decimal::decimal_fast64_t { return {UINT64_C(9'999'999'999'999'999), max_exponent - digits + 1, true}; }
1557+
static constexpr auto lowest () -> boost::decimal::decimal_fast64_t { return {UINT64_C(9'999'999'999'999'999), max_exponent - digits + 1, construction_sign::negative}; }
15581558
static constexpr auto epsilon () -> boost::decimal::decimal_fast64_t { return {UINT32_C(1), -digits + 1}; }
15591559
static constexpr auto round_error () -> boost::decimal::decimal_fast64_t { return epsilon(); }
15601560
static constexpr auto infinity () -> boost::decimal::decimal_fast64_t { return boost::decimal::direct_init_d64(

0 commit comments

Comments
 (0)