From b62f82e6644bc3d2a8f5a85e5c5fad8cef970404 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Wed, 3 Nov 2021 20:41:16 +0100 Subject: [PATCH] :green_heart: fix build --- include/nlohmann/json.hpp | 14 +++++++------- single_include/nlohmann/json.hpp | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 8d188cf58..11fa1da39 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -4708,15 +4708,15 @@ std::string to_string(const NLOHMANN_BASIC_JSON_TPL& j) /////////////////////// /// hash value for JSON objects -template -struct std::hash +NLOHMANN_BASIC_JSON_TPL_DECLARATION +struct std::hash { /*! @brief return a hash value for a JSON object @since version 1.0.0, extended for arbitrary basic_json types in 3.10.5. */ - std::size_t operator()(const BasicJsonType& j) const + std::size_t operator()(const nlohmann::NLOHMANN_BASIC_JSON_TPL& j) const { return nlohmann::detail::hash(j); } @@ -4751,14 +4751,14 @@ namespace std @since version 1.0.0 */ template<> -inline void swap(nlohmann::json& j1, nlohmann::json& j2) noexcept( // NOLINT(readability-inconsistent-declaration-parameter-name) - is_nothrow_move_constructible::value&& // NOLINT(misc-redundant-expression) - is_nothrow_move_assignable::value - ) +inline void swap(nlohmann::json& j1, nlohmann::json& j2) noexcept( // NOLINT(readability-inconsistent-declaration-parameter-name) + is_nothrow_move_constructible::value&& // NOLINT(misc-redundant-expression) + is_nothrow_move_assignable::value) { j1.swap(j2); } +} // namespace std #endif diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index dc7cd1ff6..be568e6f4 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -22209,15 +22209,15 @@ std::string to_string(const NLOHMANN_BASIC_JSON_TPL& j) /////////////////////// /// hash value for JSON objects -template -struct std::hash +NLOHMANN_BASIC_JSON_TPL_DECLARATION +struct std::hash { /*! @brief return a hash value for a JSON object @since version 1.0.0, extended for arbitrary basic_json types in 3.10.5. */ - std::size_t operator()(const BasicJsonType& j) const + std::size_t operator()(const nlohmann::NLOHMANN_BASIC_JSON_TPL& j) const { return nlohmann::detail::hash(j); } @@ -22252,14 +22252,14 @@ namespace std @since version 1.0.0 */ template<> -inline void swap(nlohmann::json& j1, nlohmann::json& j2) noexcept( // NOLINT(readability-inconsistent-declaration-parameter-name) - is_nothrow_move_constructible::value&& // NOLINT(misc-redundant-expression) - is_nothrow_move_assignable::value - ) +inline void swap(nlohmann::json& j1, nlohmann::json& j2) noexcept( // NOLINT(readability-inconsistent-declaration-parameter-name) + is_nothrow_move_constructible::value&& // NOLINT(misc-redundant-expression) + is_nothrow_move_assignable::value) { j1.swap(j2); } +} // namespace std #endif