Skip to content

Commit 398f5fa

Browse files
committed
Change method of determining significand type
1 parent 5832979 commit 398f5fa

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

include/boost/decimal/detail/cmath/ceil.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ BOOST_DECIMAL_EXPORT template <typename T>
2727
constexpr auto ceil BOOST_DECIMAL_PREVENT_MACRO_SUBSTITUTION (T val) noexcept
2828
BOOST_DECIMAL_REQUIRES(detail::is_decimal_floating_point_v, T)
2929
{
30-
using DivType = std::conditional_t<std::is_same<T, decimal32>::value, std::uint32_t,
31-
std::conditional_t<std::is_same<T, decimal64>::value, std::uint64_t, detail::uint128>>;
30+
using DivType = T::significand_type;
3231

3332
constexpr T zero {0, 0};
3433
constexpr T one {1, 0};

include/boost/decimal/detail/cmath/floor.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ BOOST_DECIMAL_EXPORT template <typename T>
2727
constexpr auto floor BOOST_DECIMAL_PREVENT_MACRO_SUBSTITUTION (T val) noexcept
2828
BOOST_DECIMAL_REQUIRES(detail::is_decimal_floating_point_v, T)
2929
{
30-
using DivType = std::conditional_t<std::is_same<T, decimal32>::value, std::uint32_t,
31-
std::conditional_t<std::is_same<T, decimal64>::value, std::uint64_t, detail::uint128>>;
30+
using DivType = T::significand_type;
3231

3332
constexpr T zero {0, 0};
3433
constexpr T neg_one {1, 0, true};

0 commit comments

Comments
 (0)