diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt index e14310435a4..c63dcf9a7a8 100644 --- a/dependencies/CMakeLists.txt +++ b/dependencies/CMakeLists.txt @@ -91,3 +91,9 @@ CPMAddPackage(NAME range-v3 GITHUB_REPOSITORY ericniebler/range-v3 GIT_TAG 0.12. ############################################################################################################################ CPMAddPackage(NAME pybind11 GITHUB_REPOSITORY pybind/pybind11 GIT_TAG b8f28551cc3a98ea9fbfc15c05b513c8f2d23e84) + +############################################################################################################################ +# nlohmann/json : https://github.com/nlohmann/json +############################################################################################################################ + +CPMAddPackage(NAME json GITHUB_REPOSITORY nlohmann/json GIT_TAG v3.9.1) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6a15d0c6db4..4fd3fcde99c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -6,6 +6,7 @@ target_link_libraries( INTERFACE pthread gmock_main + nlohmann_json::nlohmann_json magic_enum fmt::fmt-header-only span diff --git a/tests/tt_metal/tt_metal/perf_microbenchmark/routing/test_common.hpp b/tests/tt_metal/tt_metal/perf_microbenchmark/routing/test_common.hpp index 3bdf79115cd..9cf117b869a 100644 --- a/tests/tt_metal/tt_metal/perf_microbenchmark/routing/test_common.hpp +++ b/tests/tt_metal/tt_metal/perf_microbenchmark/routing/test_common.hpp @@ -4,7 +4,7 @@ #pragma once -#include "tt_metal/third_party/json/json.hpp" +#include #include "tt_metal/common/core_coord.hpp" static inline std::string to_string(pkt_dest_size_choices_t choice) { diff --git a/tests/ttnn/unit_tests/gtests/test_graph_query_op_constraints.cpp b/tests/ttnn/unit_tests/gtests/test_graph_query_op_constraints.cpp index 768639149a1..f3d415b219a 100644 --- a/tests/ttnn/unit_tests/gtests/test_graph_query_op_constraints.cpp +++ b/tests/ttnn/unit_tests/gtests/test_graph_query_op_constraints.cpp @@ -18,7 +18,7 @@ #include "impl/event/event.hpp" #include "impl/program/program.hpp" #include "tests/tt_metal/tt_metal/common/dispatch_fixture.hpp" -#include "third_party/json/json.hpp" +#include #include "tt_metal/common/logger.hpp" #include "ttnn/device.hpp" #include "ttnn/graph/graph_operation_queries.hpp" diff --git a/tt_metal/common/CMakeLists.txt b/tt_metal/common/CMakeLists.txt index bf3bd0068ab..24bb6ee63ea 100644 --- a/tt_metal/common/CMakeLists.txt +++ b/tt_metal/common/CMakeLists.txt @@ -15,6 +15,7 @@ target_link_libraries(common PRIVATE yaml-cpp::yaml-cpp) target_link_libraries( common PUBLIC + nlohmann_json::nlohmann_json magic_enum fmt::fmt-header-only span diff --git a/tt_metal/common/core_coord.hpp b/tt_metal/common/core_coord.hpp index b8d6f4d9935..93d55ac39f4 100644 --- a/tt_metal/common/core_coord.hpp +++ b/tt_metal/common/core_coord.hpp @@ -11,7 +11,7 @@ #include #include -#include "third_party/json/json.hpp" +#include #include "umd/device/tt_xy_pair.h" #include "tt_metal/tt_stl/reflection.hpp" #include "tt_metal/tt_stl/span.hpp" diff --git a/tt_metal/impl/buffers/buffer.hpp b/tt_metal/impl/buffers/buffer.hpp index 2866dbcceb6..1d69ccbbc91 100644 --- a/tt_metal/impl/buffers/buffer.hpp +++ b/tt_metal/impl/buffers/buffer.hpp @@ -25,7 +25,7 @@ #include "umd/device/types/xy_pair.h" #include "tt_metal/tt_stl/concepts.hpp" #include "tt_metal/common/assert.hpp" -#include "third_party/json/json.hpp" +#include #include "llrt/hal.hpp" diff --git a/tt_metal/third_party/json/json.hpp b/tt_metal/third_party/json/json.hpp deleted file mode 100644 index e54626f20ac..00000000000 --- a/tt_metal/third_party/json/json.hpp +++ /dev/null @@ -1,27315 +0,0 @@ -/* - __ _____ _____ _____ - __| | __| | | | JSON for Modern C++ -| | |__ | | | | | | version 3.9.1 -|_____|_____|_____|_|___| https://github.com/nlohmann/json - -Licensed under the MIT License . -SPDX-License-Identifier: MIT -Copyright (c) 2013-2019 Niels Lohmann . - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#ifndef INCLUDE_NLOHMANN_JSON_HPP_ -#define INCLUDE_NLOHMANN_JSON_HPP_ - -#define NLOHMANN_JSON_VERSION_MAJOR 3 -#define NLOHMANN_JSON_VERSION_MINOR 9 -#define NLOHMANN_JSON_VERSION_PATCH 1 - -#include // all_of, find, for_each -#include // nullptr_t, ptrdiff_t, size_t -#include // hash, less -#include // initializer_list -#ifndef JSON_NO_IO -#include // istream, ostream -#endif // JSON_NO_IO -#include // random_access_iterator_tag -#include // unique_ptr -#include // accumulate -#include // string, stoi, to_string -#include // declval, forward, move, pair, swap -#include // vector - -// #include - -#include -#include - -// #include - -#include // transform -#include // array -#include // forward_list -#include // inserter, front_inserter, end -#include // map -#include // string -#include // tuple, make_tuple -#include // is_arithmetic, is_same, is_enum, underlying_type, is_convertible -#include // unordered_map -#include // pair, declval -#include // valarray - -// #include - -#include // exception -#include // runtime_error -#include // to_string -#include // vector - -// #include - -#include // array -#include // size_t -#include // uint8_t -#include // string - -namespace nlohmann { -namespace detail { -/////////////////////////// -// JSON type enumeration // -/////////////////////////// - -/*! -@brief the JSON type enumeration - -This enumeration collects the different JSON types. It is internally used to -distinguish the stored values, and the functions @ref basic_json::is_null(), -@ref basic_json::is_object(), @ref basic_json::is_array(), -@ref basic_json::is_string(), @ref basic_json::is_boolean(), -@ref basic_json::is_number() (with @ref basic_json::is_number_integer(), -@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), -@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and -@ref basic_json::is_structured() rely on it. - -@note There are three enumeration entries (number_integer, number_unsigned, and -number_float), because the library distinguishes these three types for numbers: -@ref basic_json::number_unsigned_t is used for unsigned integers, -@ref basic_json::number_integer_t is used for signed integers, and -@ref basic_json::number_float_t is used for floating-point numbers or to -approximate integers which do not fit in the limits of their respective type. - -@sa see @ref basic_json::basic_json(const value_t value_type) -- create a JSON -value with the default value for a given type - -@since version 1.0.0 -*/ -enum class value_t : std::uint8_t { - null, ///< null value - object, ///< object (unordered set of name/value pairs) - array, ///< array (ordered collection of values) - string, ///< string value - boolean, ///< boolean value - number_integer, ///< number value (signed integer) - number_unsigned, ///< number value (unsigned integer) - number_float, ///< number value (floating-point) - binary, ///< binary array (ordered collection of bytes) - discarded ///< discarded by the parser callback function -}; - -/*! -@brief comparison operator for JSON types - -Returns an ordering that is similar to Python: -- order: null < boolean < number < object < array < string < binary -- furthermore, each type is not smaller than itself -- discarded values are not comparable -- binary is represented as a b"" string in python and directly comparable to a - string; however, making a binary array directly comparable with a string would - be surprising behavior in a JSON file. - -@since version 1.0.0 -*/ -inline bool operator<(const value_t lhs, const value_t rhs) noexcept { - static constexpr std::array order = {{ - 0 /* null */, - 3 /* object */, - 4 /* array */, - 5 /* string */, - 1 /* boolean */, - 2 /* integer */, - 2 /* unsigned */, - 2 /* float */, - 6 /* binary */ - }}; - - const auto l_index = static_cast(lhs); - const auto r_index = static_cast(rhs); - return l_index < order.size() && r_index < order.size() && order[l_index] < order[r_index]; -} -} // namespace detail -} // namespace nlohmann - -// #include - -#include -// #include - -#include // pair -// #include - -/* Hedley - https://nemequ.github.io/hedley - * Created by Evan Nemerson - * - * To the extent possible under law, the author(s) have dedicated all - * copyright and related and neighboring rights to this software to - * the public domain worldwide. This software is distributed without - * any warranty. - * - * For details, see . - * SPDX-License-Identifier: CC0-1.0 - */ - -#if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 15) -#if defined(JSON_HEDLEY_VERSION) -#undef JSON_HEDLEY_VERSION -#endif -#define JSON_HEDLEY_VERSION 15 - -#if defined(JSON_HEDLEY_STRINGIFY_EX) -#undef JSON_HEDLEY_STRINGIFY_EX -#endif -#define JSON_HEDLEY_STRINGIFY_EX(x) #x - -#if defined(JSON_HEDLEY_STRINGIFY) -#undef JSON_HEDLEY_STRINGIFY -#endif -#define JSON_HEDLEY_STRINGIFY(x) JSON_HEDLEY_STRINGIFY_EX(x) - -#if defined(JSON_HEDLEY_CONCAT_EX) -#undef JSON_HEDLEY_CONCAT_EX -#endif -#define JSON_HEDLEY_CONCAT_EX(a, b) a##b - -#if defined(JSON_HEDLEY_CONCAT) -#undef JSON_HEDLEY_CONCAT -#endif -#define JSON_HEDLEY_CONCAT(a, b) JSON_HEDLEY_CONCAT_EX(a, b) - -#if defined(JSON_HEDLEY_CONCAT3_EX) -#undef JSON_HEDLEY_CONCAT3_EX -#endif -#define JSON_HEDLEY_CONCAT3_EX(a, b, c) a##b##c - -#if defined(JSON_HEDLEY_CONCAT3) -#undef JSON_HEDLEY_CONCAT3 -#endif -#define JSON_HEDLEY_CONCAT3(a, b, c) JSON_HEDLEY_CONCAT3_EX(a, b, c) - -#if defined(JSON_HEDLEY_VERSION_ENCODE) -#undef JSON_HEDLEY_VERSION_ENCODE -#endif -#define JSON_HEDLEY_VERSION_ENCODE(major, minor, revision) (((major) * 1000000) + ((minor) * 1000) + (revision)) - -#if defined(JSON_HEDLEY_VERSION_DECODE_MAJOR) -#undef JSON_HEDLEY_VERSION_DECODE_MAJOR -#endif -#define JSON_HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000) - -#if defined(JSON_HEDLEY_VERSION_DECODE_MINOR) -#undef JSON_HEDLEY_VERSION_DECODE_MINOR -#endif -#define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000) - -#if defined(JSON_HEDLEY_VERSION_DECODE_REVISION) -#undef JSON_HEDLEY_VERSION_DECODE_REVISION -#endif -#define JSON_HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000) - -#if defined(JSON_HEDLEY_GNUC_VERSION) -#undef JSON_HEDLEY_GNUC_VERSION -#endif -#if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__) -#define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) -#elif defined(__GNUC__) -#define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0) -#endif - -#if defined(JSON_HEDLEY_GNUC_VERSION_CHECK) -#undef JSON_HEDLEY_GNUC_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_GNUC_VERSION) -#define JSON_HEDLEY_GNUC_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_GNUC_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_MSVC_VERSION) -#undef JSON_HEDLEY_MSVC_VERSION -#endif -#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000) && !defined(__ICL) -#define JSON_HEDLEY_MSVC_VERSION \ - JSON_HEDLEY_VERSION_ENCODE( \ - _MSC_FULL_VER / 10000000, (_MSC_FULL_VER % 10000000) / 100000, (_MSC_FULL_VER % 100000) / 100) -#elif defined(_MSC_FULL_VER) && !defined(__ICL) -#define JSON_HEDLEY_MSVC_VERSION \ - JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, (_MSC_FULL_VER % 1000000) / 10000, (_MSC_FULL_VER % 10000) / 10) -#elif defined(_MSC_VER) && !defined(__ICL) -#define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0) -#endif - -#if defined(JSON_HEDLEY_MSVC_VERSION_CHECK) -#undef JSON_HEDLEY_MSVC_VERSION_CHECK -#endif -#if !defined(JSON_HEDLEY_MSVC_VERSION) -#define JSON_HEDLEY_MSVC_VERSION_CHECK(major, minor, patch) (0) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) -#define JSON_HEDLEY_MSVC_VERSION_CHECK(major, minor, patch) \ - (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch))) -#elif defined(_MSC_VER) && (_MSC_VER >= 1200) -#define JSON_HEDLEY_MSVC_VERSION_CHECK(major, minor, patch) \ - (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch))) -#else -#define JSON_HEDLEY_MSVC_VERSION_CHECK(major, minor, patch) (_MSC_VER >= ((major * 100) + (minor))) -#endif - -#if defined(JSON_HEDLEY_INTEL_VERSION) -#undef JSON_HEDLEY_INTEL_VERSION -#endif -#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && !defined(__ICL) -#define JSON_HEDLEY_INTEL_VERSION \ - JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE) -#elif defined(__INTEL_COMPILER) && !defined(__ICL) -#define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0) -#endif - -#if defined(JSON_HEDLEY_INTEL_VERSION_CHECK) -#undef JSON_HEDLEY_INTEL_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_INTEL_VERSION) -#define JSON_HEDLEY_INTEL_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_INTEL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_INTEL_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_INTEL_CL_VERSION) -#undef JSON_HEDLEY_INTEL_CL_VERSION -#endif -#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && defined(__ICL) -#define JSON_HEDLEY_INTEL_CL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER, __INTEL_COMPILER_UPDATE, 0) -#endif - -#if defined(JSON_HEDLEY_INTEL_CL_VERSION_CHECK) -#undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_INTEL_CL_VERSION) -#define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_INTEL_CL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_PGI_VERSION) -#undef JSON_HEDLEY_PGI_VERSION -#endif -#if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__) -#define JSON_HEDLEY_PGI_VERSION JSON_HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__) -#endif - -#if defined(JSON_HEDLEY_PGI_VERSION_CHECK) -#undef JSON_HEDLEY_PGI_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_PGI_VERSION) -#define JSON_HEDLEY_PGI_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_PGI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_PGI_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_SUNPRO_VERSION) -#undef JSON_HEDLEY_SUNPRO_VERSION -#endif -#if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000) -#define JSON_HEDLEY_SUNPRO_VERSION \ - JSON_HEDLEY_VERSION_ENCODE( \ - (((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), \ - (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf), \ - (__SUNPRO_C & 0xf) * 10) -#elif defined(__SUNPRO_C) -#define JSON_HEDLEY_SUNPRO_VERSION \ - JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8) & 0xf, (__SUNPRO_C >> 4) & 0xf, (__SUNPRO_C) & 0xf) -#elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000) -#define JSON_HEDLEY_SUNPRO_VERSION \ - JSON_HEDLEY_VERSION_ENCODE( \ - (((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), \ - (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf), \ - (__SUNPRO_CC & 0xf) * 10) -#elif defined(__SUNPRO_CC) -#define JSON_HEDLEY_SUNPRO_VERSION \ - JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8) & 0xf, (__SUNPRO_CC >> 4) & 0xf, (__SUNPRO_CC) & 0xf) -#endif - -#if defined(JSON_HEDLEY_SUNPRO_VERSION_CHECK) -#undef JSON_HEDLEY_SUNPRO_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_SUNPRO_VERSION) -#define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_SUNPRO_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) -#undef JSON_HEDLEY_EMSCRIPTEN_VERSION -#endif -#if defined(__EMSCRIPTEN__) -#define JSON_HEDLEY_EMSCRIPTEN_VERSION \ - JSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__) -#endif - -#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK) -#undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) -#define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_EMSCRIPTEN_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_ARM_VERSION) -#undef JSON_HEDLEY_ARM_VERSION -#endif -#if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION) -#define JSON_HEDLEY_ARM_VERSION \ - JSON_HEDLEY_VERSION_ENCODE( \ - __ARMCOMPILER_VERSION / 1000000, \ - (__ARMCOMPILER_VERSION % 1000000) / 10000, \ - (__ARMCOMPILER_VERSION % 10000) / 100) -#elif defined(__CC_ARM) && defined(__ARMCC_VERSION) -#define JSON_HEDLEY_ARM_VERSION \ - JSON_HEDLEY_VERSION_ENCODE( \ - __ARMCC_VERSION / 1000000, (__ARMCC_VERSION % 1000000) / 10000, (__ARMCC_VERSION % 10000) / 100) -#endif - -#if defined(JSON_HEDLEY_ARM_VERSION_CHECK) -#undef JSON_HEDLEY_ARM_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_ARM_VERSION) -#define JSON_HEDLEY_ARM_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_ARM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_ARM_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_IBM_VERSION) -#undef JSON_HEDLEY_IBM_VERSION -#endif -#if defined(__ibmxl__) -#define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__) -#elif defined(__xlC__) && defined(__xlC_ver__) -#define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff) -#elif defined(__xlC__) -#define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, 0) -#endif - -#if defined(JSON_HEDLEY_IBM_VERSION_CHECK) -#undef JSON_HEDLEY_IBM_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_IBM_VERSION) -#define JSON_HEDLEY_IBM_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_IBM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_IBM_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_VERSION) -#undef JSON_HEDLEY_TI_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && \ - (defined(__TMS470__) || defined(__TI_ARM__) || defined(__MSP430__) || defined(__TMS320C2000__)) -#if (__TI_COMPILER_VERSION__ >= 16000000) -#define JSON_HEDLEY_TI_VERSION \ - JSON_HEDLEY_VERSION_ENCODE( \ - __TI_COMPILER_VERSION__ / 1000000, \ - (__TI_COMPILER_VERSION__ % 1000000) / 1000, \ - (__TI_COMPILER_VERSION__ % 1000)) -#endif -#endif - -#if defined(JSON_HEDLEY_TI_VERSION_CHECK) -#undef JSON_HEDLEY_TI_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_VERSION) -#define JSON_HEDLEY_TI_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_TI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_TI_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_CL2000_VERSION) -#undef JSON_HEDLEY_TI_CL2000_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__) -#define JSON_HEDLEY_TI_CL2000_VERSION \ - JSON_HEDLEY_VERSION_ENCODE( \ - __TI_COMPILER_VERSION__ / 1000000, \ - (__TI_COMPILER_VERSION__ % 1000000) / 1000, \ - (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_CL2000_VERSION_CHECK) -#undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_CL2000_VERSION) -#define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_TI_CL2000_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_CL430_VERSION) -#undef JSON_HEDLEY_TI_CL430_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && defined(__MSP430__) -#define JSON_HEDLEY_TI_CL430_VERSION \ - JSON_HEDLEY_VERSION_ENCODE( \ - __TI_COMPILER_VERSION__ / 1000000, \ - (__TI_COMPILER_VERSION__ % 1000000) / 1000, \ - (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_CL430_VERSION_CHECK) -#undef JSON_HEDLEY_TI_CL430_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_CL430_VERSION) -#define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_TI_CL430_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) -#undef JSON_HEDLEY_TI_ARMCL_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && (defined(__TMS470__) || defined(__TI_ARM__)) -#define JSON_HEDLEY_TI_ARMCL_VERSION \ - JSON_HEDLEY_VERSION_ENCODE( \ - __TI_COMPILER_VERSION__ / 1000000, \ - (__TI_COMPILER_VERSION__ % 1000000) / 1000, \ - (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_ARMCL_VERSION_CHECK) -#undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) -#define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_TI_ARMCL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_CL6X_VERSION) -#undef JSON_HEDLEY_TI_CL6X_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C6X__) -#define JSON_HEDLEY_TI_CL6X_VERSION \ - JSON_HEDLEY_VERSION_ENCODE( \ - __TI_COMPILER_VERSION__ / 1000000, \ - (__TI_COMPILER_VERSION__ % 1000000) / 1000, \ - (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_CL6X_VERSION_CHECK) -#undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_CL6X_VERSION) -#define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_TI_CL6X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_CL7X_VERSION) -#undef JSON_HEDLEY_TI_CL7X_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && defined(__C7000__) -#define JSON_HEDLEY_TI_CL7X_VERSION \ - JSON_HEDLEY_VERSION_ENCODE( \ - __TI_COMPILER_VERSION__ / 1000000, \ - (__TI_COMPILER_VERSION__ % 1000000) / 1000, \ - (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_CL7X_VERSION_CHECK) -#undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_CL7X_VERSION) -#define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_TI_CL7X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) -#undef JSON_HEDLEY_TI_CLPRU_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && defined(__PRU__) -#define JSON_HEDLEY_TI_CLPRU_VERSION \ - JSON_HEDLEY_VERSION_ENCODE( \ - __TI_COMPILER_VERSION__ / 1000000, \ - (__TI_COMPILER_VERSION__ % 1000000) / 1000, \ - (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_CLPRU_VERSION_CHECK) -#undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) -#define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_TI_CLPRU_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_CRAY_VERSION) -#undef JSON_HEDLEY_CRAY_VERSION -#endif -#if defined(_CRAYC) -#if defined(_RELEASE_PATCHLEVEL) -#define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL) -#else -#define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0) -#endif -#endif - -#if defined(JSON_HEDLEY_CRAY_VERSION_CHECK) -#undef JSON_HEDLEY_CRAY_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_CRAY_VERSION) -#define JSON_HEDLEY_CRAY_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_CRAY_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_CRAY_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_IAR_VERSION) -#undef JSON_HEDLEY_IAR_VERSION -#endif -#if defined(__IAR_SYSTEMS_ICC__) -#if __VER__ > 1000 -#define JSON_HEDLEY_IAR_VERSION \ - JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VER__ % 1000)) -#else -#define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE(__VER__ / 100, __VER__ % 100, 0) -#endif -#endif - -#if defined(JSON_HEDLEY_IAR_VERSION_CHECK) -#undef JSON_HEDLEY_IAR_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_IAR_VERSION) -#define JSON_HEDLEY_IAR_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_IAR_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_IAR_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_TINYC_VERSION) -#undef JSON_HEDLEY_TINYC_VERSION -#endif -#if defined(__TINYC__) -#define JSON_HEDLEY_TINYC_VERSION JSON_HEDLEY_VERSION_ENCODE(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100) -#endif - -#if defined(JSON_HEDLEY_TINYC_VERSION_CHECK) -#undef JSON_HEDLEY_TINYC_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TINYC_VERSION) -#define JSON_HEDLEY_TINYC_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_TINYC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_TINYC_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_DMC_VERSION) -#undef JSON_HEDLEY_DMC_VERSION -#endif -#if defined(__DMC__) -#define JSON_HEDLEY_DMC_VERSION JSON_HEDLEY_VERSION_ENCODE(__DMC__ >> 8, (__DMC__ >> 4) & 0xf, __DMC__ & 0xf) -#endif - -#if defined(JSON_HEDLEY_DMC_VERSION_CHECK) -#undef JSON_HEDLEY_DMC_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_DMC_VERSION) -#define JSON_HEDLEY_DMC_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_DMC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_DMC_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_COMPCERT_VERSION) -#undef JSON_HEDLEY_COMPCERT_VERSION -#endif -#if defined(__COMPCERT_VERSION__) -#define JSON_HEDLEY_COMPCERT_VERSION \ - JSON_HEDLEY_VERSION_ENCODE( \ - __COMPCERT_VERSION__ / 10000, (__COMPCERT_VERSION__ / 100) % 100, __COMPCERT_VERSION__ % 100) -#endif - -#if defined(JSON_HEDLEY_COMPCERT_VERSION_CHECK) -#undef JSON_HEDLEY_COMPCERT_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_COMPCERT_VERSION) -#define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_COMPCERT_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_PELLES_VERSION) -#undef JSON_HEDLEY_PELLES_VERSION -#endif -#if defined(__POCC__) -#define JSON_HEDLEY_PELLES_VERSION JSON_HEDLEY_VERSION_ENCODE(__POCC__ / 100, __POCC__ % 100, 0) -#endif - -#if defined(JSON_HEDLEY_PELLES_VERSION_CHECK) -#undef JSON_HEDLEY_PELLES_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_PELLES_VERSION) -#define JSON_HEDLEY_PELLES_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_PELLES_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_PELLES_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_MCST_LCC_VERSION) -#undef JSON_HEDLEY_MCST_LCC_VERSION -#endif -#if defined(__LCC__) && defined(__LCC_MINOR__) -#define JSON_HEDLEY_MCST_LCC_VERSION JSON_HEDLEY_VERSION_ENCODE(__LCC__ / 100, __LCC__ % 100, __LCC_MINOR__) -#endif - -#if defined(JSON_HEDLEY_MCST_LCC_VERSION_CHECK) -#undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_MCST_LCC_VERSION) -#define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_MCST_LCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_GCC_VERSION) -#undef JSON_HEDLEY_GCC_VERSION -#endif -#if defined(JSON_HEDLEY_GNUC_VERSION) && !defined(__clang__) && !defined(JSON_HEDLEY_INTEL_VERSION) && \ - !defined(JSON_HEDLEY_PGI_VERSION) && !defined(JSON_HEDLEY_ARM_VERSION) && !defined(JSON_HEDLEY_CRAY_VERSION) && \ - !defined(JSON_HEDLEY_TI_VERSION) && !defined(JSON_HEDLEY_TI_ARMCL_VERSION) && \ - !defined(JSON_HEDLEY_TI_CL430_VERSION) && !defined(JSON_HEDLEY_TI_CL2000_VERSION) && \ - !defined(JSON_HEDLEY_TI_CL6X_VERSION) && !defined(JSON_HEDLEY_TI_CL7X_VERSION) && \ - !defined(JSON_HEDLEY_TI_CLPRU_VERSION) && !defined(__COMPCERT__) && !defined(JSON_HEDLEY_MCST_LCC_VERSION) -#define JSON_HEDLEY_GCC_VERSION JSON_HEDLEY_GNUC_VERSION -#endif - -#if defined(JSON_HEDLEY_GCC_VERSION_CHECK) -#undef JSON_HEDLEY_GCC_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_GCC_VERSION) -#define JSON_HEDLEY_GCC_VERSION_CHECK(major, minor, patch) \ - (JSON_HEDLEY_GCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else -#define JSON_HEDLEY_GCC_VERSION_CHECK(major, minor, patch) (0) -#endif - -#if defined(JSON_HEDLEY_HAS_ATTRIBUTE) -#undef JSON_HEDLEY_HAS_ATTRIBUTE -#endif -#if defined(__has_attribute) && ((!defined(JSON_HEDLEY_IAR_VERSION) || JSON_HEDLEY_IAR_VERSION_CHECK(8, 5, 9))) -#define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute) -#else -#define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_ATTRIBUTE) -#undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE -#endif -#if defined(__has_attribute) -#define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute, major, minor, patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) -#else -#define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute, major, minor, patch) \ - JSON_HEDLEY_GNUC_VERSION_CHECK(major, minor, patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_ATTRIBUTE) -#undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE -#endif -#if defined(__has_attribute) -#define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute, major, minor, patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) -#else -#define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute, major, minor, patch) JSON_HEDLEY_GCC_VERSION_CHECK(major, minor, patch) -#endif - -#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE) -#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE -#endif -#if defined(__has_cpp_attribute) && defined(__cplusplus) && \ - (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 15, 0)) -#define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute) -#else -#define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0) -#endif - -#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS) -#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS -#endif -#if !defined(__cplusplus) || !defined(__has_cpp_attribute) -#define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns, attribute) (0) -#elif !defined(JSON_HEDLEY_PGI_VERSION) && !defined(JSON_HEDLEY_IAR_VERSION) && \ - (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 15, 0)) && \ - (!defined(JSON_HEDLEY_MSVC_VERSION) || JSON_HEDLEY_MSVC_VERSION_CHECK(19, 20, 0)) -#define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns, attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute) -#else -#define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns, attribute) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE) -#undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE -#endif -#if defined(__has_cpp_attribute) && defined(__cplusplus) -#define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute, major, minor, patch) __has_cpp_attribute(attribute) -#else -#define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute, major, minor, patch) \ - JSON_HEDLEY_GNUC_VERSION_CHECK(major, minor, patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE) -#undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE -#endif -#if defined(__has_cpp_attribute) && defined(__cplusplus) -#define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute, major, minor, patch) __has_cpp_attribute(attribute) -#else -#define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute, major, minor, patch) \ - JSON_HEDLEY_GCC_VERSION_CHECK(major, minor, patch) -#endif - -#if defined(JSON_HEDLEY_HAS_BUILTIN) -#undef JSON_HEDLEY_HAS_BUILTIN -#endif -#if defined(__has_builtin) -#define JSON_HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin) -#else -#define JSON_HEDLEY_HAS_BUILTIN(builtin) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_BUILTIN) -#undef JSON_HEDLEY_GNUC_HAS_BUILTIN -#endif -#if defined(__has_builtin) -#define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin, major, minor, patch) __has_builtin(builtin) -#else -#define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin, major, minor, patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major, minor, patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_BUILTIN) -#undef JSON_HEDLEY_GCC_HAS_BUILTIN -#endif -#if defined(__has_builtin) -#define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin, major, minor, patch) __has_builtin(builtin) -#else -#define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin, major, minor, patch) JSON_HEDLEY_GCC_VERSION_CHECK(major, minor, patch) -#endif - -#if defined(JSON_HEDLEY_HAS_FEATURE) -#undef JSON_HEDLEY_HAS_FEATURE -#endif -#if defined(__has_feature) -#define JSON_HEDLEY_HAS_FEATURE(feature) __has_feature(feature) -#else -#define JSON_HEDLEY_HAS_FEATURE(feature) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_FEATURE) -#undef JSON_HEDLEY_GNUC_HAS_FEATURE -#endif -#if defined(__has_feature) -#define JSON_HEDLEY_GNUC_HAS_FEATURE(feature, major, minor, patch) __has_feature(feature) -#else -#define JSON_HEDLEY_GNUC_HAS_FEATURE(feature, major, minor, patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major, minor, patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_FEATURE) -#undef JSON_HEDLEY_GCC_HAS_FEATURE -#endif -#if defined(__has_feature) -#define JSON_HEDLEY_GCC_HAS_FEATURE(feature, major, minor, patch) __has_feature(feature) -#else -#define JSON_HEDLEY_GCC_HAS_FEATURE(feature, major, minor, patch) JSON_HEDLEY_GCC_VERSION_CHECK(major, minor, patch) -#endif - -#if defined(JSON_HEDLEY_HAS_EXTENSION) -#undef JSON_HEDLEY_HAS_EXTENSION -#endif -#if defined(__has_extension) -#define JSON_HEDLEY_HAS_EXTENSION(extension) __has_extension(extension) -#else -#define JSON_HEDLEY_HAS_EXTENSION(extension) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_EXTENSION) -#undef JSON_HEDLEY_GNUC_HAS_EXTENSION -#endif -#if defined(__has_extension) -#define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension, major, minor, patch) __has_extension(extension) -#else -#define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension, major, minor, patch) \ - JSON_HEDLEY_GNUC_VERSION_CHECK(major, minor, patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_EXTENSION) -#undef JSON_HEDLEY_GCC_HAS_EXTENSION -#endif -#if defined(__has_extension) -#define JSON_HEDLEY_GCC_HAS_EXTENSION(extension, major, minor, patch) __has_extension(extension) -#else -#define JSON_HEDLEY_GCC_HAS_EXTENSION(extension, major, minor, patch) JSON_HEDLEY_GCC_VERSION_CHECK(major, minor, patch) -#endif - -#if defined(JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE) -#undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE -#endif -#if defined(__has_declspec_attribute) -#define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute) -#else -#define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE) -#undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE -#endif -#if defined(__has_declspec_attribute) -#define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute, major, minor, patch) __has_declspec_attribute(attribute) -#else -#define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute, major, minor, patch) \ - JSON_HEDLEY_GNUC_VERSION_CHECK(major, minor, patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE) -#undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE -#endif -#if defined(__has_declspec_attribute) -#define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute, major, minor, patch) __has_declspec_attribute(attribute) -#else -#define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute, major, minor, patch) \ - JSON_HEDLEY_GCC_VERSION_CHECK(major, minor, patch) -#endif - -#if defined(JSON_HEDLEY_HAS_WARNING) -#undef JSON_HEDLEY_HAS_WARNING -#endif -#if defined(__has_warning) -#define JSON_HEDLEY_HAS_WARNING(warning) __has_warning(warning) -#else -#define JSON_HEDLEY_HAS_WARNING(warning) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_WARNING) -#undef JSON_HEDLEY_GNUC_HAS_WARNING -#endif -#if defined(__has_warning) -#define JSON_HEDLEY_GNUC_HAS_WARNING(warning, major, minor, patch) __has_warning(warning) -#else -#define JSON_HEDLEY_GNUC_HAS_WARNING(warning, major, minor, patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major, minor, patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_WARNING) -#undef JSON_HEDLEY_GCC_HAS_WARNING -#endif -#if defined(__has_warning) -#define JSON_HEDLEY_GCC_HAS_WARNING(warning, major, minor, patch) __has_warning(warning) -#else -#define JSON_HEDLEY_GCC_HAS_WARNING(warning, major, minor, patch) JSON_HEDLEY_GCC_VERSION_CHECK(major, minor, patch) -#endif - -#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || defined(__clang__) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3, 0, 0) || JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || \ - JSON_HEDLEY_IAR_VERSION_CHECK(8, 0, 0) || JSON_HEDLEY_PGI_VERSION_CHECK(18, 4, 0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || JSON_HEDLEY_TI_VERSION_CHECK(15, 12, 0) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4, 7, 0) || JSON_HEDLEY_TI_CL430_VERSION_CHECK(2, 0, 1) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 1, 0) || JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 0, 0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0) || \ - JSON_HEDLEY_CRAY_VERSION_CHECK(5, 0, 0) || JSON_HEDLEY_TINYC_VERSION_CHECK(0, 9, 17) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(8, 0, 0) || \ - (JSON_HEDLEY_IBM_VERSION_CHECK(10, 1, 0) && defined(__C99_PRAGMA_OPERATOR)) -#define JSON_HEDLEY_PRAGMA(value) _Pragma(#value) -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15, 0, 0) -#define JSON_HEDLEY_PRAGMA(value) __pragma(value) -#else -#define JSON_HEDLEY_PRAGMA(value) -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_PUSH) -#undef JSON_HEDLEY_DIAGNOSTIC_PUSH -#endif -#if defined(JSON_HEDLEY_DIAGNOSTIC_POP) -#undef JSON_HEDLEY_DIAGNOSTIC_POP -#endif -#if defined(__clang__) -#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push") -#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("clang diagnostic pop") -#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) -#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") -#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(4, 6, 0) -#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push") -#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop") -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15, 0, 0) || JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) -#define JSON_HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push)) -#define JSON_HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop)) -#elif JSON_HEDLEY_ARM_VERSION_CHECK(5, 6, 0) -#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("push") -#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("pop") -#elif JSON_HEDLEY_TI_VERSION_CHECK(15, 12, 0) || JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5, 2, 0) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 4, 0) || JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8, 1, 0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0) -#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("diag_push") -#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("diag_pop") -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2, 90, 0) -#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") -#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") -#else -#define JSON_HEDLEY_DIAGNOSTIC_PUSH -#define JSON_HEDLEY_DIAGNOSTIC_POP -#endif - -/* JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ is for - HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) -#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ -#endif -#if defined(__cplusplus) -#if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat") -#if JSON_HEDLEY_HAS_WARNING("-Wc++17-extensions") -#if JSON_HEDLEY_HAS_WARNING("-Wc++1z-extensions") -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ - _Pragma("clang diagnostic ignored \"-Wc++1z-extensions\"") xpr JSON_HEDLEY_DIAGNOSTIC_POP -#else -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ - xpr JSON_HEDLEY_DIAGNOSTIC_POP -#endif -#else -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") xpr JSON_HEDLEY_DIAGNOSTIC_POP -#endif -#endif -#endif -#if !defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x) x -#endif - -#if defined(JSON_HEDLEY_CONST_CAST) -#undef JSON_HEDLEY_CONST_CAST -#endif -#if defined(__cplusplus) -#define JSON_HEDLEY_CONST_CAST(T, expr) (const_cast(expr)) -#elif JSON_HEDLEY_HAS_WARNING("-Wcast-qual") || JSON_HEDLEY_GCC_VERSION_CHECK(4, 6, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) -#define JSON_HEDLEY_CONST_CAST(T, expr) \ - (__extension__({ \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL((T)(expr)); \ - JSON_HEDLEY_DIAGNOSTIC_POP \ - })) -#else -#define JSON_HEDLEY_CONST_CAST(T, expr) ((T)(expr)) -#endif - -#if defined(JSON_HEDLEY_REINTERPRET_CAST) -#undef JSON_HEDLEY_REINTERPRET_CAST -#endif -#if defined(__cplusplus) -#define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast(expr)) -#else -#define JSON_HEDLEY_REINTERPRET_CAST(T, expr) ((T)(expr)) -#endif - -#if defined(JSON_HEDLEY_STATIC_CAST) -#undef JSON_HEDLEY_STATIC_CAST -#endif -#if defined(__cplusplus) -#define JSON_HEDLEY_STATIC_CAST(T, expr) (static_cast(expr)) -#else -#define JSON_HEDLEY_STATIC_CAST(T, expr) ((T)(expr)) -#endif - -#if defined(JSON_HEDLEY_CPP_CAST) -#undef JSON_HEDLEY_CPP_CAST -#endif -#if defined(__cplusplus) -#if JSON_HEDLEY_HAS_WARNING("-Wold-style-cast") -#define JSON_HEDLEY_CPP_CAST(T, expr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wold-style-cast\"")((T)(expr)) JSON_HEDLEY_DIAGNOSTIC_POP -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8, 3, 0) -#define JSON_HEDLEY_CPP_CAST(T, expr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("diag_suppress=Pe137") JSON_HEDLEY_DIAGNOSTIC_POP -#else -#define JSON_HEDLEY_CPP_CAST(T, expr) ((T)(expr)) -#endif -#else -#define JSON_HEDLEY_CPP_CAST(T, expr) (expr) -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED) -#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wdeprecated-declarations") -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") -#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warning(disable:1478 1786)") -#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable : 1478 1786)) -#elif JSON_HEDLEY_PGI_VERSION_CHECK(20, 7, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1216,1444,1445") -#elif JSON_HEDLEY_PGI_VERSION_CHECK(17, 10, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(4, 3, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15, 0, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable : 4996)) -#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") -#elif JSON_HEDLEY_TI_VERSION_CHECK(15, 12, 0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4, 8, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5, 2, 0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 4, 0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 3, 0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 2, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 5, 0) || JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1291,1718") -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 13, 0) && !defined(__cplusplus) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)") -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 13, 0) && defined(__cplusplus) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,symdeprecated,symdeprecated2)") -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8, 0, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress=Pe1444,Pe1215") -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2, 90, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warn(disable:2241)") -#else -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS) -#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"") -#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("warning(disable:161)") -#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable : 161)) -#elif JSON_HEDLEY_PGI_VERSION_CHECK(17, 10, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 1675") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(4, 3, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15, 0, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable : 4068)) -#elif JSON_HEDLEY_TI_VERSION_CHECK(16, 9, 0) || JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8, 0, 0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 3, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") -#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8, 0, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8, 0, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress=Pe161") -#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 161") -#else -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES) -#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wunknown-attributes") -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES \ - _Pragma("clang diagnostic ignored \"-Wunknown-attributes\"") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(4, 6, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES \ - _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") -#elif JSON_HEDLEY_INTEL_VERSION_CHECK(17, 0, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("warning(disable:1292)") -#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable : 1292)) -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(19, 0, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable : 5030)) -#elif JSON_HEDLEY_PGI_VERSION_CHECK(20, 7, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097,1098") -#elif JSON_HEDLEY_PGI_VERSION_CHECK(17, 10, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 14, 0) && defined(__cplusplus) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("error_messages(off,attrskipunsup)") -#elif JSON_HEDLEY_TI_VERSION_CHECK(18, 1, 0) || JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8, 3, 0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1173") -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8, 0, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress=Pe1097") -#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") -#else -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL) -#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wcast-qual") -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("clang diagnostic ignored \"-Wcast-qual\"") -#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("warning(disable:2203 2331)") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(3, 0, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("GCC diagnostic ignored \"-Wcast-qual\"") -#else -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION) -#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wunused-function") -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("clang diagnostic ignored \"-Wunused-function\"") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(3, 4, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("GCC diagnostic ignored \"-Wunused-function\"") -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(1, 0, 0) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION __pragma(warning(disable : 4505)) -#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("diag_suppress 3142") -#else -#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION -#endif - -#if defined(JSON_HEDLEY_DEPRECATED) -#undef JSON_HEDLEY_DEPRECATED -#endif -#if defined(JSON_HEDLEY_DEPRECATED_FOR) -#undef JSON_HEDLEY_DEPRECATED_FOR -#endif -#if JSON_HEDLEY_MSVC_VERSION_CHECK(14, 0, 0) || JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) -#define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated("Since " #since)) -#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated("Since " #since "; use " #replacement)) -#elif (JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4, 5, 0) || JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(5, 6, 0) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 13, 0) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(17, 10, 0) || JSON_HEDLEY_TI_VERSION_CHECK(18, 1, 0) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(18, 1, 0) || JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8, 3, 0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 3, 0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__("Since " #since))) -#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) \ - __attribute__((__deprecated__("Since " #since "; use " #replacement))) -#elif defined(__cplusplus) && (__cplusplus >= 201402L) -#define JSON_HEDLEY_DEPRECATED(since) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since)]]) -#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) \ - JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since "; use " #replacement)]]) -#elif JSON_HEDLEY_HAS_ATTRIBUTE(deprecated) || JSON_HEDLEY_GCC_VERSION_CHECK(3, 1, 0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || JSON_HEDLEY_TI_VERSION_CHECK(15, 12, 0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4, 8, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5, 2, 0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 4, 0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 3, 0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 2, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 5, 0) || JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0) || JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) || \ - JSON_HEDLEY_IAR_VERSION_CHECK(8, 10, 0) -#define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__)) -#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__)) -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(13, 10, 0) || JSON_HEDLEY_PELLES_VERSION_CHECK(6, 50, 0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) -#define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated) -#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated) -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8, 0, 0) -#define JSON_HEDLEY_DEPRECATED(since) _Pragma("deprecated") -#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma("deprecated") -#else -#define JSON_HEDLEY_DEPRECATED(since) -#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) -#endif - -#if defined(JSON_HEDLEY_UNAVAILABLE) -#undef JSON_HEDLEY_UNAVAILABLE -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(warning) || JSON_HEDLEY_GCC_VERSION_CHECK(4, 3, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__("Not available until " #available_since))) -#else -#define JSON_HEDLEY_UNAVAILABLE(available_since) -#endif - -#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT) -#undef JSON_HEDLEY_WARN_UNUSED_RESULT -#endif -#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT_MSG) -#undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(warn_unused_result) || JSON_HEDLEY_GCC_VERSION_CHECK(3, 4, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || JSON_HEDLEY_TI_VERSION_CHECK(15, 12, 0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4, 8, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5, 2, 0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 4, 0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 3, 0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 2, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 5, 0) || JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0) || \ - (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 15, 0) && defined(__cplusplus)) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(17, 10, 0) || JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) -#define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) __attribute__((__warn_unused_result__)) -#elif (JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) >= 201907L) -#define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) -#define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard(msg)]]) -#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) -#define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) -#define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) -#elif defined(_Check_return_) /* SAL */ -#define JSON_HEDLEY_WARN_UNUSED_RESULT _Check_return_ -#define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) _Check_return_ -#else -#define JSON_HEDLEY_WARN_UNUSED_RESULT -#define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) -#endif - -#if defined(JSON_HEDLEY_SENTINEL) -#undef JSON_HEDLEY_SENTINEL -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(sentinel) || JSON_HEDLEY_GCC_VERSION_CHECK(4, 0, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || JSON_HEDLEY_ARM_VERSION_CHECK(5, 4, 0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position))) -#else -#define JSON_HEDLEY_SENTINEL(position) -#endif - -#if defined(JSON_HEDLEY_NO_RETURN) -#undef JSON_HEDLEY_NO_RETURN -#endif -#if JSON_HEDLEY_IAR_VERSION_CHECK(8, 0, 0) -#define JSON_HEDLEY_NO_RETURN __noreturn -#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) -#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L -#define JSON_HEDLEY_NO_RETURN _Noreturn -#elif defined(__cplusplus) && (__cplusplus >= 201103L) -#define JSON_HEDLEY_NO_RETURN JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]]) -#elif JSON_HEDLEY_HAS_ATTRIBUTE(noreturn) || JSON_HEDLEY_GCC_VERSION_CHECK(3, 2, 0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 11, 0) || JSON_HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10, 1, 0) || JSON_HEDLEY_TI_VERSION_CHECK(15, 12, 0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4, 8, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5, 2, 0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 4, 0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 3, 0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 2, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 5, 0) || JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0) || JSON_HEDLEY_IAR_VERSION_CHECK(8, 10, 0) -#define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 10, 0) -#define JSON_HEDLEY_NO_RETURN _Pragma("does_not_return") -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(13, 10, 0) || JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) -#define JSON_HEDLEY_NO_RETURN __declspec(noreturn) -#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6, 0, 0) && defined(__cplusplus) -#define JSON_HEDLEY_NO_RETURN _Pragma("FUNC_NEVER_RETURNS;") -#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3, 2, 0) -#define JSON_HEDLEY_NO_RETURN __attribute((noreturn)) -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9, 0, 0) -#define JSON_HEDLEY_NO_RETURN __declspec(noreturn) -#else -#define JSON_HEDLEY_NO_RETURN -#endif - -#if defined(JSON_HEDLEY_NO_ESCAPE) -#undef JSON_HEDLEY_NO_ESCAPE -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(noescape) -#define JSON_HEDLEY_NO_ESCAPE __attribute__((__noescape__)) -#else -#define JSON_HEDLEY_NO_ESCAPE -#endif - -#if defined(JSON_HEDLEY_UNREACHABLE) -#undef JSON_HEDLEY_UNREACHABLE -#endif -#if defined(JSON_HEDLEY_UNREACHABLE_RETURN) -#undef JSON_HEDLEY_UNREACHABLE_RETURN -#endif -#if defined(JSON_HEDLEY_ASSUME) -#undef JSON_HEDLEY_ASSUME -#endif -#if JSON_HEDLEY_MSVC_VERSION_CHECK(13, 10, 0) || JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) -#define JSON_HEDLEY_ASSUME(expr) __assume(expr) -#elif JSON_HEDLEY_HAS_BUILTIN(__builtin_assume) -#define JSON_HEDLEY_ASSUME(expr) __builtin_assume(expr) -#elif JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 2, 0) || JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4, 0, 0) -#if defined(__cplusplus) -#define JSON_HEDLEY_ASSUME(expr) std::_nassert(expr) -#else -#define JSON_HEDLEY_ASSUME(expr) _nassert(expr) -#endif -#endif -#if (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && (!defined(JSON_HEDLEY_ARM_VERSION))) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4, 5, 0) || JSON_HEDLEY_PGI_VERSION_CHECK(18, 10, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || JSON_HEDLEY_IBM_VERSION_CHECK(13, 1, 5) || \ - JSON_HEDLEY_CRAY_VERSION_CHECK(10, 0, 0) || JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_UNREACHABLE() __builtin_unreachable() -#elif defined(JSON_HEDLEY_ASSUME) -#define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) -#endif -#if !defined(JSON_HEDLEY_ASSUME) -#if defined(JSON_HEDLEY_UNREACHABLE) -#define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, ((expr) ? 1 : (JSON_HEDLEY_UNREACHABLE(), 1))) -#else -#define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, expr) -#endif -#endif -#if defined(JSON_HEDLEY_UNREACHABLE) -#if JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 2, 0) || JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4, 0, 0) -#define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (JSON_HEDLEY_STATIC_CAST(void, JSON_HEDLEY_ASSUME(0)), (value)) -#else -#define JSON_HEDLEY_UNREACHABLE_RETURN(value) JSON_HEDLEY_UNREACHABLE() -#endif -#else -#define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (value) -#endif -#if !defined(JSON_HEDLEY_UNREACHABLE) -#define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) -#endif - -JSON_HEDLEY_DIAGNOSTIC_PUSH -#if JSON_HEDLEY_HAS_WARNING("-Wpedantic") -#pragma clang diagnostic ignored "-Wpedantic" -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat-pedantic") && defined(__cplusplus) -#pragma clang diagnostic ignored "-Wc++98-compat-pedantic" -#endif -#if JSON_HEDLEY_GCC_HAS_WARNING("-Wvariadic-macros", 4, 0, 0) -#if defined(__clang__) -#pragma clang diagnostic ignored "-Wvariadic-macros" -#elif defined(JSON_HEDLEY_GCC_VERSION) -#pragma GCC diagnostic ignored "-Wvariadic-macros" -#endif -#endif -#if defined(JSON_HEDLEY_NON_NULL) -#undef JSON_HEDLEY_NON_NULL -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(nonnull) || JSON_HEDLEY_GCC_VERSION_CHECK(3, 3, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || JSON_HEDLEY_ARM_VERSION_CHECK(4, 1, 0) -#define JSON_HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__))) -#else -#define JSON_HEDLEY_NON_NULL(...) -#endif -JSON_HEDLEY_DIAGNOSTIC_POP - -#if defined(JSON_HEDLEY_PRINTF_FORMAT) -#undef JSON_HEDLEY_PRINTF_FORMAT -#endif -#if defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format, 4, 4, 0) && !defined(__USE_MINGW_ANSI_STDIO) -#define JSON_HEDLEY_PRINTF_FORMAT(string_idx, first_to_check) \ - __attribute__((__format__(ms_printf, string_idx, first_to_check))) -#elif defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format, 4, 4, 0) && defined(__USE_MINGW_ANSI_STDIO) -#define JSON_HEDLEY_PRINTF_FORMAT(string_idx, first_to_check) \ - __attribute__((__format__(gnu_printf, string_idx, first_to_check))) -#elif JSON_HEDLEY_HAS_ATTRIBUTE(format) || JSON_HEDLEY_GCC_VERSION_CHECK(3, 1, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || JSON_HEDLEY_ARM_VERSION_CHECK(5, 6, 0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10, 1, 0) || JSON_HEDLEY_TI_VERSION_CHECK(15, 12, 0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4, 8, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5, 2, 0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 4, 0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 3, 0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 2, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 5, 0) || JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0) || JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_PRINTF_FORMAT(string_idx, first_to_check) \ - __attribute__((__format__(__printf__, string_idx, first_to_check))) -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(6, 0, 0) -#define JSON_HEDLEY_PRINTF_FORMAT(string_idx, first_to_check) __declspec(vaformat(printf, string_idx, first_to_check)) -#else -#define JSON_HEDLEY_PRINTF_FORMAT(string_idx, first_to_check) -#endif - -#if defined(JSON_HEDLEY_CONSTEXPR) -#undef JSON_HEDLEY_CONSTEXPR -#endif -#if defined(__cplusplus) -#if __cplusplus >= 201103L -#define JSON_HEDLEY_CONSTEXPR JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr) -#endif -#endif -#if !defined(JSON_HEDLEY_CONSTEXPR) -#define JSON_HEDLEY_CONSTEXPR -#endif - -#if defined(JSON_HEDLEY_PREDICT) -#undef JSON_HEDLEY_PREDICT -#endif -#if defined(JSON_HEDLEY_LIKELY) -#undef JSON_HEDLEY_LIKELY -#endif -#if defined(JSON_HEDLEY_UNLIKELY) -#undef JSON_HEDLEY_UNLIKELY -#endif -#if defined(JSON_HEDLEY_UNPREDICTABLE) -#undef JSON_HEDLEY_UNPREDICTABLE -#endif -#if JSON_HEDLEY_HAS_BUILTIN(__builtin_unpredictable) -#define JSON_HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable((expr)) -#endif -#if (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability) && !defined(JSON_HEDLEY_PGI_VERSION)) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(9, 0, 0) || JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability((expr), (value), (probability)) -#define JSON_HEDLEY_PREDICT_TRUE(expr, probability) __builtin_expect_with_probability(!!(expr), 1, (probability)) -#define JSON_HEDLEY_PREDICT_FALSE(expr, probability) __builtin_expect_with_probability(!!(expr), 0, (probability)) -#define JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1) -#define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0) -#elif (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3, 0, 0) || JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || \ - (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 15, 0) && defined(__cplusplus)) || JSON_HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10, 1, 0) || JSON_HEDLEY_TI_VERSION_CHECK(15, 12, 0) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4, 7, 0) || JSON_HEDLEY_TI_CL430_VERSION_CHECK(3, 1, 0) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 1, 0) || JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6, 1, 0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0) || \ - JSON_HEDLEY_TINYC_VERSION_CHECK(0, 9, 27) || JSON_HEDLEY_CRAY_VERSION_CHECK(8, 1, 0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_PREDICT(expr, expected, probability) \ - (((probability) >= 0.9) ? __builtin_expect((expr), (expected)) : (JSON_HEDLEY_STATIC_CAST(void, expected), (expr))) -#define JSON_HEDLEY_PREDICT_TRUE(expr, probability) \ - (__extension__({ \ - double hedley_probability_ = (probability); \ - ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 1) \ - : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 0) : !!(expr))); \ - })) -#define JSON_HEDLEY_PREDICT_FALSE(expr, probability) \ - (__extension__({ \ - double hedley_probability_ = (probability); \ - ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 0) \ - : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 1) : !!(expr))); \ - })) -#define JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1) -#define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0) -#else -#define JSON_HEDLEY_PREDICT(expr, expected, probability) (JSON_HEDLEY_STATIC_CAST(void, expected), (expr)) -#define JSON_HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr)) -#define JSON_HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr)) -#define JSON_HEDLEY_LIKELY(expr) (!!(expr)) -#define JSON_HEDLEY_UNLIKELY(expr) (!!(expr)) -#endif -#if !defined(JSON_HEDLEY_UNPREDICTABLE) -#define JSON_HEDLEY_UNPREDICTABLE(expr) JSON_HEDLEY_PREDICT(expr, 1, 0.5) -#endif - -#if defined(JSON_HEDLEY_MALLOC) -#undef JSON_HEDLEY_MALLOC -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(malloc) || JSON_HEDLEY_GCC_VERSION_CHECK(3, 1, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 11, 0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || JSON_HEDLEY_IBM_VERSION_CHECK(12, 1, 0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15, 12, 0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4, 8, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5, 2, 0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 4, 0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 3, 0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 2, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 5, 0) || JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0) || JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_MALLOC __attribute__((__malloc__)) -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 10, 0) -#define JSON_HEDLEY_MALLOC _Pragma("returns_new_memory") -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(14, 0, 0) || JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) -#define JSON_HEDLEY_MALLOC __declspec(restrict) -#else -#define JSON_HEDLEY_MALLOC -#endif - -#if defined(JSON_HEDLEY_PURE) -#undef JSON_HEDLEY_PURE -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(pure) || JSON_HEDLEY_GCC_VERSION_CHECK(2, 96, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 11, 0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || JSON_HEDLEY_IBM_VERSION_CHECK(10, 1, 0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15, 12, 0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4, 8, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5, 2, 0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 4, 0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 3, 0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 2, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 5, 0) || JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0) || JSON_HEDLEY_PGI_VERSION_CHECK(17, 10, 0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_PURE __attribute__((__pure__)) -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 10, 0) -#define JSON_HEDLEY_PURE _Pragma("does_not_write_global_data") -#elif defined(__cplusplus) && \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(2, 0, 1) || JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4, 0, 0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0)) -#define JSON_HEDLEY_PURE _Pragma("FUNC_IS_PURE;") -#else -#define JSON_HEDLEY_PURE -#endif - -#if defined(JSON_HEDLEY_CONST) -#undef JSON_HEDLEY_CONST -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(const) || JSON_HEDLEY_GCC_VERSION_CHECK(2, 5, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 11, 0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || JSON_HEDLEY_IBM_VERSION_CHECK(10, 1, 0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15, 12, 0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4, 8, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5, 2, 0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 4, 0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 3, 0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 2, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 5, 0) || JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0) || JSON_HEDLEY_PGI_VERSION_CHECK(17, 10, 0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_CONST __attribute__((__const__)) -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 10, 0) -#define JSON_HEDLEY_CONST _Pragma("no_side_effect") -#else -#define JSON_HEDLEY_CONST JSON_HEDLEY_PURE -#endif - -#if defined(JSON_HEDLEY_RESTRICT) -#undef JSON_HEDLEY_RESTRICT -#endif -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus) -#define JSON_HEDLEY_RESTRICT restrict -#elif JSON_HEDLEY_GCC_VERSION_CHECK(3, 1, 0) || JSON_HEDLEY_MSVC_VERSION_CHECK(14, 0, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || JSON_HEDLEY_IBM_VERSION_CHECK(10, 1, 0) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(17, 10, 0) || JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 3, 0) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 2, 4) || JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8, 1, 0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || \ - (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 14, 0) && defined(__cplusplus)) || JSON_HEDLEY_IAR_VERSION_CHECK(8, 0, 0) || \ - defined(__clang__) || JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_RESTRICT __restrict -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 3, 0) && !defined(__cplusplus) -#define JSON_HEDLEY_RESTRICT _Restrict -#else -#define JSON_HEDLEY_RESTRICT -#endif - -#if defined(JSON_HEDLEY_INLINE) -#undef JSON_HEDLEY_INLINE -#endif -#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || (defined(__cplusplus) && (__cplusplus >= 199711L)) -#define JSON_HEDLEY_INLINE inline -#elif defined(JSON_HEDLEY_GCC_VERSION) || JSON_HEDLEY_ARM_VERSION_CHECK(6, 2, 0) -#define JSON_HEDLEY_INLINE __inline__ -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(12, 0, 0) || JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5, 1, 0) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(3, 1, 0) || JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 2, 0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8, 0, 0) || JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0) || JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_INLINE __inline -#else -#define JSON_HEDLEY_INLINE -#endif - -#if defined(JSON_HEDLEY_ALWAYS_INLINE) -#undef JSON_HEDLEY_ALWAYS_INLINE -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(always_inline) || JSON_HEDLEY_GCC_VERSION_CHECK(4, 0, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 11, 0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || JSON_HEDLEY_IBM_VERSION_CHECK(10, 1, 0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15, 12, 0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4, 8, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5, 2, 0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 4, 0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 3, 0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 2, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 5, 0) || JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0) || JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) || \ - JSON_HEDLEY_IAR_VERSION_CHECK(8, 10, 0) -#define JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) JSON_HEDLEY_INLINE -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(12, 0, 0) || JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) -#define JSON_HEDLEY_ALWAYS_INLINE __forceinline -#elif defined(__cplusplus) && \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5, 2, 0) || JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 3, 0) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 4, 0) || JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6, 1, 0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0)) -#define JSON_HEDLEY_ALWAYS_INLINE _Pragma("FUNC_ALWAYS_INLINE;") -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8, 0, 0) -#define JSON_HEDLEY_ALWAYS_INLINE _Pragma("inline=forced") -#else -#define JSON_HEDLEY_ALWAYS_INLINE JSON_HEDLEY_INLINE -#endif - -#if defined(JSON_HEDLEY_NEVER_INLINE) -#undef JSON_HEDLEY_NEVER_INLINE -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(noinline) || JSON_HEDLEY_GCC_VERSION_CHECK(4, 0, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 11, 0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || JSON_HEDLEY_IBM_VERSION_CHECK(10, 1, 0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15, 12, 0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4, 8, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5, 2, 0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6, 4, 0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 0, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4, 3, 0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 2, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 5, 0) || JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1, 2, 0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2, 1, 0) || JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) || \ - JSON_HEDLEY_IAR_VERSION_CHECK(8, 10, 0) -#define JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__)) -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(13, 10, 0) || JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) -#define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) -#elif JSON_HEDLEY_PGI_VERSION_CHECK(10, 2, 0) -#define JSON_HEDLEY_NEVER_INLINE _Pragma("noinline") -#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6, 0, 0) && defined(__cplusplus) -#define JSON_HEDLEY_NEVER_INLINE _Pragma("FUNC_CANNOT_INLINE;") -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8, 0, 0) -#define JSON_HEDLEY_NEVER_INLINE _Pragma("inline=never") -#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3, 2, 0) -#define JSON_HEDLEY_NEVER_INLINE __attribute((noinline)) -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9, 0, 0) -#define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) -#else -#define JSON_HEDLEY_NEVER_INLINE -#endif - -#if defined(JSON_HEDLEY_PRIVATE) -#undef JSON_HEDLEY_PRIVATE -#endif -#if defined(JSON_HEDLEY_PUBLIC) -#undef JSON_HEDLEY_PUBLIC -#endif -#if defined(JSON_HEDLEY_IMPORT) -#undef JSON_HEDLEY_IMPORT -#endif -#if defined(_WIN32) || defined(__CYGWIN__) -#define JSON_HEDLEY_PRIVATE -#define JSON_HEDLEY_PUBLIC __declspec(dllexport) -#define JSON_HEDLEY_IMPORT __declspec(dllimport) -#else -#if JSON_HEDLEY_HAS_ATTRIBUTE(visibility) || JSON_HEDLEY_GCC_VERSION_CHECK(3, 3, 0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 11, 0) || JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || JSON_HEDLEY_IBM_VERSION_CHECK(13, 1, 0) || \ - (defined(__TI_EABI__) && ((JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 2, 0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7, 5, 0))) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_PRIVATE __attribute__((__visibility__("hidden"))) -#define JSON_HEDLEY_PUBLIC __attribute__((__visibility__("default"))) -#else -#define JSON_HEDLEY_PRIVATE -#define JSON_HEDLEY_PUBLIC -#endif -#define JSON_HEDLEY_IMPORT extern -#endif - -#if defined(JSON_HEDLEY_NO_THROW) -#undef JSON_HEDLEY_NO_THROW -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(nothrow) || JSON_HEDLEY_GCC_VERSION_CHECK(3, 3, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_NO_THROW __attribute__((__nothrow__)) -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(13, 1, 0) || JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4, 1, 0) -#define JSON_HEDLEY_NO_THROW __declspec(nothrow) -#else -#define JSON_HEDLEY_NO_THROW -#endif - -#if defined(JSON_HEDLEY_FALL_THROUGH) -#undef JSON_HEDLEY_FALL_THROUGH -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(fallthrough) || JSON_HEDLEY_GCC_VERSION_CHECK(7, 0, 0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_FALL_THROUGH __attribute__((__fallthrough__)) -#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang, fallthrough) -#define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]]) -#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough) -#define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]]) -#elif defined(__fallthrough) /* SAL */ -#define JSON_HEDLEY_FALL_THROUGH __fallthrough -#else -#define JSON_HEDLEY_FALL_THROUGH -#endif - -#if defined(JSON_HEDLEY_RETURNS_NON_NULL) -#undef JSON_HEDLEY_RETURNS_NON_NULL -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(returns_nonnull) || JSON_HEDLEY_GCC_VERSION_CHECK(4, 9, 0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__)) -#elif defined(_Ret_notnull_) /* SAL */ -#define JSON_HEDLEY_RETURNS_NON_NULL _Ret_notnull_ -#else -#define JSON_HEDLEY_RETURNS_NON_NULL -#endif - -#if defined(JSON_HEDLEY_ARRAY_PARAM) -#undef JSON_HEDLEY_ARRAY_PARAM -#endif -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__STDC_NO_VLA__) && \ - !defined(__cplusplus) && !defined(JSON_HEDLEY_PGI_VERSION) && !defined(JSON_HEDLEY_TINYC_VERSION) -#define JSON_HEDLEY_ARRAY_PARAM(name) (name) -#else -#define JSON_HEDLEY_ARRAY_PARAM(name) -#endif - -#if defined(JSON_HEDLEY_IS_CONSTANT) -#undef JSON_HEDLEY_IS_CONSTANT -#endif -#if defined(JSON_HEDLEY_REQUIRE_CONSTEXPR) -#undef JSON_HEDLEY_REQUIRE_CONSTEXPR -#endif -/* JSON_HEDLEY_IS_CONSTEXPR_ is for - HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ -#if defined(JSON_HEDLEY_IS_CONSTEXPR_) -#undef JSON_HEDLEY_IS_CONSTEXPR_ -#endif -#if JSON_HEDLEY_HAS_BUILTIN(__builtin_constant_p) || JSON_HEDLEY_GCC_VERSION_CHECK(3, 4, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || JSON_HEDLEY_TINYC_VERSION_CHECK(0, 9, 19) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4, 1, 0) || JSON_HEDLEY_IBM_VERSION_CHECK(13, 1, 0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6, 1, 0) || \ - (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5, 10, 0) && !defined(__cplusplus)) || \ - JSON_HEDLEY_CRAY_VERSION_CHECK(8, 1, 0) || JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1, 25, 10) -#define JSON_HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr) -#endif -#if !defined(__cplusplus) -#if JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) || JSON_HEDLEY_GCC_VERSION_CHECK(3, 4, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || JSON_HEDLEY_IBM_VERSION_CHECK(13, 1, 0) || \ - JSON_HEDLEY_CRAY_VERSION_CHECK(8, 1, 0) || JSON_HEDLEY_ARM_VERSION_CHECK(5, 4, 0) || \ - JSON_HEDLEY_TINYC_VERSION_CHECK(0, 9, 24) -#if defined(__INTPTR_TYPE__) -#define JSON_HEDLEY_IS_CONSTEXPR_(expr) \ - __builtin_types_compatible_p(__typeof__((1 ? (void*)((__INTPTR_TYPE__)((expr) * 0)) : (int*)0)), int*) -#else -#include -#define JSON_HEDLEY_IS_CONSTEXPR_(expr) \ - __builtin_types_compatible_p(__typeof__((1 ? (void*)((intptr_t)((expr) * 0)) : (int*)0)), int*) -#endif -#elif ( \ - defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(JSON_HEDLEY_SUNPRO_VERSION) && \ - !defined(JSON_HEDLEY_PGI_VERSION) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ - (JSON_HEDLEY_HAS_EXTENSION(c_generic_selections) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4, 9, 0) || JSON_HEDLEY_INTEL_VERSION_CHECK(17, 0, 0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(12, 1, 0) || JSON_HEDLEY_ARM_VERSION_CHECK(5, 3, 0) -#if defined(__INTPTR_TYPE__) -#define JSON_HEDLEY_IS_CONSTEXPR_(expr) \ - _Generic((1 ? (void*)((__INTPTR_TYPE__)((expr) * 0)) : (int*)0), int*: 1, void*: 0) -#else -#include -#define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*)((intptr_t)*0) : (int*)0), int*: 1, void*: 0) -#endif -#elif defined(JSON_HEDLEY_GCC_VERSION) || defined(JSON_HEDLEY_INTEL_VERSION) || defined(JSON_HEDLEY_TINYC_VERSION) || \ - defined(JSON_HEDLEY_TI_ARMCL_VERSION) || JSON_HEDLEY_TI_CL430_VERSION_CHECK(18, 12, 0) || \ - defined(JSON_HEDLEY_TI_CL2000_VERSION) || defined(JSON_HEDLEY_TI_CL6X_VERSION) || \ - defined(JSON_HEDLEY_TI_CL7X_VERSION) || defined(JSON_HEDLEY_TI_CLPRU_VERSION) || defined(__clang__) -#define JSON_HEDLEY_IS_CONSTEXPR_(expr) \ - (sizeof(void) != sizeof(*(1 ? ((void*)((expr) * 0L)) : ((struct { char v[sizeof(void) * 2]; }*)1)))) -#endif -#endif -#if defined(JSON_HEDLEY_IS_CONSTEXPR_) -#if !defined(JSON_HEDLEY_IS_CONSTANT) -#define JSON_HEDLEY_IS_CONSTANT(expr) JSON_HEDLEY_IS_CONSTEXPR_(expr) -#endif -#define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (JSON_HEDLEY_IS_CONSTEXPR_(expr) ? (expr) : (-1)) -#else -#if !defined(JSON_HEDLEY_IS_CONSTANT) -#define JSON_HEDLEY_IS_CONSTANT(expr) (0) -#endif -#define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (expr) -#endif - -#if defined(JSON_HEDLEY_BEGIN_C_DECLS) -#undef JSON_HEDLEY_BEGIN_C_DECLS -#endif -#if defined(JSON_HEDLEY_END_C_DECLS) -#undef JSON_HEDLEY_END_C_DECLS -#endif -#if defined(JSON_HEDLEY_C_DECL) -#undef JSON_HEDLEY_C_DECL -#endif -#if defined(__cplusplus) -#define JSON_HEDLEY_BEGIN_C_DECLS extern "C" { -#define JSON_HEDLEY_END_C_DECLS } -#define JSON_HEDLEY_C_DECL extern "C" -#else -#define JSON_HEDLEY_BEGIN_C_DECLS -#define JSON_HEDLEY_END_C_DECLS -#define JSON_HEDLEY_C_DECL -#endif - -#if defined(JSON_HEDLEY_STATIC_ASSERT) -#undef JSON_HEDLEY_STATIC_ASSERT -#endif -#if !defined(__cplusplus) && \ - ((defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \ - (JSON_HEDLEY_HAS_FEATURE(c_static_assert) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(6, 0, 0) || JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) || defined(_Static_assert)) -#define JSON_HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message) -#elif (defined(__cplusplus) && (__cplusplus >= 201103L)) || JSON_HEDLEY_MSVC_VERSION_CHECK(16, 0, 0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) -#define JSON_HEDLEY_STATIC_ASSERT(expr, message) \ - JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr, message)) -#else -#define JSON_HEDLEY_STATIC_ASSERT(expr, message) -#endif - -#if defined(JSON_HEDLEY_NULL) -#undef JSON_HEDLEY_NULL -#endif -#if defined(__cplusplus) -#if __cplusplus >= 201103L -#define JSON_HEDLEY_NULL JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr) -#elif defined(NULL) -#define JSON_HEDLEY_NULL NULL -#else -#define JSON_HEDLEY_NULL JSON_HEDLEY_STATIC_CAST(void*, 0) -#endif -#elif defined(NULL) -#define JSON_HEDLEY_NULL NULL -#else -#define JSON_HEDLEY_NULL ((void*)0) -#endif - -#if defined(JSON_HEDLEY_MESSAGE) -#undef JSON_HEDLEY_MESSAGE -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") -#define JSON_HEDLEY_MESSAGE(msg) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ - JSON_HEDLEY_PRAGMA(message msg) \ - JSON_HEDLEY_DIAGNOSTIC_POP -#elif JSON_HEDLEY_GCC_VERSION_CHECK(4, 4, 0) || JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) -#define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message msg) -#elif JSON_HEDLEY_CRAY_VERSION_CHECK(5, 0, 0) -#define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(_CRI message msg) -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8, 0, 0) -#define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2, 0, 0) -#define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) -#else -#define JSON_HEDLEY_MESSAGE(msg) -#endif - -#if defined(JSON_HEDLEY_WARNING) -#undef JSON_HEDLEY_WARNING -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") -#define JSON_HEDLEY_WARNING(msg) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ - JSON_HEDLEY_PRAGMA(clang warning msg) \ - JSON_HEDLEY_DIAGNOSTIC_POP -#elif JSON_HEDLEY_GCC_VERSION_CHECK(4, 8, 0) || JSON_HEDLEY_PGI_VERSION_CHECK(18, 4, 0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13, 0, 0) -#define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(GCC warning msg) -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15, 0, 0) || JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) -#define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(message(msg)) -#else -#define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_MESSAGE(msg) -#endif - -#if defined(JSON_HEDLEY_REQUIRE) -#undef JSON_HEDLEY_REQUIRE -#endif -#if defined(JSON_HEDLEY_REQUIRE_MSG) -#undef JSON_HEDLEY_REQUIRE_MSG -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(diagnose_if) -#if JSON_HEDLEY_HAS_WARNING("-Wgcc-compat") -#define JSON_HEDLEY_REQUIRE(expr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ - __attribute__((diagnose_if(!(expr), #expr, "error"))) JSON_HEDLEY_DIAGNOSTIC_POP -#define JSON_HEDLEY_REQUIRE_MSG(expr, msg) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ - __attribute__((diagnose_if(!(expr), msg, "error"))) JSON_HEDLEY_DIAGNOSTIC_POP -#else -#define JSON_HEDLEY_REQUIRE(expr) __attribute__((diagnose_if(!(expr), #expr, "error"))) -#define JSON_HEDLEY_REQUIRE_MSG(expr, msg) __attribute__((diagnose_if(!(expr), msg, "error"))) -#endif -#else -#define JSON_HEDLEY_REQUIRE(expr) -#define JSON_HEDLEY_REQUIRE_MSG(expr, msg) -#endif - -#if defined(JSON_HEDLEY_FLAGS) -#undef JSON_HEDLEY_FLAGS -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(flag_enum) && \ - (!defined(__cplusplus) || JSON_HEDLEY_HAS_WARNING("-Wbitfield-enum-conversion")) -#define JSON_HEDLEY_FLAGS __attribute__((__flag_enum__)) -#else -#define JSON_HEDLEY_FLAGS -#endif - -#if defined(JSON_HEDLEY_FLAGS_CAST) -#undef JSON_HEDLEY_FLAGS_CAST -#endif -#if JSON_HEDLEY_INTEL_VERSION_CHECK(19, 0, 0) -#define JSON_HEDLEY_FLAGS_CAST(T, expr) \ - (__extension__({ \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("warning(disable:188)")((T)(expr)); \ - JSON_HEDLEY_DIAGNOSTIC_POP \ - })) -#else -#define JSON_HEDLEY_FLAGS_CAST(T, expr) JSON_HEDLEY_STATIC_CAST(T, expr) -#endif - -#if defined(JSON_HEDLEY_EMPTY_BASES) -#undef JSON_HEDLEY_EMPTY_BASES -#endif -#if (JSON_HEDLEY_MSVC_VERSION_CHECK(19, 0, 23918) && !JSON_HEDLEY_MSVC_VERSION_CHECK(20, 0, 0)) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021, 1, 0) -#define JSON_HEDLEY_EMPTY_BASES __declspec(empty_bases) -#else -#define JSON_HEDLEY_EMPTY_BASES -#endif - -/* Remaining macros are deprecated. */ - -#if defined(JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK) -#undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK -#endif -#if defined(__clang__) -#define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major, minor, patch) (0) -#else -#define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major, minor, patch) JSON_HEDLEY_GCC_VERSION_CHECK(major, minor, patch) -#endif - -#if defined(JSON_HEDLEY_CLANG_HAS_ATTRIBUTE) -#undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE -#endif -#define JSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) - -#if defined(JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE) -#undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE -#endif -#define JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) - -#if defined(JSON_HEDLEY_CLANG_HAS_BUILTIN) -#undef JSON_HEDLEY_CLANG_HAS_BUILTIN -#endif -#define JSON_HEDLEY_CLANG_HAS_BUILTIN(builtin) JSON_HEDLEY_HAS_BUILTIN(builtin) - -#if defined(JSON_HEDLEY_CLANG_HAS_FEATURE) -#undef JSON_HEDLEY_CLANG_HAS_FEATURE -#endif -#define JSON_HEDLEY_CLANG_HAS_FEATURE(feature) JSON_HEDLEY_HAS_FEATURE(feature) - -#if defined(JSON_HEDLEY_CLANG_HAS_EXTENSION) -#undef JSON_HEDLEY_CLANG_HAS_EXTENSION -#endif -#define JSON_HEDLEY_CLANG_HAS_EXTENSION(extension) JSON_HEDLEY_HAS_EXTENSION(extension) - -#if defined(JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE) -#undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE -#endif -#define JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) - -#if defined(JSON_HEDLEY_CLANG_HAS_WARNING) -#undef JSON_HEDLEY_CLANG_HAS_WARNING -#endif -#define JSON_HEDLEY_CLANG_HAS_WARNING(warning) JSON_HEDLEY_HAS_WARNING(warning) - -#endif /* !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < X) */ - -// This file contains all internal macro definitions -// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them - -// exclude unsupported compilers -#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) -#if defined(__clang__) -#if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 -#error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" -#endif -#elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) -#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 -#error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" -#endif -#endif -#endif - -// C++ language standard detection -// if the user manually specified the used c++ version this is skipped -#if !defined(JSON_HAS_CPP_20) && !defined(JSON_HAS_CPP_17) && !defined(JSON_HAS_CPP_14) && !defined(JSON_HAS_CPP_11) -#if (defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L) -#define JSON_HAS_CPP_20 -#define JSON_HAS_CPP_17 -#define JSON_HAS_CPP_14 -#elif (defined(__cplusplus) && __cplusplus >= 201703L) || \ - (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 -#define JSON_HAS_CPP_17 -#define JSON_HAS_CPP_14 -#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) -#define JSON_HAS_CPP_14 -#endif -// the cpp 11 flag is always specified because it is the minimal required version -#define JSON_HAS_CPP_11 -#endif - -// disable documentation warnings on clang -#if defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdocumentation" -#endif - -// allow to disable exceptions -#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) -#define JSON_THROW(exception) throw exception -#define JSON_TRY try -#define JSON_CATCH(exception) catch (exception) -#define JSON_INTERNAL_CATCH(exception) catch (exception) -#else -#include -#define JSON_THROW(exception) std::abort() -#define JSON_TRY if (true) -#define JSON_CATCH(exception) if (false) -#define JSON_INTERNAL_CATCH(exception) if (false) -#endif - -// override exception macros -#if defined(JSON_THROW_USER) -#undef JSON_THROW -#define JSON_THROW JSON_THROW_USER -#endif -#if defined(JSON_TRY_USER) -#undef JSON_TRY -#define JSON_TRY JSON_TRY_USER -#endif -#if defined(JSON_CATCH_USER) -#undef JSON_CATCH -#define JSON_CATCH JSON_CATCH_USER -#undef JSON_INTERNAL_CATCH -#define JSON_INTERNAL_CATCH JSON_CATCH_USER -#endif -#if defined(JSON_INTERNAL_CATCH_USER) -#undef JSON_INTERNAL_CATCH -#define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER -#endif - -// allow to override assert -#if !defined(JSON_ASSERT) -#include // assert -#define JSON_ASSERT(x) assert(x) -#endif - -// allow to access some private functions (needed by the test suite) -#if defined(JSON_TESTS_PRIVATE) -#define JSON_PRIVATE_UNLESS_TESTED public -#else -#define JSON_PRIVATE_UNLESS_TESTED private -#endif - -/*! -@brief macro to briefly define a mapping between an enum and JSON -@def NLOHMANN_JSON_SERIALIZE_ENUM -@since version 3.4.0 -*/ -#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ - template \ - inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) { \ - static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ - static const std::pair m[] = __VA_ARGS__; \ - auto it = \ - std::find_if(std::begin(m), std::end(m), [e](const std::pair& ej_pair) -> bool { \ - return ej_pair.first == e; \ - }); \ - j = ((it != std::end(m)) ? it : std::begin(m))->second; \ - } \ - template \ - inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) { \ - static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ - static const std::pair m[] = __VA_ARGS__; \ - auto it = std::find_if( \ - std::begin(m), std::end(m), [&j](const std::pair& ej_pair) -> bool { \ - return ej_pair.second == j; \ - }); \ - e = ((it != std::end(m)) ? it : std::begin(m))->first; \ - } - -// Ugly macros to avoid uglier copy-paste when specializing basic_json. They -// may be removed in the future once the class is split. - -#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ - template < \ - template class ObjectType, \ - template class ArrayType, \ - class StringType, \ - class BooleanType, \ - class NumberIntegerType, \ - class NumberUnsignedType, \ - class NumberFloatType, \ - template class AllocatorType, \ - template class JSONSerializer, \ - class BinaryType> - -#define NLOHMANN_BASIC_JSON_TPL \ - basic_json< \ - ObjectType, \ - ArrayType, \ - StringType, \ - BooleanType, \ - NumberIntegerType, \ - NumberUnsignedType, \ - NumberFloatType, \ - AllocatorType, \ - JSONSerializer, \ - BinaryType> - -// Macros to simplify conversion from/to types - -#define NLOHMANN_JSON_EXPAND(x) x -#define NLOHMANN_JSON_GET_MACRO( \ - _1, \ - _2, \ - _3, \ - _4, \ - _5, \ - _6, \ - _7, \ - _8, \ - _9, \ - _10, \ - _11, \ - _12, \ - _13, \ - _14, \ - _15, \ - _16, \ - _17, \ - _18, \ - _19, \ - _20, \ - _21, \ - _22, \ - _23, \ - _24, \ - _25, \ - _26, \ - _27, \ - _28, \ - _29, \ - _30, \ - _31, \ - _32, \ - _33, \ - _34, \ - _35, \ - _36, \ - _37, \ - _38, \ - _39, \ - _40, \ - _41, \ - _42, \ - _43, \ - _44, \ - _45, \ - _46, \ - _47, \ - _48, \ - _49, \ - _50, \ - _51, \ - _52, \ - _53, \ - _54, \ - _55, \ - _56, \ - _57, \ - _58, \ - _59, \ - _60, \ - _61, \ - _62, \ - _63, \ - _64, \ - NAME, \ - ...) \ - NAME -#define NLOHMANN_JSON_PASTE(...) \ - NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_GET_MACRO( \ - __VA_ARGS__, \ - NLOHMANN_JSON_PASTE64, \ - NLOHMANN_JSON_PASTE63, \ - NLOHMANN_JSON_PASTE62, \ - NLOHMANN_JSON_PASTE61, \ - NLOHMANN_JSON_PASTE60, \ - NLOHMANN_JSON_PASTE59, \ - NLOHMANN_JSON_PASTE58, \ - NLOHMANN_JSON_PASTE57, \ - NLOHMANN_JSON_PASTE56, \ - NLOHMANN_JSON_PASTE55, \ - NLOHMANN_JSON_PASTE54, \ - NLOHMANN_JSON_PASTE53, \ - NLOHMANN_JSON_PASTE52, \ - NLOHMANN_JSON_PASTE51, \ - NLOHMANN_JSON_PASTE50, \ - NLOHMANN_JSON_PASTE49, \ - NLOHMANN_JSON_PASTE48, \ - NLOHMANN_JSON_PASTE47, \ - NLOHMANN_JSON_PASTE46, \ - NLOHMANN_JSON_PASTE45, \ - NLOHMANN_JSON_PASTE44, \ - NLOHMANN_JSON_PASTE43, \ - NLOHMANN_JSON_PASTE42, \ - NLOHMANN_JSON_PASTE41, \ - NLOHMANN_JSON_PASTE40, \ - NLOHMANN_JSON_PASTE39, \ - NLOHMANN_JSON_PASTE38, \ - NLOHMANN_JSON_PASTE37, \ - NLOHMANN_JSON_PASTE36, \ - NLOHMANN_JSON_PASTE35, \ - NLOHMANN_JSON_PASTE34, \ - NLOHMANN_JSON_PASTE33, \ - NLOHMANN_JSON_PASTE32, \ - NLOHMANN_JSON_PASTE31, \ - NLOHMANN_JSON_PASTE30, \ - NLOHMANN_JSON_PASTE29, \ - NLOHMANN_JSON_PASTE28, \ - NLOHMANN_JSON_PASTE27, \ - NLOHMANN_JSON_PASTE26, \ - NLOHMANN_JSON_PASTE25, \ - NLOHMANN_JSON_PASTE24, \ - NLOHMANN_JSON_PASTE23, \ - NLOHMANN_JSON_PASTE22, \ - NLOHMANN_JSON_PASTE21, \ - NLOHMANN_JSON_PASTE20, \ - NLOHMANN_JSON_PASTE19, \ - NLOHMANN_JSON_PASTE18, \ - NLOHMANN_JSON_PASTE17, \ - NLOHMANN_JSON_PASTE16, \ - NLOHMANN_JSON_PASTE15, \ - NLOHMANN_JSON_PASTE14, \ - NLOHMANN_JSON_PASTE13, \ - NLOHMANN_JSON_PASTE12, \ - NLOHMANN_JSON_PASTE11, \ - NLOHMANN_JSON_PASTE10, \ - NLOHMANN_JSON_PASTE9, \ - NLOHMANN_JSON_PASTE8, \ - NLOHMANN_JSON_PASTE7, \ - NLOHMANN_JSON_PASTE6, \ - NLOHMANN_JSON_PASTE5, \ - NLOHMANN_JSON_PASTE4, \ - NLOHMANN_JSON_PASTE3, \ - NLOHMANN_JSON_PASTE2, \ - NLOHMANN_JSON_PASTE1)(__VA_ARGS__)) -#define NLOHMANN_JSON_PASTE2(func, v1) func(v1) -#define NLOHMANN_JSON_PASTE3(func, v1, v2) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE2(func, v2) -#define NLOHMANN_JSON_PASTE4(func, v1, v2, v3) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE3(func, v2, v3) -#define NLOHMANN_JSON_PASTE5(func, v1, v2, v3, v4) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE4(func, v2, v3, v4) -#define NLOHMANN_JSON_PASTE6(func, v1, v2, v3, v4, v5) \ - NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE5(func, v2, v3, v4, v5) -#define NLOHMANN_JSON_PASTE7(func, v1, v2, v3, v4, v5, v6) \ - NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE6(func, v2, v3, v4, v5, v6) -#define NLOHMANN_JSON_PASTE8(func, v1, v2, v3, v4, v5, v6, v7) \ - NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE7(func, v2, v3, v4, v5, v6, v7) -#define NLOHMANN_JSON_PASTE9(func, v1, v2, v3, v4, v5, v6, v7, v8) \ - NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE8(func, v2, v3, v4, v5, v6, v7, v8) -#define NLOHMANN_JSON_PASTE10(func, v1, v2, v3, v4, v5, v6, v7, v8, v9) \ - NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE9(func, v2, v3, v4, v5, v6, v7, v8, v9) -#define NLOHMANN_JSON_PASTE11(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) \ - NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE10(func, v2, v3, v4, v5, v6, v7, v8, v9, v10) -#define NLOHMANN_JSON_PASTE12(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) \ - NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE11(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -#define NLOHMANN_JSON_PASTE13(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) \ - NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE12(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -#define NLOHMANN_JSON_PASTE14(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) \ - NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE13(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -#define NLOHMANN_JSON_PASTE15(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) \ - NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE14(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -#define NLOHMANN_JSON_PASTE16(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE15(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -#define NLOHMANN_JSON_PASTE17(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE16(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -#define NLOHMANN_JSON_PASTE18(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE17(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) -#define NLOHMANN_JSON_PASTE19(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE18(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) -#define NLOHMANN_JSON_PASTE20( \ - func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE19(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) -#define NLOHMANN_JSON_PASTE21( \ - func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE20(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) -#define NLOHMANN_JSON_PASTE22( \ - func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE21( \ - func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) -#define NLOHMANN_JSON_PASTE23( \ - func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE22( \ - func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) -#define NLOHMANN_JSON_PASTE24( \ - func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE23( \ - func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) -#define NLOHMANN_JSON_PASTE25( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE24( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24) -#define NLOHMANN_JSON_PASTE26( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE25( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25) -#define NLOHMANN_JSON_PASTE27( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE26( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26) -#define NLOHMANN_JSON_PASTE28( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE27( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27) -#define NLOHMANN_JSON_PASTE29( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE28( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28) -#define NLOHMANN_JSON_PASTE30( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE29( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29) -#define NLOHMANN_JSON_PASTE31( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE30( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30) -#define NLOHMANN_JSON_PASTE32( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE31( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31) -#define NLOHMANN_JSON_PASTE33( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE32( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32) -#define NLOHMANN_JSON_PASTE34( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE33( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33) -#define NLOHMANN_JSON_PASTE35( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE34( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34) -#define NLOHMANN_JSON_PASTE36( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE35( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35) -#define NLOHMANN_JSON_PASTE37( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE36( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36) -#define NLOHMANN_JSON_PASTE38( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE37( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37) -#define NLOHMANN_JSON_PASTE39( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE38( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38) -#define NLOHMANN_JSON_PASTE40( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE39( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39) -#define NLOHMANN_JSON_PASTE41( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE40( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40) -#define NLOHMANN_JSON_PASTE42( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE41( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41) -#define NLOHMANN_JSON_PASTE43( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE42( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42) -#define NLOHMANN_JSON_PASTE44( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE43( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43) -#define NLOHMANN_JSON_PASTE45( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE44( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44) -#define NLOHMANN_JSON_PASTE46( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE45( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45) -#define NLOHMANN_JSON_PASTE47( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE46( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46) -#define NLOHMANN_JSON_PASTE48( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE47( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47) -#define NLOHMANN_JSON_PASTE49( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE48( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48) -#define NLOHMANN_JSON_PASTE50( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE49( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49) -#define NLOHMANN_JSON_PASTE51( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE50( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50) -#define NLOHMANN_JSON_PASTE52( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE51( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51) -#define NLOHMANN_JSON_PASTE53( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE52( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52) -#define NLOHMANN_JSON_PASTE54( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE53( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53) -#define NLOHMANN_JSON_PASTE55( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE54( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54) -#define NLOHMANN_JSON_PASTE56( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE55( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55) -#define NLOHMANN_JSON_PASTE57( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55, \ - v56) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE56( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55, \ - v56) -#define NLOHMANN_JSON_PASTE58( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55, \ - v56, \ - v57) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE57( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55, \ - v56, \ - v57) -#define NLOHMANN_JSON_PASTE59( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55, \ - v56, \ - v57, \ - v58) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE58( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55, \ - v56, \ - v57, \ - v58) -#define NLOHMANN_JSON_PASTE60( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55, \ - v56, \ - v57, \ - v58, \ - v59) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE59( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55, \ - v56, \ - v57, \ - v58, \ - v59) -#define NLOHMANN_JSON_PASTE61( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55, \ - v56, \ - v57, \ - v58, \ - v59, \ - v60) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE60( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55, \ - v56, \ - v57, \ - v58, \ - v59, \ - v60) -#define NLOHMANN_JSON_PASTE62( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55, \ - v56, \ - v57, \ - v58, \ - v59, \ - v60, \ - v61) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE61( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55, \ - v56, \ - v57, \ - v58, \ - v59, \ - v60, \ - v61) -#define NLOHMANN_JSON_PASTE63( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55, \ - v56, \ - v57, \ - v58, \ - v59, \ - v60, \ - v61, \ - v62) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE62( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55, \ - v56, \ - v57, \ - v58, \ - v59, \ - v60, \ - v61, \ - v62) -#define NLOHMANN_JSON_PASTE64( \ - func, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55, \ - v56, \ - v57, \ - v58, \ - v59, \ - v60, \ - v61, \ - v62, \ - v63) \ - NLOHMANN_JSON_PASTE2(func, v1) \ - NLOHMANN_JSON_PASTE63( \ - func, \ - v2, \ - v3, \ - v4, \ - v5, \ - v6, \ - v7, \ - v8, \ - v9, \ - v10, \ - v11, \ - v12, \ - v13, \ - v14, \ - v15, \ - v16, \ - v17, \ - v18, \ - v19, \ - v20, \ - v21, \ - v22, \ - v23, \ - v24, \ - v25, \ - v26, \ - v27, \ - v28, \ - v29, \ - v30, \ - v31, \ - v32, \ - v33, \ - v34, \ - v35, \ - v36, \ - v37, \ - v38, \ - v39, \ - v40, \ - v41, \ - v42, \ - v43, \ - v44, \ - v45, \ - v46, \ - v47, \ - v48, \ - v49, \ - v50, \ - v51, \ - v52, \ - v53, \ - v54, \ - v55, \ - v56, \ - v57, \ - v58, \ - v59, \ - v60, \ - v61, \ - v62, \ - v63) - -#define NLOHMANN_JSON_TO(v1) nlohmann_json_j[#v1] = nlohmann_json_t.v1; -#define NLOHMANN_JSON_FROM(v1) nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1); - -/*! -@brief macro -@def NLOHMANN_DEFINE_TYPE_INTRUSIVE -@since version 3.9.0 -*/ -#define NLOHMANN_DEFINE_TYPE_INTRUSIVE(Type, ...) \ - friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { \ - NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) \ - } \ - friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { \ - NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) \ - } - -/*! -@brief macro -@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE -@since version 3.9.0 -*/ -#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \ - inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { \ - NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) \ - } \ - inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { \ - NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) \ - } - -#ifndef JSON_USE_IMPLICIT_CONVERSIONS -#define JSON_USE_IMPLICIT_CONVERSIONS 1 -#endif - -#if JSON_USE_IMPLICIT_CONVERSIONS -#define JSON_EXPLICIT -#else -#define JSON_EXPLICIT explicit -#endif - -namespace nlohmann { -namespace detail { - -/*! -@brief replace all occurrences of a substring by another string - -@param[in,out] s the string to manipulate; changed so that all - occurrences of @a f are replaced with @a t -@param[in] f the substring to replace with @a t -@param[in] t the string to replace @a f - -@pre The search string @a f must not be empty. **This precondition is -enforced with an assertion.** - -@since version 2.0.0 -*/ -inline void replace_substring(std::string& s, const std::string& f, const std::string& t) { - JSON_ASSERT(!f.empty()); - for (auto pos = s.find(f); // find first occurrence of f - pos != std::string::npos; // make sure f was found - s.replace(pos, f.size(), t), // replace with t, and - pos = s.find(f, pos + t.size())) // find next occurrence of f - { - } -} - -/*! - * @brief string escaping as described in RFC 6901 (Sect. 4) - * @param[in] s string to escape - * @return escaped string - * - * Note the order of escaping "~" to "~0" and "/" to "~1" is important. - */ -inline std::string escape(std::string s) { - replace_substring(s, "~", "~0"); - replace_substring(s, "/", "~1"); - return s; -} - -/*! - * @brief string unescaping as described in RFC 6901 (Sect. 4) - * @param[in] s string to unescape - * @return unescaped string - * - * Note the order of escaping "~1" to "/" and "~0" to "~" is important. - */ -static void unescape(std::string& s) { - replace_substring(s, "~1", "/"); - replace_substring(s, "~0", "~"); -} - -} // namespace detail -} // namespace nlohmann - -// #include - -#include // size_t - -namespace nlohmann { -namespace detail { -/// struct to capture the start position of the current token -struct position_t { - /// the total number of characters read - std::size_t chars_read_total = 0; - /// the number of characters read in the current line - std::size_t chars_read_current_line = 0; - /// the number of lines read - std::size_t lines_read = 0; - - /// conversion to size_t to preserve SAX interface - constexpr operator size_t() const { return chars_read_total; } -}; - -} // namespace detail -} // namespace nlohmann - -// #include - -namespace nlohmann { -namespace detail { -//////////////// -// exceptions // -//////////////// - -/*! -@brief general exception of the @ref basic_json class - -This class is an extension of `std::exception` objects with a member @a id for -exception ids. It is used as the base class for all exceptions thrown by the -@ref basic_json class. This class can hence be used as "wildcard" to catch -exceptions. - -Subclasses: -- @ref parse_error for exceptions indicating a parse error -- @ref invalid_iterator for exceptions indicating errors with iterators -- @ref type_error for exceptions indicating executing a member function with - a wrong type -- @ref out_of_range for exceptions indicating access out of the defined range -- @ref other_error for exceptions indicating other library errors - -@internal -@note To have nothrow-copy-constructible exceptions, we internally use - `std::runtime_error` which can cope with arbitrary-length error messages. - Intermediate strings are built with static functions and then passed to - the actual constructor. -@endinternal - -@liveexample{The following code shows how arbitrary library exceptions can be -caught.,exception} - -@since version 3.0.0 -*/ -class exception : public std::exception { -public: - /// returns the explanatory string - const char* what() const noexcept override { return m.what(); } - - /// the id of the exception - const int id; // NOLINT(cppcoreguidelines-non-private-member-variables-in-classes) - -protected: - JSON_HEDLEY_NON_NULL(3) - exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} - - static std::string name(const std::string& ename, int id_) { - return "[json.exception." + ename + "." + std::to_string(id_) + "] "; - } - - template - static std::string diagnostics(const BasicJsonType& leaf_element) { -#if JSON_DIAGNOSTICS - std::vector tokens; - for (const auto* current = &leaf_element; current->m_parent != nullptr; current = current->m_parent) { - switch (current->m_parent->type()) { - case value_t::array: { - for (std::size_t i = 0; i < current->m_parent->m_value.array->size(); ++i) { - if (¤t->m_parent->m_value.array->operator[](i) == current) { - tokens.emplace_back(std::to_string(i)); - break; - } - } - break; - } - - case value_t::object: { - for (const auto& element : *current->m_parent->m_value.object) { - if (&element.second == current) { - tokens.emplace_back(element.first.c_str()); - break; - } - } - break; - } - - default: // LCOV_EXCL_LINE - break; // LCOV_EXCL_LINE - } - } - - if (tokens.empty()) { - return ""; - } - - return "(" + - std::accumulate( - tokens.rbegin(), - tokens.rend(), - std::string{}, - [](const std::string& a, const std::string& b) { return a + "/" + detail::escape(b); }) + - ") "; -#else - static_cast(leaf_element); - return ""; -#endif - } - -private: - /// an exception object as storage for error messages - std::runtime_error m; -}; - -/*! -@brief exception indicating a parse error - -This exception is thrown by the library when a parse error occurs. Parse errors -can occur during the deserialization of JSON text, CBOR, MessagePack, as well -as when using JSON Patch. - -Member @a byte holds the byte index of the last read character in the input -file. - -Exceptions have ids 1xx. - -name / id | example message | description ------------------------------- | --------------- | ------------------------- -json.exception.parse_error.101 | parse error at 2: unexpected end of input; expected string literal | This error -indicates a syntax error while deserializing a JSON text. The error message describes that an unexpected token -(character) was encountered, and the member @a byte indicates the error position. json.exception.parse_error.102 | parse -error at 14: missing or wrong low surrogate | JSON uses the `\uxxxx` format to describe Unicode characters. Code points -above above 0xFFFF are split into two `\uxxxx` entries ("surrogate pairs"). This error indicates that the surrogate pair -is incomplete or contains an invalid code point. json.exception.parse_error.103 | parse error: code points above -0x10FFFF are invalid | Unicode supports code points up to 0x10FFFF. Code points above 0x10FFFF are invalid. -json.exception.parse_error.104 | parse error: JSON patch must be an array of objects | [RFC -6902](https://tools.ietf.org/html/rfc6902) requires a JSON Patch document to be a JSON document that represents an array -of objects. json.exception.parse_error.105 | parse error: operation must have string member 'op' | An operation of a -JSON Patch document must contain exactly one "op" member, whose value indicates the operation to perform. Its value must -be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors. json.exception.parse_error.106 -| parse error: array index '01' must not begin with '0' | An array index in a JSON Pointer ([RFC -6901](https://tools.ietf.org/html/rfc6901)) may be `0` or any number without a leading `0`. -json.exception.parse_error.107 | parse error: JSON pointer must be empty or begin with '/' - was: 'foo' | A JSON Pointer -must be a Unicode string containing a sequence of zero or more reference tokens, each prefixed by a `/` character. -json.exception.parse_error.108 | parse error: escape character '~' must be followed with '0' or '1' | In a JSON Pointer, -only `~0` and `~1` are valid escape sequences. json.exception.parse_error.109 | parse error: array index 'one' is not a -number | A JSON Pointer array index must be a number. json.exception.parse_error.110 | parse error at 1: cannot read 2 -bytes from vector | When parsing CBOR or MessagePack, the byte vector ends before the complete value has been read. -json.exception.parse_error.112 | parse error at 1: error reading CBOR; last byte: 0xF8 | Not all types of CBOR or -MessagePack are supported. This exception occurs if an unsupported byte was read. json.exception.parse_error.113 | parse -error at 2: expected a CBOR string; last byte: 0x98 | While parsing a map key, a value that is not a string has been -read. json.exception.parse_error.114 | parse error: Unsupported BSON record type 0x0F | The parsing of the corresponding -BSON record type is not implemented (yet). json.exception.parse_error.115 | parse error at byte 5: syntax error while -parsing UBJSON high-precision number: invalid number text: 1A | A UBJSON high-precision number could not be parsed. - -@note For an input with n bytes, 1 is the index of the first character and n+1 - is the index of the terminating null byte or the end of file. This also - holds true when reading a byte vector (CBOR or MessagePack). - -@liveexample{The following code shows how a `parse_error` exception can be -caught.,parse_error} - -@sa - @ref exception for the base class of the library exceptions -@sa - @ref invalid_iterator for exceptions indicating errors with iterators -@sa - @ref type_error for exceptions indicating executing a member function with - a wrong type -@sa - @ref out_of_range for exceptions indicating access out of the defined range -@sa - @ref other_error for exceptions indicating other library errors - -@since version 3.0.0 -*/ -class parse_error : public exception { -public: - /*! - @brief create a parse error exception - @param[in] id_ the id of the exception - @param[in] pos the position where the error occurred (or with - chars_read_total=0 if the position cannot be - determined) - @param[in] what_arg the explanatory string - @return parse_error object - */ - template - static parse_error create( - int id_, const position_t& pos, const std::string& what_arg, const BasicJsonType& context) { - std::string w = exception::name("parse_error", id_) + "parse error" + position_string(pos) + ": " + - exception::diagnostics(context) + what_arg; - return parse_error(id_, pos.chars_read_total, w.c_str()); - } - - template - static parse_error create(int id_, std::size_t byte_, const std::string& what_arg, const BasicJsonType& context) { - std::string w = exception::name("parse_error", id_) + "parse error" + - (byte_ != 0 ? (" at byte " + std::to_string(byte_)) : "") + ": " + - exception::diagnostics(context) + what_arg; - return parse_error(id_, byte_, w.c_str()); - } - - /*! - @brief byte index of the parse error - - The byte index of the last read character in the input file. - - @note For an input with n bytes, 1 is the index of the first character and - n+1 is the index of the terminating null byte or the end of file. - This also holds true when reading a byte vector (CBOR or MessagePack). - */ - const std::size_t byte; - -private: - parse_error(int id_, std::size_t byte_, const char* what_arg) : exception(id_, what_arg), byte(byte_) {} - - static std::string position_string(const position_t& pos) { - return " at line " + std::to_string(pos.lines_read + 1) + ", column " + - std::to_string(pos.chars_read_current_line); - } -}; - -/*! -@brief exception indicating errors with iterators - -This exception is thrown if iterators passed to a library function do not match -the expected semantics. - -Exceptions have ids 2xx. - -name / id | example message | description ------------------------------------ | --------------- | ------------------------- -json.exception.invalid_iterator.201 | iterators are not compatible | The iterators passed to constructor @ref -basic_json(InputIT first, InputIT last) are not compatible, meaning they do not belong to the same container. Therefore, -the range (@a first, @a last) is invalid. json.exception.invalid_iterator.202 | iterator does not fit current value | In -an erase or insert function, the passed iterator @a pos does not belong to the JSON value for which the function was -called. It hence does not define a valid position for the deletion/insertion. json.exception.invalid_iterator.203 | -iterators do not fit current value | Either iterator passed to function @ref erase(IteratorType first, IteratorType -last) does not belong to the JSON value from which values shall be erased. It hence does not define a valid range to -delete values from. json.exception.invalid_iterator.204 | iterators out of range | When an iterator range for a -primitive type (number, boolean, or string) is passed to a constructor or an erase function, this range has to be -exactly (@ref begin(), @ref end()), because this is the only way the single stored value is expressed. All other ranges -are invalid. json.exception.invalid_iterator.205 | iterator out of range | When an iterator for a primitive type -(number, boolean, or string) is passed to an erase function, the iterator has to be the @ref begin() iterator, because -it is the only way to address the stored value. All other iterators are invalid. json.exception.invalid_iterator.206 | -cannot construct with iterators from null | The iterators passed to constructor @ref basic_json(InputIT first, InputIT -last) belong to a JSON null value and hence to not define a valid range. json.exception.invalid_iterator.207 | cannot -use key() for non-object iterators | The key() member function can only be used on iterators belonging to a JSON object, -because other types do not have a concept of a key. json.exception.invalid_iterator.208 | cannot use operator[] for -object iterators | The operator[] to specify a concrete offset cannot be used on iterators belonging to a JSON object, -because JSON objects are unordered. json.exception.invalid_iterator.209 | cannot use offsets with object iterators | The -offset operators (+, -, +=, -=) cannot be used on iterators belonging to a JSON object, because JSON objects are -unordered. json.exception.invalid_iterator.210 | iterators do not fit | The iterator range passed to the insert function -are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is -invalid. json.exception.invalid_iterator.211 | passed iterators may not belong to container | The iterator range passed -to the insert function must not be a subrange of the container to insert to. json.exception.invalid_iterator.212 | -cannot compare iterators of different containers | When two iterators are compared, they must belong to the same -container. json.exception.invalid_iterator.213 | cannot compare order of object iterators | The order of object -iterators cannot be compared, because JSON objects are unordered. json.exception.invalid_iterator.214 | cannot get value -| Cannot get value for iterator: Either the iterator belongs to a null value or it is an iterator to a primitive type -(number, boolean, or string), but the iterator is different to @ref begin(). - -@liveexample{The following code shows how an `invalid_iterator` exception can be -caught.,invalid_iterator} - -@sa - @ref exception for the base class of the library exceptions -@sa - @ref parse_error for exceptions indicating a parse error -@sa - @ref type_error for exceptions indicating executing a member function with - a wrong type -@sa - @ref out_of_range for exceptions indicating access out of the defined range -@sa - @ref other_error for exceptions indicating other library errors - -@since version 3.0.0 -*/ -class invalid_iterator : public exception { -public: - template - static invalid_iterator create(int id_, const std::string& what_arg, const BasicJsonType& context) { - std::string w = exception::name("invalid_iterator", id_) + exception::diagnostics(context) + what_arg; - return invalid_iterator(id_, w.c_str()); - } - -private: - JSON_HEDLEY_NON_NULL(3) - invalid_iterator(int id_, const char* what_arg) : exception(id_, what_arg) {} -}; - -/*! -@brief exception indicating executing a member function with a wrong type - -This exception is thrown in case of a type error; that is, a library function is -executed on a JSON value whose type does not match the expected semantics. - -Exceptions have ids 3xx. - -name / id | example message | description ------------------------------ | --------------- | ------------------------- -json.exception.type_error.301 | cannot create object from initializer list | To create an object from an initializer -list, the initializer list must consist only of a list of pairs whose first element is a string. When this constraint is -violated, an array is created instead. json.exception.type_error.302 | type must be object, but is array | During -implicit or explicit value conversion, the JSON type must be compatible to the target type. For instance, a JSON string -can only be converted into string types, but not into numbers or boolean types. json.exception.type_error.303 | -incompatible ReferenceType for get_ref, actual type is object | To retrieve a reference to a value stored in a @ref -basic_json object with @ref get_ref, the type of the reference must match the value type. For instance, for a JSON -array, the @a ReferenceType must be @ref array_t &. json.exception.type_error.304 | cannot use at() with string | The -@ref at() member functions can only be executed for certain JSON types. json.exception.type_error.305 | cannot use -operator[] with string | The @ref operator[] member functions can only be executed for certain JSON types. -json.exception.type_error.306 | cannot use value() with string | The @ref value() member functions can only be executed -for certain JSON types. json.exception.type_error.307 | cannot use erase() with string | The @ref erase() member -functions can only be executed for certain JSON types. json.exception.type_error.308 | cannot use push_back() with -string | The @ref push_back() and @ref operator+= member functions can only be executed for certain JSON types. -json.exception.type_error.309 | cannot use insert() with | The @ref insert() member functions can only be executed for -certain JSON types. json.exception.type_error.310 | cannot use swap() with number | The @ref swap() member functions can -only be executed for certain JSON types. json.exception.type_error.311 | cannot use emplace_back() with string | The -@ref emplace_back() member function can only be executed for certain JSON types. json.exception.type_error.312 | cannot -use update() with string | The @ref update() member functions can only be executed for certain JSON types. -json.exception.type_error.313 | invalid value to unflatten | The @ref unflatten function converts an object whose keys -are JSON Pointers back into an arbitrary nested JSON value. The JSON Pointers must not overlap, because then the -resulting value would not be well defined. json.exception.type_error.314 | only objects can be unflattened | The @ref -unflatten function only works for an object whose keys are JSON Pointers. json.exception.type_error.315 | values in -object must be primitive | The @ref unflatten function only works for an object whose keys are JSON Pointers and whose -values are primitive. json.exception.type_error.316 | invalid UTF-8 byte at index 10: 0x7E | The @ref dump function only -works with UTF-8 encoded strings; that is, if you assign a `std::string` to a JSON value, make sure it is UTF-8 encoded. -| json.exception.type_error.317 | JSON value cannot be serialized to requested format | The dynamic type of the object -cannot be represented in the requested serialization format (e.g. a raw `true` or `null` JSON object cannot be -serialized to BSON) | - -@liveexample{The following code shows how a `type_error` exception can be -caught.,type_error} - -@sa - @ref exception for the base class of the library exceptions -@sa - @ref parse_error for exceptions indicating a parse error -@sa - @ref invalid_iterator for exceptions indicating errors with iterators -@sa - @ref out_of_range for exceptions indicating access out of the defined range -@sa - @ref other_error for exceptions indicating other library errors - -@since version 3.0.0 -*/ -class type_error : public exception { -public: - template - static type_error create(int id_, const std::string& what_arg, const BasicJsonType& context) { - std::string w = exception::name("type_error", id_) + exception::diagnostics(context) + what_arg; - return type_error(id_, w.c_str()); - } - -private: - JSON_HEDLEY_NON_NULL(3) - type_error(int id_, const char* what_arg) : exception(id_, what_arg) {} -}; - -/*! -@brief exception indicating access out of the defined range - -This exception is thrown in case a library function is called on an input -parameter that exceeds the expected range, for instance in case of array -indices or nonexisting object keys. - -Exceptions have ids 4xx. - -name / id | example message | description -------------------------------- | --------------- | ------------------------- -json.exception.out_of_range.401 | array index 3 is out of range | The provided array index @a i is larger than @a -size-1. json.exception.out_of_range.402 | array index '-' (3) is out of range | The special array index `-` in a JSON -Pointer never describes a valid element of the array, but the index past the end. That is, it can only be used to add -elements at this position, but not to read it. json.exception.out_of_range.403 | key 'foo' not found | The provided key -was not found in the JSON object. json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token -in a JSON Pointer could not be resolved. json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch -operations 'remove' and 'add' can not be applied to the root element of the JSON value. json.exception.out_of_range.406 -| number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF. -json.exception.out_of_range.407 | number overflow serializing '9223372036854775808' | UBJSON and BSON only support -integer numbers up to 9223372036854775807. (until version 3.8.0) | json.exception.out_of_range.408 | excessive array -size: 8658170730974374167 | The size (following `#`) of an UBJSON array or object exceeds the maximal capacity. | -json.exception.out_of_range.409 | BSON key cannot contain code point U+0000 (at byte 2) | Key identifiers to be -serialized to BSON cannot contain code point U+0000, since the key is stored as zero-terminated c-string | - -@liveexample{The following code shows how an `out_of_range` exception can be -caught.,out_of_range} - -@sa - @ref exception for the base class of the library exceptions -@sa - @ref parse_error for exceptions indicating a parse error -@sa - @ref invalid_iterator for exceptions indicating errors with iterators -@sa - @ref type_error for exceptions indicating executing a member function with - a wrong type -@sa - @ref other_error for exceptions indicating other library errors - -@since version 3.0.0 -*/ -class out_of_range : public exception { -public: - template - static out_of_range create(int id_, const std::string& what_arg, const BasicJsonType& context) { - std::string w = exception::name("out_of_range", id_) + exception::diagnostics(context) + what_arg; - return out_of_range(id_, w.c_str()); - } - -private: - JSON_HEDLEY_NON_NULL(3) - out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {} -}; - -/*! -@brief exception indicating other library errors - -This exception is thrown in case of errors that cannot be classified with the -other exception types. - -Exceptions have ids 5xx. - -name / id | example message | description ------------------------------- | --------------- | ------------------------- -json.exception.other_error.501 | unsuccessful: {"op":"test","path":"/baz", "value":"bar"} | A JSON Patch operation -'test' failed. The unsuccessful operation is also printed. - -@sa - @ref exception for the base class of the library exceptions -@sa - @ref parse_error for exceptions indicating a parse error -@sa - @ref invalid_iterator for exceptions indicating errors with iterators -@sa - @ref type_error for exceptions indicating executing a member function with - a wrong type -@sa - @ref out_of_range for exceptions indicating access out of the defined range - -@liveexample{The following code shows how an `other_error` exception can be -caught.,other_error} - -@since version 3.0.0 -*/ -class other_error : public exception { -public: - template - static other_error create(int id_, const std::string& what_arg, const BasicJsonType& context) { - std::string w = exception::name("other_error", id_) + exception::diagnostics(context) + what_arg; - return other_error(id_, w.c_str()); - } - -private: - JSON_HEDLEY_NON_NULL(3) - other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} -}; -} // namespace detail -} // namespace nlohmann - -// #include - -// #include - -#include // size_t -#include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type -#include // index_sequence, make_index_sequence, index_sequence_for - -// #include - -namespace nlohmann { -namespace detail { - -template -using uncvref_t = typename std::remove_cv::type>::type; - -#ifdef JSON_HAS_CPP_14 - -// the following utilities are natively available in C++14 -using std::enable_if_t; -using std::index_sequence; -using std::index_sequence_for; -using std::make_index_sequence; - -#else - -// alias templates to reduce boilerplate -template -using enable_if_t = typename std::enable_if::type; - -// The following code is taken from -// https://github.com/abseil/abseil-cpp/blob/10cb35e459f5ecca5b2ff107635da0bfa41011b4/absl/utility/utility.h which is -// part of Google Abseil (https://github.com/abseil/abseil-cpp), licensed under the Apache License 2.0. - -//// START OF CODE FROM GOOGLE ABSEIL - -// integer_sequence -// -// Class template representing a compile-time integer sequence. An instantiation -// of `integer_sequence` has a sequence of integers encoded in its -// type through its template arguments (which is a common need when -// working with C++11 variadic templates). `absl::integer_sequence` is designed -// to be a drop-in replacement for C++14's `std::integer_sequence`. -// -// Example: -// -// template< class T, T... Ints > -// void user_function(integer_sequence); -// -// int main() -// { -// // user_function's `T` will be deduced to `int` and `Ints...` -// // will be deduced to `0, 1, 2, 3, 4`. -// user_function(make_integer_sequence()); -// } -template -struct integer_sequence { - using value_type = T; - static constexpr std::size_t size() noexcept { return sizeof...(Ints); } -}; - -// index_sequence -// -// A helper template for an `integer_sequence` of `size_t`, -// `absl::index_sequence` is designed to be a drop-in replacement for C++14's -// `std::index_sequence`. -template -using index_sequence = integer_sequence; - -namespace utility_internal { - -template -struct Extend; - -// Note that SeqSize == sizeof...(Ints). It's passed explicitly for efficiency. -template -struct Extend, SeqSize, 0> { - using type = integer_sequence; -}; - -template -struct Extend, SeqSize, 1> { - using type = integer_sequence; -}; - -// Recursion helper for 'make_integer_sequence'. -// 'Gen::type' is an alias for 'integer_sequence'. -template -struct Gen { - using type = typename Extend::type, N / 2, N % 2>::type; -}; - -template -struct Gen { - using type = integer_sequence; -}; - -} // namespace utility_internal - -// Compile-time sequences of integers - -// make_integer_sequence -// -// This template alias is equivalent to -// `integer_sequence`, and is designed to be a drop-in -// replacement for C++14's `std::make_integer_sequence`. -template -using make_integer_sequence = typename utility_internal::Gen::type; - -// make_index_sequence -// -// This template alias is equivalent to `index_sequence<0, 1, ..., N-1>`, -// and is designed to be a drop-in replacement for C++14's -// `std::make_index_sequence`. -template -using make_index_sequence = make_integer_sequence; - -// index_sequence_for -// -// Converts a typename pack into an index sequence of the same length, and -// is designed to be a drop-in replacement for C++14's -// `std::index_sequence_for()` -template -using index_sequence_for = make_index_sequence; - -//// END OF CODE FROM GOOGLE ABSEIL - -#endif - -// dispatch utility (taken from ranges-v3) -template -struct priority_tag : priority_tag {}; -template <> -struct priority_tag<0> {}; - -// taken from ranges-v3 -template -struct static_const { - static constexpr T value{}; -}; - -template -constexpr T static_const::value; - -} // namespace detail -} // namespace nlohmann - -// #include - -namespace nlohmann { -namespace detail { -// dispatching helper struct -template -struct identity_tag {}; -} // namespace detail -} // namespace nlohmann - -// #include - -#include // numeric_limits -#include // false_type, is_constructible, is_integral, is_same, true_type -#include // declval -#include // tuple - -// #include - -#include // random_access_iterator_tag - -// #include - -namespace nlohmann { -namespace detail { -template -struct make_void { - using type = void; -}; -template -using void_t = typename make_void::type; -} // namespace detail -} // namespace nlohmann - -// #include - -namespace nlohmann { -namespace detail { -template -struct iterator_types {}; - -template -struct iterator_types< - It, - void_t< - typename It::difference_type, - typename It::value_type, - typename It::pointer, - typename It::reference, - typename It::iterator_category>> { - using difference_type = typename It::difference_type; - using value_type = typename It::value_type; - using pointer = typename It::pointer; - using reference = typename It::reference; - using iterator_category = typename It::iterator_category; -}; - -// This is required as some compilers implement std::iterator_traits in a way that -// doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341. -template -struct iterator_traits {}; - -template -struct iterator_traits::value>> : iterator_types {}; - -template -struct iterator_traits::value>> { - using iterator_category = std::random_access_iterator_tag; - using value_type = T; - using difference_type = ptrdiff_t; - using pointer = T*; - using reference = T&; -}; -} // namespace detail -} // namespace nlohmann - -// #include - -// #include - -// #include - -#include - -// #include - -// https://en.cppreference.com/w/cpp/experimental/is_detected -namespace nlohmann { -namespace detail { -struct nonesuch { - nonesuch() = delete; - ~nonesuch() = delete; - nonesuch(nonesuch const&) = delete; - nonesuch(nonesuch const&&) = delete; - void operator=(nonesuch const&) = delete; - void operator=(nonesuch&&) = delete; -}; - -template class Op, class... Args> -struct detector { - using value_t = std::false_type; - using type = Default; -}; - -template class Op, class... Args> -struct detector>, Op, Args...> { - using value_t = std::true_type; - using type = Op; -}; - -template