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
13#include <nlohmann/detail/abi_macros.hpp>
14
15NLOHMANN_JSON_NAMESPACE_BEGIN
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*/
29struct json_default_base {};
30
31template<class T>
32using json_base_class = typename std::conditional <
33 std::is_same<T, void>::value,
34 json_default_base,
35 T
36 >::type;
37
38} // namespace detail
39NLOHMANN_JSON_NAMESPACE_END
40