diff --git a/src/json.hpp b/src/json.hpp index 1a542bdf9..247738237 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -6656,7 +6656,7 @@ class serializer return; } - const bool is_negative = std::is_same::value and (x < 0); + const bool is_negative = (x <= 0) and (x != 0); // see issue #755 std::size_t i = 0; while (x != 0)