From 454480f581a0b7a05f14c93b8e94006f5bcd8e62 Mon Sep 17 00:00:00 2001 From: gistrec Date: Mon, 18 May 2020 14:57:04 +0700 Subject: [PATCH] fixed a compilation error in MSVC --- include/nlohmann/detail/output/binary_writer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nlohmann/detail/output/binary_writer.hpp b/include/nlohmann/detail/output/binary_writer.hpp index c4cf618c..4fbd4c9a 100644 --- a/include/nlohmann/detail/output/binary_writer.hpp +++ b/include/nlohmann/detail/output/binary_writer.hpp @@ -195,7 +195,7 @@ class binary_writer else { if (static_cast(j.m_value.number_float) >= static_cast(std::numeric_limits::lowest()) and - static_cast(j.m_value.number_float) <= static_cast(std::numeric_limits::max()) and + static_cast(j.m_value.number_float) <= static_cast((std::numeric_limits::max)()) and static_cast(static_cast(j.m_value.number_float)) == static_cast(j.m_value.number_float)) { oa->write_character(get_cbor_float_prefix(static_cast(j.m_value.number_float)));