From 5c32aa411c5915b17a915c650c6975fc2c81271a Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 27 May 2018 11:18:27 -0700 Subject: [PATCH] Workaround a bug in MSVC --- include/fmt/format.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index a9111d4d..0f2baab4 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -260,6 +260,8 @@ inline dummy_int _isnan(...) { return dummy_int(); } // A handmade floating-point number f * pow(2, e). class fp { private: + typedef uint64_t significand_type; + // All sizes are in bits. static constexpr int char_size = std::numeric_limits::digits; // Subtract 1 to account for an implicit most significant bit in the @@ -269,10 +271,11 @@ class fp { static constexpr uint64_t implicit_bit = 1ull << double_significand_size; public: - uint64_t f; + significand_type f; int e; - static constexpr int fp_significand_size = sizeof(f) * char_size; + static constexpr int fp_significand_size = + sizeof(significand_type) * char_size; fp(uint64_t f, int e): f(f), e(e) {}