| 1 | // __ _____ _____ _____ |
| 2 | // __| | __| | | | JSON for Modern C++ |
| 3 | // | | |__ | | | | | | version 3.11.3 |
| 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json |
| 5 | // |
| 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> |
| 7 | // SPDX-License-Identifier: MIT |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | // This file contains all macro definitions affecting or depending on the ABI |
| 12 | |
| 13 | #ifndef JSON_SKIP_LIBRARY_VERSION_CHECK |
| 14 | #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH) |
| 15 | #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 3 |
| 16 | #warning "Already included a different version of the library!" |
| 17 | #endif |
| 18 | #endif |
| 19 | #endif |
| 20 | |
| 21 | #define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum) |
| 22 | #define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum) |
| 23 | #define NLOHMANN_JSON_VERSION_PATCH 3 // NOLINT(modernize-macro-to-enum) |
| 24 | |
| 25 | #ifndef JSON_DIAGNOSTICS |
| 26 | #define JSON_DIAGNOSTICS 0 |
| 27 | #endif |
| 28 | |
| 29 | #ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON |
| 30 | #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0 |
| 31 | #endif |
| 32 | |
| 33 | #if JSON_DIAGNOSTICS |
| 34 | #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag |
| 35 | #else |
| 36 | #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS |
| 37 | #endif |
| 38 | |
| 39 | #if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON |
| 40 | #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp |
| 41 | #else |
| 42 | #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON |
| 43 | #endif |
| 44 | |
| 45 | #ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION |
| 46 | #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0 |
| 47 | #endif |
| 48 | |
| 49 | // Construct the namespace ABI tags component |
| 50 | #define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b |
| 51 | #define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \ |
| 52 | NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) |
| 53 | |
| 54 | #define NLOHMANN_JSON_ABI_TAGS \ |
| 55 | NLOHMANN_JSON_ABI_TAGS_CONCAT( \ |
| 56 | NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \ |
| 57 | NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON) |
| 58 | |
| 59 | // Construct the namespace version component |
| 60 | #define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \ |
| 61 | _v ## major ## _ ## minor ## _ ## patch |
| 62 | #define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \ |
| 63 | NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) |
| 64 | |
| 65 | #if NLOHMANN_JSON_NAMESPACE_NO_VERSION |
| 66 | #define NLOHMANN_JSON_NAMESPACE_VERSION |
| 67 | #else |
| 68 | #define NLOHMANN_JSON_NAMESPACE_VERSION \ |
| 69 | NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \ |
| 70 | NLOHMANN_JSON_VERSION_MINOR, \ |
| 71 | NLOHMANN_JSON_VERSION_PATCH) |
| 72 | #endif |
| 73 | |
| 74 | // Combine namespace components |
| 75 | #define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b |
| 76 | #define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \ |
| 77 | NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) |
| 78 | |
| 79 | #ifndef NLOHMANN_JSON_NAMESPACE |
| 80 | #define NLOHMANN_JSON_NAMESPACE \ |
| 81 | nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \ |
| 82 | NLOHMANN_JSON_ABI_TAGS, \ |
| 83 | NLOHMANN_JSON_NAMESPACE_VERSION) |
| 84 | #endif |
| 85 | |
| 86 | #ifndef NLOHMANN_JSON_NAMESPACE_BEGIN |
| 87 | #define NLOHMANN_JSON_NAMESPACE_BEGIN \ |
| 88 | namespace nlohmann \ |
| 89 | { \ |
| 90 | inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \ |
| 91 | NLOHMANN_JSON_ABI_TAGS, \ |
| 92 | NLOHMANN_JSON_NAMESPACE_VERSION) \ |
| 93 | { |
| 94 | #endif |
| 95 | |
| 96 | #ifndef NLOHMANN_JSON_NAMESPACE_END |
| 97 | #define NLOHMANN_JSON_NAMESPACE_END \ |
| 98 | } /* namespace (inline namespace) NOLINT(readability/namespace) */ \ |
| 99 | } // namespace nlohmann |
| 100 | #endif |
| 101 | |