Fix handling of 96-bit long double with -m32

This commit is contained in:
Victor Zverovich 2022-02-17 15:51:59 -08:00
parent d8e1dd4ab2
commit 532a69a639

View File

@ -245,9 +245,11 @@ struct fp {
template <typename Float> explicit FMT_CONSTEXPR fp(Float n) { assign(n); }
template <typename Float>
using is_supported = bool_constant<sizeof(Float) == sizeof(uint32_t) ||
sizeof(Float) == 2 * sizeof(uint32_t) ||
std::numeric_limits<Float>::digits == 64>;
using is_supported =
bool_constant<sizeof(Float) == sizeof(uint32_t) ||
sizeof(Float) == sizeof(uint64_t) ||
(sizeof(Float) == sizeof(uint128_t) &&
std::numeric_limits<Float>::digits == 64)>;
// Assigns d to this and return true iff predecessor is closer than successor.
template <typename Float, FMT_ENABLE_IF(is_supported<Float>::value)>