diff --git a/include/nlohmann/detail/hash.hpp b/include/nlohmann/detail/hash.hpp index b0be7fb26..404a2bd3c 100644 --- a/include/nlohmann/detail/hash.hpp +++ b/include/nlohmann/detail/hash.hpp @@ -1,5 +1,6 @@ #pragma once +#include // size_t #include // hash namespace nlohmann @@ -19,7 +20,7 @@ std::size_t hash(const BasicJsonType& j) switch (j.type()) { case BasicJsonType::value_t::null: - case BasicJsonType::discarded: + case BasicJsonType::value_t::discarded: return combine(static_cast(j.type()), 0); case BasicJsonType::value_t::object: diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 9a9b3a2f3..6a7a9ff41 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -4445,6 +4445,7 @@ class byte_container_with_subtype : public BinaryType // #include +#include // size_t #include // hash namespace nlohmann @@ -4464,7 +4465,7 @@ std::size_t hash(const BasicJsonType& j) switch (j.type()) { case BasicJsonType::value_t::null: - case BasicJsonType::discarded: + case BasicJsonType::value_t::discarded: return combine(static_cast(j.type()), 0); case BasicJsonType::value_t::object: