@@ -3499,71 +3499,71 @@ NLOHMANN_JSON_NAMESPACE_END
34993499// SPDX-License-Identifier: MIT
35003500
35013501#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_
3502- #define INCLUDE_NLOHMANN_JSON_FWD_HPP_
3502+ #define INCLUDE_NLOHMANN_JSON_FWD_HPP_
35033503
3504- #include <cstdint> // int64_t, uint64_t
3505- #include <map> // map
3506- #include <memory> // allocator
3507- #include <string> // string
3508- #include <vector> // vector
3509-
3510- // #include <nlohmann/detail/abi_macros.hpp>
3504+ #include <cstdint> // int64_t, uint64_t
3505+ #include <map> // map
3506+ #include <memory> // allocator
3507+ #include <string> // string
3508+ #include <vector> // vector
35113509
3510+ // #include <nlohmann/detail/abi_macros.hpp>
35123511
3513- /*!
3514- @brief namespace for Niels Lohmann
3515- @see https://github.com/nlohmann
3516- @since version 1.0.0
3517- */
3518- NLOHMANN_JSON_NAMESPACE_BEGIN
35193512
3520- /*!
3521- @brief default JSONSerializer template argument
3513+ /*!
3514+ @brief namespace for Niels Lohmann
3515+ @see https://github.com/nlohmann
3516+ @since version 1.0.0
3517+ */
3518+ NLOHMANN_JSON_NAMESPACE_BEGIN
35223519
3523- This serializer ignores the template arguments and uses ADL
3524- ([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl))
3525- for serialization.
3526- */
3527- template<typename T = void, typename SFINAE = void>
3528- struct adl_serializer;
3529-
3530- /// a class to store JSON values
3531- /// @sa https://json.nlohmann.me/api/basic_json/
3532- template<template<typename U, typename V, typename... Args> class ObjectType =
3533- std::map,
3534- template<typename U, typename... Args> class ArrayType = std::vector,
3535- class StringType = std::string, class BooleanType = bool,
3536- class NumberIntegerType = std::int64_t,
3537- class NumberUnsignedType = std::uint64_t,
3538- class NumberFloatType = double,
3539- template<typename U> class AllocatorType = std::allocator,
3540- template<typename T, typename SFINAE = void> class JSONSerializer =
3541- adl_serializer,
3542- class BinaryType = std::vector<std::uint8_t>, // cppcheck-suppress syntaxError
3543- class CustomBaseClass = void>
3544- class basic_json;
3520+ /*!
3521+ @brief default JSONSerializer template argument
35453522
3546- /// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document
3547- /// @sa https://json.nlohmann.me/api/json_pointer/
3548- template<typename RefStringType>
3549- class json_pointer;
3523+ This serializer ignores the template arguments and uses ADL
3524+ ([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl))
3525+ for serialization.
3526+ */
3527+ template<typename T = void, typename SFINAE = void>
3528+ struct adl_serializer;
3529+
3530+ /// a class to store JSON values
3531+ /// @sa https://json.nlohmann.me/api/basic_json/
3532+ template<template<typename U, typename V, typename... Args> class ObjectType =
3533+ std::map,
3534+ template<typename U, typename... Args> class ArrayType = std::vector,
3535+ class StringType = std::string, class BooleanType = bool,
3536+ class NumberIntegerType = std::int64_t,
3537+ class NumberUnsignedType = std::uint64_t,
3538+ class NumberFloatType = double,
3539+ template<typename U> class AllocatorType = std::allocator,
3540+ template<typename T, typename SFINAE = void> class JSONSerializer =
3541+ adl_serializer,
3542+ class BinaryType = std::vector<std::uint8_t>, // cppcheck-suppress syntaxError
3543+ class CustomBaseClass = void>
3544+ class basic_json;
3545+
3546+ /// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document
3547+ /// @sa https://json.nlohmann.me/api/json_pointer/
3548+ template<typename RefStringType>
3549+ class json_pointer;
35503550
3551- /*!
3552- @brief default specialization
3553- @sa https://json.nlohmann.me/api/json/
3554- */
3555- using json = basic_json<>;
3551+ /*!
3552+ @brief default specialization
3553+ @sa https://json.nlohmann.me/api/json/
3554+ */
3555+ using json = basic_json<>;
35563556
3557- /// @brief a minimal map-like container that preserves insertion order
3558- /// @sa https://json.nlohmann.me/api/ordered_map/
3559- template<class Key, class T, class IgnoredLess, class Allocator>
3560- struct ordered_map;
3557+ /// @brief a minimal map-like container that preserves insertion order
3558+ /// @sa https://json.nlohmann.me/api/ordered_map/
3559+ template<class Key, class T, class IgnoredLess, class Allocator>
3560+ struct ordered_map;
35613561
3562- /// @brief specialization that maintains the insertion order of object keys
3563- /// @sa https://json.nlohmann.me/api/ordered_json/
3564- using ordered_json = basic_json<nlohmann::ordered_map>;
3562+ /// @brief specialization that maintains the insertion order of object keys
3563+ /// @sa https://json.nlohmann.me/api/ordered_json/
3564+ using ordered_json = basic_json<nlohmann::ordered_map>;
35653565
3566- NLOHMANN_JSON_NAMESPACE_END
3566+ NLOHMANN_JSON_NAMESPACE_END
35673567
35683568#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_
35693569
@@ -4110,7 +4110,7 @@ template<typename BasicJsonType, typename CompatibleReferenceType>
41104110struct is_compatible_reference_type_impl <
41114111 BasicJsonType, CompatibleReferenceType,
41124112 enable_if_t<std::is_reference<CompatibleReferenceType>::value,
4113- void_t<decltype(std::declval<BasicJsonType>().template get_ptr<typename std::add_pointer<CompatibleReferenceType>::type>())>>>
4113+ void_t<decltype(std::declval<BasicJsonType>().template get_ptr<typename std::add_pointer<CompatibleReferenceType>::type>())> >>
41144114 : std::true_type {};
41154115
41164116template<typename BasicJsonType, typename CompatibleReferenceType>
@@ -4883,10 +4883,10 @@ namespace detail
48834883#ifdef JSON_HAS_CPP_17
48844884
48854885template<bool... Booleans>
4886- struct cxpr_or_impl : std::integral_constant< bool, (Booleans ||...)> {};
4886+ struct cxpr_or_impl : std::integral_constant < bool, (Booleans || ...) > {};
48874887
48884888template<bool... Booleans>
4889- struct cxpr_and_impl : std::integral_constant< bool, (Booleans &&...)> {};
4889+ struct cxpr_and_impl : std::integral_constant < bool, (Booleans &&...) > {};
48904890
48914891#else
48924892
@@ -4911,7 +4911,7 @@ struct cxpr_and_impl<false, Booleans...> : std::false_type {};
49114911#endif
49124912
49134913template<class Boolean>
4914- struct cxpr_not : std::integral_constant< bool, !Boolean::value> {};
4914+ struct cxpr_not : std::integral_constant < bool, !Boolean::value > {};
49154915
49164916template<class... Booleans>
49174917struct cxpr_or : cxpr_or_impl<Booleans::value...> {};
@@ -5356,34 +5356,34 @@ detail::uncvref_t<Type> from_json_tuple_get_impl(BasicJsonType&& j, detail::iden
53565356}
53575357
53585358template<typename BasicJsonType, typename Type,
5359- typename ConstType = detail::enable_if_t<std::is_reference<Type>::value, typename std::remove_reference<Type>::type const&>>
5360- auto from_json_tuple_get_impl(BasicJsonType&& j, detail::identity_tag<Type> /*unused*/, detail::priority_tag<1> /*unused*/)
5361- -> detail::enable_if_t< detail::is_compatible_reference_type<BasicJsonType, ConstType>::value, ConstType>
5359+ typename ConstType = typename std::remove_reference<Type>::type const&,
5360+ detail::enable_if_t< detail::is_compatible_reference_type<BasicJsonType, ConstType>::value, int> = 0>
5361+ ConstType from_json_tuple_get_impl(BasicJsonType && j, detail::identity_tag<Type> /*unused*/, detail::priority_tag<1> /*unused*/)
53625362{
53635363 return std::forward<BasicJsonType>(j).template get_ref<ConstType>();
53645364}
53655365
5366- template<typename BasicJsonType, typename Type>
5367- auto from_json_tuple_get_impl(BasicJsonType&& j, detail::identity_tag<Type> /*unused*/, detail::priority_tag<2> /*unused*/)
5368- -> detail::enable_if_t< detail::is_compatible_reference_type<BasicJsonType, Type>::value, Type>
5366+ template<typename BasicJsonType, typename Type,
5367+ detail::enable_if_t< detail::is_compatible_reference_type<BasicJsonType, Type>::value, int> = 0>
5368+ Type from_json_tuple_get_impl(BasicJsonType && j, detail::identity_tag<Type> /*unused*/, detail::priority_tag<2> /*unused*/)
53695369{
53705370 return std::forward<BasicJsonType>(j).template get_ref<Type>();
53715371}
53725372
5373- template<typename BasicJsonType, typename Type>
5374- auto from_json_tuple_get_impl(BasicJsonType&& j, detail::identity_tag< Type> /*unused*/, detail::priority_tag<3> /*unused*/)
5375- -> detail::enable_if_t<std::is_integral<uncvref_t< Type>>::value , detail::uncvref_t<Type>>
5373+ template<typename BasicJsonType, typename Type,
5374+ detail::enable_if_t<std::is_arithmetic<uncvref_t< Type>>::value, int> = 0>
5375+ detail::uncvref_t<Type> from_json_tuple_get_impl(BasicJsonType && j, detail::identity_tag< Type> /*unused*/ , detail::priority_tag<3> /*unused*/)
53765376{
53775377 return std::forward<BasicJsonType>(j).template get<detail::uncvref_t<Type>>();
53785378}
53795379
53805380template<std::size_t PTagValue, typename BasicJsonType, typename... Types>
5381- using tuple_type = std::tuple< decltype(from_json_tuple_get_impl(std::declval<BasicJsonType>(), detail::identity_tag<Types>{}, detail::priority_tag<PTagValue>{}))...>;
5381+ using tuple_type = std::tuple < decltype(from_json_tuple_get_impl(std::declval<BasicJsonType>(), detail::identity_tag<Types> {}, detail::priority_tag<PTagValue> {}))... >;
53825382
53835383template<std::size_t PTagValue, typename... Args, typename BasicJsonType, std::size_t... Idx>
53845384tuple_type<PTagValue, BasicJsonType, Args...> from_json_tuple_impl_base(BasicJsonType&& j, index_sequence<Idx...> /*unused*/)
53855385{
5386- return tuple_type<PTagValue, BasicJsonType, Args...>(from_json_tuple_get_impl(std::forward<BasicJsonType>(j).at(Idx), detail::identity_tag<Args>{}, detail::priority_tag<PTagValue>{})...);
5386+ return tuple_type<PTagValue, BasicJsonType, Args...>(from_json_tuple_get_impl(std::forward<BasicJsonType>(j).at(Idx), detail::identity_tag<Args> {}, detail::priority_tag<PTagValue> {})...);
53875387}
53885388
53895389template<std::size_t PTagValue, typename BasicJsonType>
@@ -5409,7 +5409,7 @@ template<typename BasicJsonType, typename... Args>
54095409std::tuple<Args...> from_json_tuple_impl(BasicJsonType&& j, identity_tag<std::tuple<Args...>> /*unused*/, priority_tag<2> /*unused*/)
54105410{
54115411 static_assert(cxpr_and<cxpr_or<cxpr_not<std::is_reference<Args>>, is_compatible_reference_type<BasicJsonType, Args>>...>::value,
5412- "Can not return a tuple containing references to types not contained in a Json, try Json::get_to()");
5412+ "Can not return a tuple containing references to types not contained in a Json, try Json::get_to()");
54135413 return from_json_tuple_impl_base<2, Args...>(std::forward<BasicJsonType>(j), index_sequence_for<Args...> {});
54145414}
54155415
@@ -5531,7 +5531,7 @@ NLOHMANN_JSON_NAMESPACE_END
55315531
55325532
55335533// #include <nlohmann/detail/macro_scope.hpp>
5534- // JSON_HAS_CPP_17
5534+ // JSON_HAS_CPP_17
55355535#ifdef JSON_HAS_CPP_17
55365536 #include <optional> // optional
55375537#endif
@@ -20359,10 +20359,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
2035920359 const bool allow_exceptions = true,
2036020360 const bool ignore_comments = false,
2036120361 const bool ignore_trailing_commas = false
20362- )
20362+ )
2036320363 {
2036420364 return ::nlohmann::detail::parser<basic_json, InputAdapterType>(std::move(adapter),
20365- std::move(cb), allow_exceptions, ignore_comments, ignore_trailing_commas);
20365+ std::move(cb), allow_exceptions, ignore_comments, ignore_trailing_commas);
2036620366 }
2036720367
2036820368 private:
@@ -21060,8 +21060,8 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
2106021060 detail::enable_if_t <
2106121061 !detail::is_basic_json<U>::value && detail::is_compatible_type<basic_json_t, U>::value, int > = 0 >
2106221062 basic_json(CompatibleType && val) noexcept(noexcept( // NOLINT(bugprone-forwarding-reference-overload,bugprone-exception-escape)
21063- JSONSerializer<U>::to_json(std::declval<basic_json_t&>(),
21064- std::forward<CompatibleType>(val))))
21063+ JSONSerializer<U>::to_json(std::declval<basic_json_t&>(),
21064+ std::forward<CompatibleType>(val))))
2106521065 {
2106621066 JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val));
2106721067 set_parents();
@@ -21855,7 +21855,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
2185521855 detail::has_from_json<basic_json_t, ValueType>::value,
2185621856 int > = 0 >
2185721857 ValueType get_impl(detail::priority_tag<0> /*unused*/) const noexcept(noexcept(
21858- JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), std::declval<ValueType&>())))
21858+ JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), std::declval<ValueType&>())))
2185921859 {
2186021860 auto ret = ValueType();
2186121861 JSONSerializer<ValueType>::from_json(*this, ret);
@@ -21897,7 +21897,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
2189721897 detail::has_non_default_from_json<basic_json_t, ValueType>::value,
2189821898 int > = 0 >
2189921899 ValueType get_impl(detail::priority_tag<1> /*unused*/) const noexcept(noexcept(
21900- JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>())))
21900+ JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>())))
2190121901 {
2190221902 return JSONSerializer<ValueType>::from_json(*this);
2190321903 }
@@ -22047,7 +22047,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
2204722047 detail::has_from_json<basic_json_t, ValueType>::value,
2204822048 int > = 0 >
2204922049 ValueType & get_to(ValueType& v) const noexcept(noexcept(
22050- JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), v)))
22050+ JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), v)))
2205122051 {
2205222052 JSONSerializer<ValueType>::from_json(*this, v);
2205322053 return v;
0 commit comments