Documentation: - basic_json_view::contains: basic_json::contains(json_pointer) never throws either; drop the claim that it does. - std::format support is dated 3.13.0 in the serialization feature page; std::optional is supported since 3.12.0 and std::filesystem::path since 3.10.5 in type_recipes.md. - basic_json_view::source_offset: also -1 for values written by an edit and arrays/objects whose elements an edit added or removed. - basic_json_view::items: const auto& works (binds to the temporary); by value is recommended, non-const auto& does not compile. - basic_json_view::operator==/!=: document the overload that compares a read-only with an editable view. - basic_json_document::erase: out_of_range.404 also for a last token "-". - json_editable_document/json_editable_view: mention insert and erase. - basic_json::swap/std::swap: describe the conditional noexcept (only a throwing move of json_base_class_t can make it throw) and that the std::swap specialization is not provided with C++20 (ADL swap is). - exceptions.md: out_of_range.405 also from front/pop_front and from basic_json_document::erase with an empty pointer; other_error.502 also for non-empty binary values in UBJSON/BJData Draft 2, as the writer does. - Macro pages: fix highlighted lines. Tests: - unit-unicode.cpp: enable the "incorrect sequences" sections that were disabled with #if 0 since 2017 without a reason. They pass; the reason was the runtime of the quadratic high/low surrogate sweep (1024 * 64512 parses, not finished after 3 CPU minutes). That sweep is thinned to all high surrogates against boundary code units, plus one high surrogate against every code unit with accept(). The sections are merged into the existing "incorrect sequences" section of the same name. Repository: - labeler.yml: match the moved json_view feature docs folder. - check_amalgamation.yml: take config_json_view.json from develop's tools. - FILES.md: list json_view_benchmarks.yml. - cmake/ci.cmake: remove the unused targets ci_test_amalgamation (a duplicate of make check-amalgamation), ci_benchmarks and ci_clean, and the .gitignore entry of the first. - make clean and .gitignore cover all tests/*_fuzzer binaries. - hedley_undef.hpp: regenerate with make update_hedley_undef (one line moves into sorted order); regenerate the amalgamation. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
162 lines
5.5 KiB
C++
162 lines
5.5 KiB
C++
// __ _____ _____ _____
|
|
// __| | __| | | | JSON for Modern C++
|
|
// | | |__ | | | | | | version 3.12.0
|
|
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
|
|
//
|
|
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
#pragma once
|
|
|
|
#undef JSON_HEDLEY_ALWAYS_INLINE
|
|
#undef JSON_HEDLEY_ARM_VERSION
|
|
#undef JSON_HEDLEY_ARM_VERSION_CHECK
|
|
#undef JSON_HEDLEY_ARRAY_PARAM
|
|
#undef JSON_HEDLEY_ASSUME
|
|
#undef JSON_HEDLEY_BEGIN_C_DECLS
|
|
#undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE
|
|
#undef JSON_HEDLEY_CLANG_HAS_BUILTIN
|
|
#undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE
|
|
#undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE
|
|
#undef JSON_HEDLEY_CLANG_HAS_EXTENSION
|
|
#undef JSON_HEDLEY_CLANG_HAS_FEATURE
|
|
#undef JSON_HEDLEY_CLANG_HAS_WARNING
|
|
#undef JSON_HEDLEY_COMPCERT_VERSION
|
|
#undef JSON_HEDLEY_COMPCERT_VERSION_CHECK
|
|
#undef JSON_HEDLEY_CONCAT
|
|
#undef JSON_HEDLEY_CONCAT3
|
|
#undef JSON_HEDLEY_CONCAT3_EX
|
|
#undef JSON_HEDLEY_CONCAT_EX
|
|
#undef JSON_HEDLEY_CONST
|
|
#undef JSON_HEDLEY_CONSTEXPR
|
|
#undef JSON_HEDLEY_CONST_CAST
|
|
#undef JSON_HEDLEY_CPP_CAST
|
|
#undef JSON_HEDLEY_CRAY_VERSION
|
|
#undef JSON_HEDLEY_CRAY_VERSION_CHECK
|
|
#undef JSON_HEDLEY_C_DECL
|
|
#undef JSON_HEDLEY_DEPRECATED
|
|
#undef JSON_HEDLEY_DEPRECATED_FOR
|
|
#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
|
|
#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_
|
|
#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
|
|
#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES
|
|
#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS
|
|
#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION
|
|
#undef JSON_HEDLEY_DIAGNOSTIC_POP
|
|
#undef JSON_HEDLEY_DIAGNOSTIC_PUSH
|
|
#undef JSON_HEDLEY_DMC_VERSION
|
|
#undef JSON_HEDLEY_DMC_VERSION_CHECK
|
|
#undef JSON_HEDLEY_EMPTY_BASES
|
|
#undef JSON_HEDLEY_EMSCRIPTEN_VERSION
|
|
#undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK
|
|
#undef JSON_HEDLEY_END_C_DECLS
|
|
#undef JSON_HEDLEY_FALL_THROUGH
|
|
#undef JSON_HEDLEY_FLAGS
|
|
#undef JSON_HEDLEY_FLAGS_CAST
|
|
#undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE
|
|
#undef JSON_HEDLEY_GCC_HAS_BUILTIN
|
|
#undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE
|
|
#undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE
|
|
#undef JSON_HEDLEY_GCC_HAS_EXTENSION
|
|
#undef JSON_HEDLEY_GCC_HAS_FEATURE
|
|
#undef JSON_HEDLEY_GCC_HAS_WARNING
|
|
#undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK
|
|
#undef JSON_HEDLEY_GCC_VERSION
|
|
#undef JSON_HEDLEY_GCC_VERSION_CHECK
|
|
#undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE
|
|
#undef JSON_HEDLEY_GNUC_HAS_BUILTIN
|
|
#undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE
|
|
#undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE
|
|
#undef JSON_HEDLEY_GNUC_HAS_EXTENSION
|
|
#undef JSON_HEDLEY_GNUC_HAS_FEATURE
|
|
#undef JSON_HEDLEY_GNUC_HAS_WARNING
|
|
#undef JSON_HEDLEY_GNUC_VERSION
|
|
#undef JSON_HEDLEY_GNUC_VERSION_CHECK
|
|
#undef JSON_HEDLEY_HAS_ATTRIBUTE
|
|
#undef JSON_HEDLEY_HAS_BUILTIN
|
|
#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE
|
|
#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS
|
|
#undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE
|
|
#undef JSON_HEDLEY_HAS_EXTENSION
|
|
#undef JSON_HEDLEY_HAS_FEATURE
|
|
#undef JSON_HEDLEY_HAS_WARNING
|
|
#undef JSON_HEDLEY_IAR_VERSION
|
|
#undef JSON_HEDLEY_IAR_VERSION_CHECK
|
|
#undef JSON_HEDLEY_IBM_VERSION
|
|
#undef JSON_HEDLEY_IBM_VERSION_CHECK
|
|
#undef JSON_HEDLEY_IMPORT
|
|
#undef JSON_HEDLEY_INLINE
|
|
#undef JSON_HEDLEY_INTEL_CL_VERSION
|
|
#undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK
|
|
#undef JSON_HEDLEY_INTEL_VERSION
|
|
#undef JSON_HEDLEY_INTEL_VERSION_CHECK
|
|
#undef JSON_HEDLEY_IS_CONSTANT
|
|
#undef JSON_HEDLEY_IS_CONSTEXPR_
|
|
#undef JSON_HEDLEY_LIKELY
|
|
#undef JSON_HEDLEY_MALLOC
|
|
#undef JSON_HEDLEY_MCST_LCC_VERSION
|
|
#undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK
|
|
#undef JSON_HEDLEY_MESSAGE
|
|
#undef JSON_HEDLEY_MSVC_VERSION
|
|
#undef JSON_HEDLEY_MSVC_VERSION_CHECK
|
|
#undef JSON_HEDLEY_NEVER_INLINE
|
|
#undef JSON_HEDLEY_NON_NULL
|
|
#undef JSON_HEDLEY_NO_ESCAPE
|
|
#undef JSON_HEDLEY_NO_RETURN
|
|
#undef JSON_HEDLEY_NO_THROW
|
|
#undef JSON_HEDLEY_NULL
|
|
#undef JSON_HEDLEY_PELLES_VERSION
|
|
#undef JSON_HEDLEY_PELLES_VERSION_CHECK
|
|
#undef JSON_HEDLEY_PGI_VERSION
|
|
#undef JSON_HEDLEY_PGI_VERSION_CHECK
|
|
#undef JSON_HEDLEY_PRAGMA
|
|
#undef JSON_HEDLEY_PREDICT
|
|
#undef JSON_HEDLEY_PREDICT_FALSE
|
|
#undef JSON_HEDLEY_PREDICT_TRUE
|
|
#undef JSON_HEDLEY_PRINTF_FORMAT
|
|
#undef JSON_HEDLEY_PRIVATE
|
|
#undef JSON_HEDLEY_PUBLIC
|
|
#undef JSON_HEDLEY_PURE
|
|
#undef JSON_HEDLEY_REINTERPRET_CAST
|
|
#undef JSON_HEDLEY_REQUIRE
|
|
#undef JSON_HEDLEY_REQUIRE_CONSTEXPR
|
|
#undef JSON_HEDLEY_REQUIRE_MSG
|
|
#undef JSON_HEDLEY_RESTRICT
|
|
#undef JSON_HEDLEY_RETURNS_NON_NULL
|
|
#undef JSON_HEDLEY_SENTINEL
|
|
#undef JSON_HEDLEY_STATIC_ASSERT
|
|
#undef JSON_HEDLEY_STATIC_CAST
|
|
#undef JSON_HEDLEY_STRINGIFY
|
|
#undef JSON_HEDLEY_STRINGIFY_EX
|
|
#undef JSON_HEDLEY_SUNPRO_VERSION
|
|
#undef JSON_HEDLEY_SUNPRO_VERSION_CHECK
|
|
#undef JSON_HEDLEY_TINYC_VERSION
|
|
#undef JSON_HEDLEY_TINYC_VERSION_CHECK
|
|
#undef JSON_HEDLEY_TI_ARMCL_VERSION
|
|
#undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK
|
|
#undef JSON_HEDLEY_TI_CL2000_VERSION
|
|
#undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK
|
|
#undef JSON_HEDLEY_TI_CL430_VERSION
|
|
#undef JSON_HEDLEY_TI_CL430_VERSION_CHECK
|
|
#undef JSON_HEDLEY_TI_CL6X_VERSION
|
|
#undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK
|
|
#undef JSON_HEDLEY_TI_CL7X_VERSION
|
|
#undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK
|
|
#undef JSON_HEDLEY_TI_CLPRU_VERSION
|
|
#undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK
|
|
#undef JSON_HEDLEY_TI_VERSION
|
|
#undef JSON_HEDLEY_TI_VERSION_CHECK
|
|
#undef JSON_HEDLEY_UNAVAILABLE
|
|
#undef JSON_HEDLEY_UNLIKELY
|
|
#undef JSON_HEDLEY_UNPREDICTABLE
|
|
#undef JSON_HEDLEY_UNREACHABLE
|
|
#undef JSON_HEDLEY_UNREACHABLE_RETURN
|
|
#undef JSON_HEDLEY_VERSION
|
|
#undef JSON_HEDLEY_VERSION_DECODE_MAJOR
|
|
#undef JSON_HEDLEY_VERSION_DECODE_MINOR
|
|
#undef JSON_HEDLEY_VERSION_DECODE_REVISION
|
|
#undef JSON_HEDLEY_VERSION_ENCODE
|
|
#undef JSON_HEDLEY_WARNING
|
|
#undef JSON_HEDLEY_WARN_UNUSED_RESULT
|
|
#undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG
|