Debian Codegraph @

single_include/nlohmann/json_fwd.hpp

raw symbols SCIP
1 // __ _____ _____ _____
2 // __| | __| | | | JSON for Modern C++
3 // | | |__ | | | | | | version 3.12.0
4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
5 //
6 // SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
7 // SPDX-License-Identifier: MIT
8
9 #ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_
10 #define INCLUDE_NLOHMANN_JSON_FWD_HPP_
11
12 #include <cstdint> // int64_t, uint64_t
13 #include <map> // map
14 #include <memory> // allocator
15 #include <string> // string
16 #include <vector> // vector
17
18 // #include <nlohmann/detail/abi_macros.hpp>
19 // __ _____ _____ _____
20 // __| | __| | | | JSON for Modern C++
21 // | | |__ | | | | | | version 3.12.0
22 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
23 //
24 // SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
25 // SPDX-License-Identifier: MIT
26
27
28
29 // This file contains all macro definitions affecting or depending on the ABI
30
31 #ifndef JSON_SKIP_LIBRARY_VERSION_CHECK
32 #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH)
33 #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 12 || NLOHMANN_JSON_VERSION_PATCH != 0
34 #warning "Already included a different version of the library!"
35 #endif
36 #endif
37 #endif
38
39 #define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum)
40 #define NLOHMANN_JSON_VERSION_MINOR 12 // NOLINT(modernize-macro-to-enum)
41 #define NLOHMANN_JSON_VERSION_PATCH 0 // NOLINT(modernize-macro-to-enum)
42
43 #ifndef JSON_DIAGNOSTICS
44 #define JSON_DIAGNOSTICS 0
45 #endif
46
47 #ifndef JSON_DIAGNOSTIC_POSITIONS
48 #define JSON_DIAGNOSTIC_POSITIONS 0
49 #endif
50
51 #ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
52 #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0
53 #endif
54
55 #if JSON_DIAGNOSTICS
56 #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag
57 #else
58 #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS
59 #endif
60
61 #if JSON_DIAGNOSTIC_POSITIONS
62 #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS _dp
63 #else
64 #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS
65 #endif
66
67 #if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
68 #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp
69 #else
70 #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON
71 #endif
72
73 #ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION
74 #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0
75 #endif
76
77 // Construct the namespace ABI tags component
78 #define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b, c) json_abi ## a ## b ## c
79 #define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b, c) \
80 NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b, c)
81
82 #define NLOHMANN_JSON_ABI_TAGS \
83 NLOHMANN_JSON_ABI_TAGS_CONCAT( \
84 NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \
85 NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON, \
86 NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS)
87
88 // Construct the namespace version component
89 #define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \
90 _v ## major ## _ ## minor ## _ ## patch
91 #define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \
92 NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch)
93
94 #if NLOHMANN_JSON_NAMESPACE_NO_VERSION
95 #define NLOHMANN_JSON_NAMESPACE_VERSION
96 #else
97 #define NLOHMANN_JSON_NAMESPACE_VERSION \
98 NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \
99 NLOHMANN_JSON_VERSION_MINOR, \
100 NLOHMANN_JSON_VERSION_PATCH)
101 #endif
102
103 // Combine namespace components
104 #define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b
105 #define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \
106 NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b)
107
108 #ifndef NLOHMANN_JSON_NAMESPACE
109 #define NLOHMANN_JSON_NAMESPACE \
110 nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \
111 NLOHMANN_JSON_ABI_TAGS, \
112 NLOHMANN_JSON_NAMESPACE_VERSION)
113 #endif
114
115 #ifndef NLOHMANN_JSON_NAMESPACE_BEGIN
116 #define NLOHMANN_JSON_NAMESPACE_BEGIN \
117 namespace nlohmann \
118 { \
119 inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \
120 NLOHMANN_JSON_ABI_TAGS, \
121 NLOHMANN_JSON_NAMESPACE_VERSION) \
122 {
123 #endif
124
125 #ifndef NLOHMANN_JSON_NAMESPACE_END
126 #define NLOHMANN_JSON_NAMESPACE_END \
127 } /* namespace (inline namespace) NOLINT(readability/namespace) */ \
128 } // namespace nlohmann
129 #endif
130
131
132 /*!
133 @brief namespace for Niels Lohmann
134 @see https://github.com/nlohmann
135 @since version 1.0.0
136 */
137 NLOHMANN_JSON_NAMESPACE_BEGIN
138
139 /*!
140 @brief default JSONSerializer template argument
141
142 This serializer ignores the template arguments and uses ADL
143 ([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl))
144 for serialization.
145 */
146 template<typename T = void, typename SFINAE = void>
147 struct adl_serializer;
148
149 /// a class to store JSON values
150 /// @sa https://json.nlohmann.me/api/basic_json/
151 template<template<typename U, typename V, typename... Args> class ObjectType =
152 std::map,
153 template<typename U, typename... Args> class ArrayType = std::vector,
154 class StringType = std::string, class BooleanType = bool,
155 class NumberIntegerType = std::int64_t,
156 class NumberUnsignedType = std::uint64_t,
157 class NumberFloatType = double,
158 template<typename U> class AllocatorType = std::allocator,
159 template<typename T, typename SFINAE = void> class JSONSerializer =
160 adl_serializer,
161 class BinaryType = std::vector<std::uint8_t>, // cppcheck-suppress syntaxError
162 class CustomBaseClass = void>
163 class basic_json;
164
165 /// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document
166 /// @sa https://json.nlohmann.me/api/json_pointer/
167 template<typename RefStringType>
168 class json_pointer;
169
170 /*!
171 @brief default specialization
172 @sa https://json.nlohmann.me/api/json/
173 */
174 using json = basic_json<>;
175
176 /// @brief a minimal map-like container that preserves insertion order
177 /// @sa https://json.nlohmann.me/api/ordered_map/
178 template<class Key, class T, class IgnoredLess, class Allocator>
179 struct ordered_map;
180
181 /// @brief specialization that maintains the insertion order of object keys
182 /// @sa https://json.nlohmann.me/api/ordered_json/
183 using ordered_json = basic_json<nlohmann::ordered_map>;
184
185 NLOHMANN_JSON_NAMESPACE_END
186
187 #endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_