diff --git a/src/json.hpp b/src/json.hpp index 6c30e8a11..ad7ab43d3 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -6656,7 +6656,7 @@ class serializer return; } - const bool is_negative = x < 0; + const bool is_negative = std::is_same::value and (x < 0); std::size_t i = 0; // spare 1 byte for '\0'