On Mon, Oct 6, 2025 at 5:47 PM John Maddock via Boost <boost@lists.boost.org> wrote:
The second review of the proposed Decimal Number library by Matt Borland and Chris Kormanyos begins today and runs until 15th Oct.
General question for the authors, although this is not obviously reason for accept or reject. Did you consider bumping up version to C++17? I was reading this code and it really made me think how much simpler it would be in C++17. I know Boost developers are not average developers and can read and write more complex code than huge majority of developers, but still, if constexpr, _v instead of ::value... There would be no need for macros here I believe. BOOST_DECIMAL_IF_CONSTEXPR (std::numeric_limits<typename Decimal::significand_type>::digits10 > std::numeric_limits<std::uint64_t>::digits10) { new_sig = detail::shrink_significand<std::uint64_t>(sig, exp); } else { new_sig = static_cast<std::uint64_t>(sig); } BOOST_DECIMAL_IF_CONSTEXPR (std::is_same<TargetType, float>::value) { result = static_cast<TargetType>(detail::fast_float::compute_float32(exp, new_sig, val.isneg(), success)); } else BOOST_DECIMAL_IF_CONSTEXPR (std::is_same<TargetType, double>::value) { result = static_cast<TargetType>(detail::fast_float::compute_float64(exp, new_sig, val.isneg(), success)); } else BOOST_DECIMAL_IF_CONSTEXPR (std::is_same<TargetType, long double>::value) { #if BOOST_DECIMAL_LDBL_BITS == 64 result = static_cast<TargetType>(detail::fast_float::compute_float64(exp, new_sig, val.isneg(), success)); #elif BOOST_DECIMAL_LDBL_BITS == 80 result = static_cast<TargetType>(detail::fast_float::compute_float80_128(exp, new_sig, val.isneg(), success)); #else static_cast<void>(new_sig); result = static_cast<TargetType>(detail::fast_float::compute_float80_128(exp, sig, val.isneg(), success)); #endif }