Project

General

Profile

Template
json_fwd.hpp
Go to the documentation of this file.
1// __ _____ _____ _____
2// __| | __| | | | JSON for Modern C++
3// | | |__ | | | | | | version 3.11.2
4// |_____|_____|_____|_|___| https://github.com/nlohmann/json
5//
6// SPDX-FileCopyrightText: 2013-2022 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.11.2
22// |_____|_____|_____|_|___| https://github.com/nlohmann/json
23//
24// SPDX-FileCopyrightText: 2013-2022 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 != 11 || NLOHMANN_JSON_VERSION_PATCH != 2
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 11 // NOLINT(modernize-macro-to-enum)
41#define NLOHMANN_JSON_VERSION_PATCH 2 // NOLINT(modernize-macro-to-enum)
42
43#ifndef JSON_DIAGNOSTICS
44 #define JSON_DIAGNOSTICS 0
45#endif
46
47#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
48 #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0
49#endif
50
51#if JSON_DIAGNOSTICS
52 #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag
53#else
54 #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS
55#endif
56
57#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
58 #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp
59#else
60 #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON
61#endif
62
63#ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION
64 #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0
65#endif
66
67// Construct the namespace ABI tags component
68#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b
69#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \
70 NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b)
71
72#define NLOHMANN_JSON_ABI_TAGS \
73 NLOHMANN_JSON_ABI_TAGS_CONCAT( \
74 NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \
75 NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON)
76
77// Construct the namespace version component
78#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \
79 _v ## major ## _ ## minor ## _ ## patch
80#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \
81 NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch)
82
83#if NLOHMANN_JSON_NAMESPACE_NO_VERSION
84#define NLOHMANN_JSON_NAMESPACE_VERSION
85#else
86#define NLOHMANN_JSON_NAMESPACE_VERSION \
87 NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \
88 NLOHMANN_JSON_VERSION_MINOR, \
89 NLOHMANN_JSON_VERSION_PATCH)
90#endif
91
92// Combine namespace components
93#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b
94#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \
95 NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b)
96
97#ifndef NLOHMANN_JSON_NAMESPACE
98#define NLOHMANN_JSON_NAMESPACE \
99 nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \
100 NLOHMANN_JSON_ABI_TAGS, \
101 NLOHMANN_JSON_NAMESPACE_VERSION)
102#endif
103
104#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN
105#define NLOHMANN_JSON_NAMESPACE_BEGIN \
106 namespace nlohmann \
107 { \
108 inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \
109 NLOHMANN_JSON_ABI_TAGS, \
110 NLOHMANN_JSON_NAMESPACE_VERSION) \
111 {
112#endif
113
114#ifndef NLOHMANN_JSON_NAMESPACE_END
115#define NLOHMANN_JSON_NAMESPACE_END \
116 } /* namespace (inline namespace) NOLINT(readability/namespace) */ \
117 } // namespace nlohmann
118#endif
119
120
127
135template<typename T = void, typename SFINAE = void>
136struct adl_serializer;
137
140template<template<typename U, typename V, typename... Args> class ObjectType =
141 std::map,
142 template<typename U, typename... Args> class ArrayType = std::vector,
143 class StringType = std::string, class BooleanType = bool,
144 class NumberIntegerType = std::int64_t,
145 class NumberUnsignedType = std::uint64_t,
146 class NumberFloatType = double,
147 template<typename U> class AllocatorType = std::allocator,
148 template<typename T, typename SFINAE = void> class JSONSerializer =
150 class BinaryType = std::vector<std::uint8_t>, // cppcheck-suppress syntaxError
151 class CustomBaseClass = void>
152class basic_json;
153
156template<typename RefStringType>
157class json_pointer;
158
164
167template<class Key, class T, class IgnoredLess, class Allocator>
168struct ordered_map;
169
173
175
176#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_
namespace for Niels Lohmann
Definition json.hpp:19313
JSON Pointer defines a string syntax for identifying a specific value within a JSON document.
Definition json.hpp:13755
basic_json< nlohmann::ordered_map > ordered_json
specialization that maintains the insertion order of object keys
Definition json.hpp:3417
basic_json<> json
default specialization
Definition json.hpp:3408
#define NLOHMANN_JSON_NAMESPACE_END
Definition json_fwd.hpp:115
#define NLOHMANN_JSON_NAMESPACE_BEGIN
Definition json_fwd.hpp:105
namespace for Niels Lohmann
Definition json.hpp:5766
a minimal map-like container that preserves insertion order
Definition json.hpp:18948