From 33b0bed7fe6e7e64aca0b0ba5c49001b0123cb7d Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 14 Jul 2020 14:34:55 +0200 Subject: [PATCH] :green_heart: fix compilation --- include/nlohmann/detail/hash.hpp | 3 ++- single_include/nlohmann/json.hpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/nlohmann/detail/hash.hpp b/include/nlohmann/detail/hash.hpp index b0be7fb2..404a2bd3 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 9a9b3a2f..6a7a9ff4 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: