Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitHub Actions <action@github.com>2020-06-28 14:43:54 +0300
committerGitHub Actions <action@github.com>2020-06-28 14:43:54 +0300
commit5e94a4e7d671bbb898b335ee4e6a437cf5126fb5 (patch)
tree10e3c28b124277b5de558cfb1c4e22b585185018
parentf02adff4c899a49cb2528171281316481613c6a7 (diff)
Upstream release v3.6.1v3.6.1
-rw-r--r--README.md2
-rw-r--r--include/nlohmann/json.hpp18
2 files changed, 11 insertions, 9 deletions
diff --git a/README.md b/README.md
index 3d2c04f..5666697 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ include(FetchContent)
FetchContent_Declare(json
GIT_REPOSITORY https://github.com/ArthurSonzogni/nlohman_json
- GIT_TAG v3.6.0)
+ GIT_TAG v3.6.1)
FetchContent_GetProperties(json)
if(NOT json_POPULATED)
diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp
index 59f0277..5003a4f 100644
--- a/include/nlohmann/json.hpp
+++ b/include/nlohmann/json.hpp
@@ -1,7 +1,7 @@
/*
__ _____ _____ _____
__| | __| | | | JSON for Modern C++
-| | |__ | | | | | | version 3.6.0
+| | |__ | | | | | | version 3.6.1
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
@@ -32,7 +32,7 @@ SOFTWARE.
#define NLOHMANN_JSON_VERSION_MAJOR 3
#define NLOHMANN_JSON_VERSION_MINOR 6
-#define NLOHMANN_JSON_VERSION_PATCH 0
+#define NLOHMANN_JSON_VERSION_PATCH 1
#include <algorithm> // all_of, find, for_each
#include <cassert> // assert
@@ -3776,7 +3776,7 @@ class binary_reader
default: // anything else not supported (yet)
{
- std::array<char, 3> cr{};
+ std::array<char, 3> cr{{}};
(std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast<unsigned char>(element_type));
return sax->parse_error(element_type_parse_position, std::string(cr.data()), parse_error::create(114, element_type_parse_position, "Unsupported BSON record type 0x" + std::string(cr.data())));
}
@@ -5432,7 +5432,7 @@ class binary_reader
*/
std::string get_token_string() const
{
- std::array<char, 3> cr{};
+ std::array<char, 3> cr{{}};
(std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast<unsigned char>(current));
return std::string{cr.data()};
}
@@ -6858,7 +6858,7 @@ scan_number_done:
if ('\x00' <= c and c <= '\x1F')
{
// escape control characters
- std::array<char, 9> cs{};
+ std::array<char, 9> cs{{}};
(std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c));
result += cs.data();
}
@@ -11658,7 +11658,7 @@ inline void grisu2_digit_gen(char* buffer, int& length, int& decimal_exponent,
// = buffer * 10^-m + 10^-m * (1/10 * (10 * p2) ) * 2^e
// = buffer * 10^-m + 10^-m * (1/10 * ((10*p2 div 2^-e) * 2^-e + (10*p2 mod 2^-e)) * 2^e
//
- assert(p2 <= std::numeric_limits<std::uint64_t>::max() / 10);
+ assert(p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10);
p2 *= 10;
const std::uint64_t d = p2 >> -one.e; // d = (10 * p2) div 2^-e
const std::uint64_t r = p2 & (one.f - 1); // r = (10 * p2) mod 2^-e
@@ -13717,7 +13717,7 @@ class basic_json
object = nullptr; // silence warning, see #821
if (JSON_UNLIKELY(t == value_t::null))
{
- JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.6.0")); // LCOV_EXCL_LINE
+ JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.6.1")); // LCOV_EXCL_LINE
}
break;
}
@@ -18493,7 +18493,9 @@ class basic_json
switch (lhs_type)
{
case value_t::array:
- return *lhs.m_value.array < *rhs.m_value.array;
+ // note parentheses are necessary, see
+ // https://github.com/nlohmann/json/issues/1530
+ return (*lhs.m_value.array) < (*rhs.m_value.array);
case value_t::object:
return *lhs.m_value.object < *rhs.m_value.object;