Add namespace macros

This commit is contained in:
Florian Albrechtskirchinger 2022-07-19 08:08:58 +02:00
parent bfa5f9ac86
commit 04ff89161a
No known key found for this signature in database
GPG Key ID: 19618CE9B2D4BE6D
40 changed files with 565 additions and 696 deletions

View File

@ -13,13 +13,11 @@
#include <nlohmann/detail/conversions/from_json.hpp>
#include <nlohmann/detail/conversions/to_json.hpp>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta/identity_tag.hpp>
#include <nlohmann/detail/meta/type_traits.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
/// @sa https://json.nlohmann.me/api/adl_serializer/
template<typename ValueType, typename>
@ -55,5 +53,5 @@ struct adl_serializer
::nlohmann::to_json(j, std::forward<TargetType>(val));
}
};
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -12,10 +12,9 @@
#include <tuple> // tie
#include <utility> // move
namespace nlohmann
{
inline namespace json_v3_10_5
{
#include <nlohmann/detail/macro_scope.hpp>
NLOHMANN_JSON_NAMESPACE_BEGIN
/// @brief an internal type for a backed binary type
/// @sa https://json.nlohmann.me/api/byte_container_with_subtype/
@ -101,5 +100,4 @@ class byte_container_with_subtype : public BinaryType
bool m_has_subtype = false;
};
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -30,36 +30,26 @@
#if JSON_HAS_EXPERIMENTAL_FILESYSTEM
#include <experimental/filesystem>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
namespace std_fs = std::experimental::filesystem;
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END
#elif JSON_HAS_FILESYSTEM
#include <filesystem>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
namespace std_fs = std::filesystem;
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END
#endif
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
template<typename BasicJsonType>
inline void from_json(const BasicJsonType& j, typename std::nullptr_t& n)
{
@ -505,6 +495,7 @@ struct from_json_fn
return from_json(j, std::forward<T>(val));
}
};
} // namespace detail
#ifndef JSON_HAS_CPP_17
@ -519,5 +510,5 @@ JSON_INLINE_VARIABLE constexpr const auto& from_json = // NOLINT(misc-definition
#ifndef JSON_HAS_CPP_17
} // namespace
#endif
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -18,10 +18,7 @@
#include <nlohmann/detail/macro_scope.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
@ -1118,5 +1115,4 @@ char* to_chars(char* first, const char* last, FloatType value)
}
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -17,44 +17,34 @@
#include <valarray> // valarray
#include <vector> // vector
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/iterators/iteration_proxy.hpp>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta/cpp_future.hpp>
#include <nlohmann/detail/meta/type_traits.hpp>
#include <nlohmann/detail/value_t.hpp>
#if JSON_HAS_EXPERIMENTAL_FILESYSTEM
#include <experimental/filesystem>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
namespace std_fs = std::experimental::filesystem;
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END
#elif JSON_HAS_FILESYSTEM
#include <filesystem>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
namespace std_fs = std::filesystem;
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END
#endif
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
//////////////////
// constructors //
//////////////////
@ -463,5 +453,5 @@ JSON_INLINE_VARIABLE constexpr const auto& to_json = // NOLINT(misc-definitions-
#ifndef JSON_HAS_CPP_17
} // namespace
#endif
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -23,10 +23,7 @@
#include <nlohmann/detail/string_concat.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
@ -255,5 +252,4 @@ class other_error : public exception
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -15,10 +15,7 @@
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/value_t.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
@ -129,5 +126,4 @@ std::size_t hash(const BasicJsonType& j)
}
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -32,10 +32,7 @@
#include <nlohmann/detail/string_concat.hpp>
#include <nlohmann/detail/value_t.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
@ -2971,6 +2968,6 @@ class binary_reader
/// the SAX parser
json_sax_t* sax = nullptr;
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -26,12 +26,10 @@
#include <nlohmann/detail/iterators/iterator_traits.hpp>
#include <nlohmann/detail/macro_scope.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
/// the supported input formats
enum class input_format_t { json, cbor, msgpack, ubjson, bson, bjdata };
@ -491,6 +489,6 @@ class span_input_adapter
private:
contiguous_bytes_input_adapter ia;
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -17,10 +17,7 @@
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/string_concat.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
/*!
@brief SAX interface
@ -726,7 +723,6 @@ class json_sax_acceptor
return false;
}
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
} // namespace detail
NLOHMANN_JSON_NAMESPACE_END

View File

@ -22,12 +22,10 @@
#include <nlohmann/detail/input/position_t.hpp>
#include <nlohmann/detail/macro_scope.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
///////////
// lexer //
///////////
@ -1629,6 +1627,6 @@ scan_number_done:
/// the decimal point
const char_int_type decimal_point_char = '.';
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -24,10 +24,7 @@
#include <nlohmann/detail/string_concat.hpp>
#include <nlohmann/detail/value_t.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
////////////
@ -507,5 +504,4 @@ class parser
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -10,12 +10,12 @@
#include <cstddef> // size_t
namespace nlohmann
{
inline namespace json_v3_10_5
{
#include <nlohmann/detail/macro_scope.hpp>
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
/// struct to capture the start position of the current token
struct position_t
{
@ -34,5 +34,4 @@ struct position_t
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -9,13 +9,12 @@
#pragma once
#include <nlohmann/detail/iterators/primitive_iterator.hpp>
#include <nlohmann/detail/macro_scope.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
/*!
@brief an iterator value
@ -31,6 +30,6 @@ template<typename BasicJsonType> struct internal_iterator
/// generic iterator for all other types
primitive_iterator_t primitive_iterator {};
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -19,12 +19,10 @@
#include <nlohmann/detail/meta/type_traits.hpp>
#include <nlohmann/detail/value_t.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
// forward declare, to be able to friend it later on
template<typename IteratorType> class iteration_proxy;
template<typename IteratorType> class iteration_proxy_value;
@ -748,6 +746,6 @@ class iter_impl // NOLINT(cppcoreguidelines-special-member-functions,hicpp-speci
/// the actual iterator of the associated instance
internal_iterator<typename std::remove_const<BasicJsonType>::type> m_it {};
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -18,15 +18,14 @@
#include <ranges> // enable_borrowed_range
#endif
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta/type_traits.hpp>
#include <nlohmann/detail/value_t.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
template<typename string_type>
void int_to_string( string_type& target, std::size_t value )
{
@ -203,9 +202,9 @@ auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decl
{
return i.value();
}
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END
// The Addition to the STD Namespace is required to add
// Structured Bindings Support to the iteration_proxy_value class
@ -213,6 +212,7 @@ auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decl
// And see https://github.com/nlohmann/json/pull/1391
namespace std
{
#if defined(__clang__)
// Fix: https://github.com/nlohmann/json/issues/1401
#pragma clang diagnostic push
@ -233,6 +233,7 @@ class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >>
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
} // namespace std
#if JSON_HAS_RANGES

View File

@ -10,15 +10,14 @@
#include <iterator> // random_access_iterator_tag
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta/void_t.hpp>
#include <nlohmann/detail/meta/cpp_future.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
template<typename It, typename = void>
struct iterator_types {};
@ -57,6 +56,6 @@ struct iterator_traits<T*, enable_if_t<std::is_object<T>::value>>
using pointer = T*;
using reference = T&;
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -12,12 +12,12 @@
#include <iterator> // reverse_iterator
#include <utility> // declval
namespace nlohmann
{
inline namespace json_v3_10_5
{
#include <nlohmann/detail/macro_scope.hpp>
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
//////////////////////
// reverse_iterator //
//////////////////////
@ -125,6 +125,6 @@ class json_reverse_iterator : public std::reverse_iterator<Base>
return it.operator * ();
}
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -13,12 +13,10 @@
#include <nlohmann/detail/macro_scope.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
/*
@brief an iterator for primitive JSON types
@ -129,6 +127,6 @@ class primitive_iterator_t
return *this;
}
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -27,10 +27,7 @@
#include <nlohmann/detail/string_escape.hpp>
#include <nlohmann/detail/value_t.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
/// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document
/// @sa https://json.nlohmann.me/api/json_pointer/
@ -899,5 +896,5 @@ inline bool operator!=(json_pointer<RefStringTypeLhs> const& lhs,
{
return !(lhs == rhs);
}
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -11,14 +11,13 @@
#include <initializer_list>
#include <utility>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta/type_traits.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
template<typename BasicJsonType>
class json_ref
{
@ -74,6 +73,6 @@ class json_ref
mutable value_type owned_value = nullptr;
value_type const* value_ref = nullptr;
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -9,8 +9,8 @@
#pragma once
#include <utility> // declval, pair
#include <nlohmann/thirdparty/hedley/hedley.hpp>
#include <nlohmann/detail/meta/detected.hpp>
#include <nlohmann/thirdparty/hedley/hedley.hpp>
// This file contains all internal macro definitions
// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them
@ -228,6 +228,54 @@
e = ((it != std::end(m)) ? it : std::begin(m))->first; \
}
#ifndef JSON_USE_IMPLICIT_CONVERSIONS
#define JSON_USE_IMPLICIT_CONVERSIONS 1
#endif
#if JSON_USE_IMPLICIT_CONVERSIONS
#define JSON_EXPLICIT
#else
#define JSON_EXPLICIT explicit
#endif
#ifndef JSON_DIAGNOSTICS
#define JSON_DIAGNOSTICS 0
#endif
#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
#define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0
#endif
#ifndef JSON_DISABLE_ENUM_SERIALIZATION
#define JSON_DISABLE_ENUM_SERIALIZATION 0
#endif
#if JSON_DIAGNOSTICS
#define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag
#else
#define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS
#endif
#define NLOHMANN_JSON_ABI_PREFIX json_v3_10_5
#define NLOHMANN_JSON_ABI_CONCAT_EX(a, b) a ## b
#define NLOHMANN_JSON_ABI_CONCAT(a, b) NLOHMANN_JSON_ABI_CONCAT_EX(a, b)
#define NLOHMANN_JSON_ABI_STRING \
NLOHMANN_JSON_ABI_CONCAT( \
NLOHMANN_JSON_ABI_PREFIX, \
NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS \
)
#define NLOHMANN_JSON_NAMESPACE nlohmann::NLOHMANN_JSON_ABI_STRING
#define NLOHMANN_JSON_NAMESPACE_BEGIN \
namespace nlohmann \
{ \
inline namespace NLOHMANN_JSON_ABI_STRING \
{
#define NLOHMANN_JSON_NAMESPACE_END \
} /* namespace (abi_string) */ \
} /* namespace nlohmann */
// Ugly macros to avoid uglier copy-paste when specializing basic_json. They
// may be removed in the future once the class is split.
@ -446,25 +494,3 @@
struct would_call_std_##std_name : detail2::would_call_std_##std_name<T...> \
{ \
}
#ifndef JSON_USE_IMPLICIT_CONVERSIONS
#define JSON_USE_IMPLICIT_CONVERSIONS 1
#endif
#if JSON_USE_IMPLICIT_CONVERSIONS
#define JSON_EXPLICIT
#else
#define JSON_EXPLICIT explicit
#endif
#ifndef JSON_DIAGNOSTICS
#define JSON_DIAGNOSTICS 0
#endif
#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
#define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0
#endif
#ifndef JSON_DISABLE_ENUM_SERIALIZATION
#define JSON_DISABLE_ENUM_SERIALIZATION 0
#endif

View File

@ -10,10 +10,8 @@
#include <nlohmann/detail/macro_scope.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
NLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin);
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -10,10 +10,8 @@
#include <nlohmann/detail/macro_scope.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
NLOHMANN_CAN_CALL_STD_FUNC_IMPL(end);
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -15,10 +15,7 @@
#include <nlohmann/detail/macro_scope.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
@ -166,5 +163,4 @@ struct static_const
#endif
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -12,13 +12,12 @@
#include <nlohmann/detail/meta/void_t.hpp>
// https://en.cppreference.com/w/cpp/experimental/is_detected
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
// https://en.cppreference.com/w/cpp/experimental/is_detected
struct nonesuch
{
nonesuch() = delete;
@ -67,6 +66,6 @@ using is_detected_exact = std::is_same<Expected, detected_t<Op, Args...>>;
template<class To, template<class...> class Op, class... Args>
using is_detected_convertible =
std::is_convertible<detected_t<Op, Args...>, To>;
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -8,14 +8,14 @@
#pragma once
namespace nlohmann
{
inline namespace json_v3_10_5
{
#include <nlohmann/detail/macro_scope.hpp>
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
// dispatching helper struct
template <class T> struct identity_tag {};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -12,15 +12,14 @@
#include <utility> // declval
#include <string> // string
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta/detected.hpp>
#include <nlohmann/detail/meta/type_traits.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
template<typename T>
using null_function_t = decltype(std::declval<T&>().null());
@ -155,6 +154,6 @@ struct is_sax_static_asserts
"Missing/invalid function: bool parse_error(std::size_t, const "
"std::string&, const exception&)");
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -13,19 +13,15 @@
#include <utility> // declval
#include <tuple> // tuple
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/iterators/iterator_traits.hpp>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta/call_std/begin.hpp>
#include <nlohmann/detail/meta/call_std/end.hpp>
#include <nlohmann/detail/meta/cpp_future.hpp>
#include <nlohmann/detail/meta/detected.hpp>
#include <nlohmann/json_fwd.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
/*!
@brief detail namespace with internal helper functions
@ -36,6 +32,7 @@ implementations of some @ref basic_json methods, and meta-programming helpers.
*/
namespace detail
{
/////////////
// helpers //
/////////////
@ -688,5 +685,4 @@ inline constexpr bool value_in_range_of(T val)
}
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -8,17 +8,17 @@
#pragma once
namespace nlohmann
{
inline namespace json_v3_10_5
{
#include <nlohmann/detail/macro_scope.hpp>
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
template<typename ...Ts> struct make_void
{
using type = void;
};
template<typename ...Ts> using void_t = typename make_void<Ts...>::type;
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -24,12 +24,10 @@
#include <nlohmann/detail/output/output_adapters.hpp>
#include <nlohmann/detail/string_concat.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
///////////////////
// binary writer //
///////////////////
@ -1835,6 +1833,6 @@ class binary_writer
/// the output
output_adapter_t<CharType> oa = nullptr;
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -22,12 +22,10 @@
#include <nlohmann/detail/macro_scope.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
/// abstract output adapter interface
template<typename CharType> struct output_adapter_protocol
{
@ -144,6 +142,6 @@ class output_adapter
private:
output_adapter_t<CharType> oa = nullptr;
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -31,12 +31,10 @@
#include <nlohmann/detail/string_concat.hpp>
#include <nlohmann/detail/value_t.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
///////////////////
// serialization //
///////////////////
@ -985,6 +983,6 @@ class serializer
/// error_handler how to react on decoding errors
const error_handler_t error_handler;
};
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -12,13 +12,11 @@
#include <string> // string
#include <utility> // forward
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta/cpp_future.hpp>
#include <nlohmann/detail/meta/detected.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
@ -146,5 +144,4 @@ inline OutStringType concat(Args && ... args)
}
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -10,10 +10,7 @@
#include <nlohmann/detail/macro_scope.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
@ -72,5 +69,4 @@ static void unescape(StringType& s)
}
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -18,12 +18,10 @@
#include <compare> // partial_ordering
#endif
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
///////////////////////////
// JSON type enumeration //
///////////////////////////
@ -115,6 +113,6 @@ inline bool operator<(const value_t lhs, const value_t rhs) noexcept
return std::is_lt(lhs <=> rhs); // *NOPAD*
}
#endif
} // namespace detail
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

View File

@ -83,10 +83,7 @@
@see https://github.com/nlohmann
@since version 1.0.0
*/
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
/*!
@brief a class to store JSON values
@ -5088,8 +5085,7 @@ std::string to_string(const NLOHMANN_BASIC_JSON_TPL& j)
return j.dump();
}
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END
///////////////////////
// nonmember support //

View File

@ -15,15 +15,15 @@
#include <string> // string
#include <vector> // vector
#include <nlohmann/detail/macro_scope.hpp>
/*!
@brief namespace for Niels Lohmann
@see https://github.com/nlohmann
@since version 1.0.0
*/
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
/*!
@brief default JSONSerializer template argument
@ -69,7 +69,6 @@ struct ordered_map;
/// @sa https://json.nlohmann.me/api/ordered_json/
using ordered_json = basic_json<nlohmann::ordered_map>;
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END
#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_

View File

@ -20,10 +20,7 @@
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta/type_traits.hpp>
namespace nlohmann
{
inline namespace json_v3_10_5
{
NLOHMANN_JSON_NAMESPACE_BEGIN
/// ordered_map: a minimal map-like container that preserves insertion order
/// for use within nlohmann::basic_json<ordered_map>
@ -359,5 +356,4 @@ private:
JSON_NO_UNIQUE_ADDRESS key_compare m_compare = key_compare();
};
} // namespace json_v3_10_5
} // namespace nlohmann
NLOHMANN_JSON_NAMESPACE_END

File diff suppressed because it is too large Load Diff