WPILibC++ 2024.3.2
abi_macros.h
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#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(WPI_JSON_VERSION_MAJOR) && defined(WPI_JSON_VERSION_MINOR) && defined(WPI_JSON_VERSION_PATCH)
15 #if WPI_JSON_VERSION_MAJOR != 3 || WPI_JSON_VERSION_MINOR != 11 || WPI_JSON_VERSION_PATCH != 2
16 #warning "Already included a different version of the library!"
17 #endif
18 #endif
19#endif
20
21#define WPI_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum)
22#define WPI_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum)
23#define WPI_JSON_VERSION_PATCH 2 // 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 WPI_JSON_ABI_TAG_DIAGNOSTICS _diag
35#else
36 #define WPI_JSON_ABI_TAG_DIAGNOSTICS
37#endif
38
39#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
40 #define WPI_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp
41#else
42 #define WPI_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON
43#endif
44
45#ifndef WPI_JSON_NAMESPACE
46#define WPI_JSON_NAMESPACE \
47 wpi::WPI_JSON_NAMESPACE_CONCAT( \
48 WPI_JSON_ABI_TAGS, \
49 WPI_JSON_NAMESPACE_VERSION)
50#endif
51
52#ifndef WPI_JSON_NAMESPACE_BEGIN
53#define WPI_JSON_NAMESPACE_BEGIN \
54 namespace wpi \
55 {
56#endif
57
58#ifndef WPI_JSON_NAMESPACE_END
59#define WPI_JSON_NAMESPACE_END \
60 } // namespace wpi
61#endif