Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/test/simulation/fixtures/cpp/headers/abi_macros.hpp
13405 views
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
#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \
60
_v ## major ## _ ## minor ## _ ## patch
61
#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \
62
NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch)
63
64
#if NLOHMANN_JSON_NAMESPACE_NO_VERSION
65
#define NLOHMANN_JSON_NAMESPACE_VERSION
66
#else
67
#define NLOHMANN_JSON_NAMESPACE_VERSION \
68
NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \
69
NLOHMANN_JSON_VERSION_MINOR, \
70
NLOHMANN_JSON_VERSION_PATCH)
71
#endif
72
73
// Combine namespace components
74
#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b
75
#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \
76
NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b)
77
78
#ifndef NLOHMANN_JSON_NAMESPACE
79
#define NLOHMANN_JSON_NAMESPACE \
80
nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \
81
NLOHMANN_JSON_ABI_TAGS, \
82
NLOHMANN_JSON_NAMESPACE_VERSION)
83
#endif
84
85
#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN
86
#define NLOHMANN_JSON_NAMESPACE_BEGIN \
87
namespace nlohmann \
88
{ \
89
inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \
90
NLOHMANN_JSON_ABI_TAGS, \
91
NLOHMANN_JSON_NAMESPACE_VERSION) \
92
{
93
#endif
94
95
#ifndef NLOHMANN_JSON_NAMESPACE_END
96
#define NLOHMANN_JSON_NAMESPACE_END \
97
} /* namespace (inline namespace) NOLINT(readability/namespace) */ \
98
} // namespace nlohmann
99
#endif
100
101