WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
json_custom_base_class.h
Go to the documentation of this file.
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#include <type_traits> // conditional, is_same
12
14
16namespace detail
17{
18
19/*!
20@brief Default base class of the @ref basic_json class.
21
22So that the correct implementations of the copy / move ctors / assign operators
23of @ref basic_json do not require complex case distinctions
24(no base class / custom base class used as customization point),
25@ref basic_json always has a base class.
26By default, this class is used because it is empty and thus has no effect
27on the behavior of @ref basic_json.
28*/
30
31template<class T>
32using json_base_class = typename std::conditional <
33 std::is_same<T, void>::value,
35 T
36 >::type;
37
38} // namespace detail
#define WPI_JSON_NAMESPACE_END
Definition abi_macros.h:59
#define WPI_JSON_NAMESPACE_BEGIN
Definition abi_macros.h:53
detail namespace with internal helper functions
Definition input_adapters.h:32
typename std::conditional< std::is_same< T, void >::value, json_default_base, T >::type json_base_class
Definition json_custom_base_class.h:32
type
Definition base.h:937
Default base class of the basic_json class.
Definition json_custom_base_class.h:29