blob: 64e3efcc3e496c3ed9979362c76f2dffb578cb3e [file] [log] [blame]
James Kuszmaulb13e13f2023-11-22 20:44:04 -08001From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Tyler Veness <calcmogul@gmail.com>
3Date: Fri, 8 Sep 2023 19:21:41 -0700
4Subject: [PATCH 1/4] Remove version from namespace
5
6---
7 include/nlohmann/detail/abi_macros.hpp | 45 ++------------------------
8 1 file changed, 3 insertions(+), 42 deletions(-)
9
10diff --git a/include/nlohmann/detail/abi_macros.hpp b/include/nlohmann/detail/abi_macros.hpp
11index 0d3108d166602886d41b5f0fec1e56dd3dbe7e3c..ce9291306cdd9a9baeb8fbb77ca1dc33959e0d36 100644
12--- a/include/nlohmann/detail/abi_macros.hpp
13+++ b/include/nlohmann/detail/abi_macros.hpp
14@@ -42,40 +42,6 @@
15 #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON
16 #endif
17
18-#ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION
19- #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0
20-#endif
21-
22-// Construct the namespace ABI tags component
23-#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b
24-#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \
25- NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b)
26-
27-#define NLOHMANN_JSON_ABI_TAGS \
28- NLOHMANN_JSON_ABI_TAGS_CONCAT( \
29- NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \
30- NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON)
31-
32-// Construct the namespace version component
33-#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \
34- _v ## major ## _ ## minor ## _ ## patch
35-#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \
36- NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch)
37-
38-#if NLOHMANN_JSON_NAMESPACE_NO_VERSION
39-#define NLOHMANN_JSON_NAMESPACE_VERSION
40-#else
41-#define NLOHMANN_JSON_NAMESPACE_VERSION \
42- NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \
43- NLOHMANN_JSON_VERSION_MINOR, \
44- NLOHMANN_JSON_VERSION_PATCH)
45-#endif
46-
47-// Combine namespace components
48-#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b
49-#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \
50- NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b)
51-
52 #ifndef NLOHMANN_JSON_NAMESPACE
53 #define NLOHMANN_JSON_NAMESPACE \
54 nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \
55@@ -84,17 +50,12 @@
56 #endif
57
58 #ifndef NLOHMANN_JSON_NAMESPACE_BEGIN
59-#define NLOHMANN_JSON_NAMESPACE_BEGIN \
60- namespace nlohmann \
61- { \
62- inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \
63- NLOHMANN_JSON_ABI_TAGS, \
64- NLOHMANN_JSON_NAMESPACE_VERSION) \
65+#define NLOHMANN_JSON_NAMESPACE_BEGIN \
66+ namespace nlohmann \
67 {
68 #endif
69
70 #ifndef NLOHMANN_JSON_NAMESPACE_END
71-#define NLOHMANN_JSON_NAMESPACE_END \
72- } /* namespace (inline namespace) NOLINT(readability/namespace) */ \
73+#define NLOHMANN_JSON_NAMESPACE_END \
74 } // namespace nlohmann
75 #endif