From b33093d6104827f07ad6e7ffcc2b89f4f9256f2d Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Wed, 20 Mar 2019 14:40:23 +0100 Subject: [PATCH] :bug: fixed regression #1530 --- include/nlohmann/json.hpp | 2 +- single_include/nlohmann/json.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 4676b2c5b9..6ef8c3749a 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -5730,7 +5730,7 @@ class basic_json case value_t::array: // note parentheses are necessary, see // https://github.com/nlohmann/json/issues/1530 - return (*lhs.m_value.array < *rhs.m_value.array); + return (*lhs.m_value.array) < (*rhs.m_value.array); case value_t::object: return *lhs.m_value.object < *rhs.m_value.object; diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 3bd76a12c8..e6b27f8dda 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -18495,7 +18495,7 @@ class basic_json case value_t::array: // note parentheses are necessary, see // https://github.com/nlohmann/json/issues/1530 - return (*lhs.m_value.array < *rhs.m_value.array); + return (*lhs.m_value.array) < (*rhs.m_value.array); case value_t::object: return *lhs.m_value.object < *rhs.m_value.object;