diff --git a/include/nlohmann/detail/hash.hpp b/include/nlohmann/detail/hash.hpp index 70c5daf338..ac07c2e8f0 100644 --- a/include/nlohmann/detail/hash.hpp +++ b/include/nlohmann/detail/hash.hpp @@ -103,7 +103,7 @@ std::size_t hash(const BasicJsonType& j) auto seed = combine(type, j.get_binary().size()); const auto h = std::hash {}(j.get_binary().has_subtype()); seed = combine(seed, h); - seed = combine(seed, j.get_binary().subtype()); + seed = combine(seed, static_cast(j.get_binary().subtype())); for (const auto byte : j.get_binary()) { seed = combine(seed, std::hash {}(byte)); diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 5f810e291e..16afb8a6a7 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -5266,7 +5266,7 @@ std::size_t hash(const BasicJsonType& j) auto seed = combine(type, j.get_binary().size()); const auto h = std::hash {}(j.get_binary().has_subtype()); seed = combine(seed, h); - seed = combine(seed, j.get_binary().subtype()); + seed = combine(seed, static_cast(j.get_binary().subtype())); for (const auto byte : j.get_binary()) { seed = combine(seed, std::hash {}(byte));