diff --git a/src/json.hpp b/src/json.hpp index b781b98c..b15470b6 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -6660,7 +6660,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'