Amalgamated
This commit is contained in:
parent
63152c59aa
commit
f11c36642e
@ -262,8 +262,8 @@ template < typename BasicJsonType, typename ConstructibleArrayType,
|
|||||||
int > = 0 >
|
int > = 0 >
|
||||||
auto from_json(const BasicJsonType& j, ConstructibleArrayType& arr)
|
auto from_json(const BasicJsonType& j, ConstructibleArrayType& arr)
|
||||||
-> decltype(from_json_array_impl(j, arr, priority_tag<3> {}),
|
-> decltype(from_json_array_impl(j, arr, priority_tag<3> {}),
|
||||||
j.template get<typename ConstructibleArrayType::value_type>(),
|
j.template get<typename ConstructibleArrayType::value_type>(),
|
||||||
void())
|
void())
|
||||||
{
|
{
|
||||||
if (JSON_HEDLEY_UNLIKELY(!j.is_array()))
|
if (JSON_HEDLEY_UNLIKELY(!j.is_array()))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -417,7 +417,7 @@ is_detected<range_value_t, ConstructibleArrayType>::value&&
|
|||||||
!std::is_same<ConstructibleArrayType, detected_t<range_value_t, ConstructibleArrayType>>::value&&
|
!std::is_same<ConstructibleArrayType, detected_t<range_value_t, ConstructibleArrayType>>::value&&
|
||||||
is_complete_type <
|
is_complete_type <
|
||||||
detected_t<range_value_t, ConstructibleArrayType >>::value >>
|
detected_t<range_value_t, ConstructibleArrayType >>::value >>
|
||||||
{
|
{
|
||||||
using value_type = range_value_t<ConstructibleArrayType>;
|
using value_type = range_value_t<ConstructibleArrayType>;
|
||||||
|
|
||||||
static constexpr bool value =
|
static constexpr bool value =
|
||||||
@ -428,7 +428,7 @@ is_detected<range_value_t, ConstructibleArrayType>::value&&
|
|||||||
has_non_default_from_json <
|
has_non_default_from_json <
|
||||||
BasicJsonType,
|
BasicJsonType,
|
||||||
value_type >::value;
|
value_type >::value;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename BasicJsonType, typename ConstructibleArrayType>
|
template<typename BasicJsonType, typename ConstructibleArrayType>
|
||||||
struct is_constructible_array_type
|
struct is_constructible_array_type
|
||||||
@ -511,7 +511,7 @@ template<typename Compare, typename A, typename B>
|
|||||||
struct is_comparable<Compare, A, B, void_t<
|
struct is_comparable<Compare, A, B, void_t<
|
||||||
decltype(std::declval<Compare>()(std::declval<A>(), std::declval<B>())),
|
decltype(std::declval<Compare>()(std::declval<A>(), std::declval<B>())),
|
||||||
decltype(std::declval<Compare>()(std::declval<B>(), std::declval<A>()))
|
decltype(std::declval<Compare>()(std::declval<B>(), std::declval<A>()))
|
||||||
>> : std::true_type {};
|
>> : std::true_type {};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
using detect_is_transparent = typename T::is_transparent;
|
using detect_is_transparent = typename T::is_transparent;
|
||||||
|
|||||||
@ -579,7 +579,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
stack.reserve(object->size());
|
stack.reserve(object->size());
|
||||||
for (auto&& it : *object)
|
for (auto && it : *object)
|
||||||
{
|
{
|
||||||
stack.push_back(std::move(it.second));
|
stack.push_back(std::move(it.second));
|
||||||
}
|
}
|
||||||
@ -601,7 +601,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
}
|
}
|
||||||
else if (current_item.is_object())
|
else if (current_item.is_object())
|
||||||
{
|
{
|
||||||
for (auto&& it : *current_item.m_data.m_value.object)
|
for (auto && it : *current_item.m_data.m_value.object)
|
||||||
{
|
{
|
||||||
stack.push_back(std::move(it.second));
|
stack.push_back(std::move(it.second));
|
||||||
}
|
}
|
||||||
@ -5218,14 +5218,14 @@ struct less< ::nlohmann::detail::value_t> // do not remove the space after '<',
|
|||||||
*/
|
*/
|
||||||
bool operator()(::nlohmann::detail::value_t lhs,
|
bool operator()(::nlohmann::detail::value_t lhs,
|
||||||
::nlohmann::detail::value_t rhs) const noexcept
|
::nlohmann::detail::value_t rhs) const noexcept
|
||||||
{
|
{
|
||||||
#if JSON_HAS_THREE_WAY_COMPARISON
|
#if JSON_HAS_THREE_WAY_COMPARISON
|
||||||
return std::is_lt(lhs <=> rhs); // *NOPAD*
|
return std::is_lt(lhs <=> rhs); // *NOPAD*
|
||||||
#else
|
#else
|
||||||
return ::nlohmann::detail::operator<(lhs, rhs);
|
return ::nlohmann::detail::operator<(lhs, rhs);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// C++20 prohibit function specialization in the std namespace.
|
// C++20 prohibit function specialization in the std namespace.
|
||||||
#ifndef JSON_HAS_CPP_20
|
#ifndef JSON_HAS_CPP_20
|
||||||
|
|||||||
@ -3817,7 +3817,7 @@ is_detected<range_value_t, ConstructibleArrayType>::value&&
|
|||||||
!std::is_same<ConstructibleArrayType, detected_t<range_value_t, ConstructibleArrayType>>::value&&
|
!std::is_same<ConstructibleArrayType, detected_t<range_value_t, ConstructibleArrayType>>::value&&
|
||||||
is_complete_type <
|
is_complete_type <
|
||||||
detected_t<range_value_t, ConstructibleArrayType >>::value >>
|
detected_t<range_value_t, ConstructibleArrayType >>::value >>
|
||||||
{
|
{
|
||||||
using value_type = range_value_t<ConstructibleArrayType>;
|
using value_type = range_value_t<ConstructibleArrayType>;
|
||||||
|
|
||||||
static constexpr bool value =
|
static constexpr bool value =
|
||||||
@ -3828,7 +3828,7 @@ is_detected<range_value_t, ConstructibleArrayType>::value&&
|
|||||||
has_non_default_from_json <
|
has_non_default_from_json <
|
||||||
BasicJsonType,
|
BasicJsonType,
|
||||||
value_type >::value;
|
value_type >::value;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename BasicJsonType, typename ConstructibleArrayType>
|
template<typename BasicJsonType, typename ConstructibleArrayType>
|
||||||
struct is_constructible_array_type
|
struct is_constructible_array_type
|
||||||
@ -3911,7 +3911,7 @@ template<typename Compare, typename A, typename B>
|
|||||||
struct is_comparable<Compare, A, B, void_t<
|
struct is_comparable<Compare, A, B, void_t<
|
||||||
decltype(std::declval<Compare>()(std::declval<A>(), std::declval<B>())),
|
decltype(std::declval<Compare>()(std::declval<A>(), std::declval<B>())),
|
||||||
decltype(std::declval<Compare>()(std::declval<B>(), std::declval<A>()))
|
decltype(std::declval<Compare>()(std::declval<B>(), std::declval<A>()))
|
||||||
>> : std::true_type {};
|
>> : std::true_type {};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
using detect_is_transparent = typename T::is_transparent;
|
using detect_is_transparent = typename T::is_transparent;
|
||||||
@ -4822,8 +4822,8 @@ template < typename BasicJsonType, typename ConstructibleArrayType,
|
|||||||
int > = 0 >
|
int > = 0 >
|
||||||
auto from_json(const BasicJsonType& j, ConstructibleArrayType& arr)
|
auto from_json(const BasicJsonType& j, ConstructibleArrayType& arr)
|
||||||
-> decltype(from_json_array_impl(j, arr, priority_tag<3> {}),
|
-> decltype(from_json_array_impl(j, arr, priority_tag<3> {}),
|
||||||
j.template get<typename ConstructibleArrayType::value_type>(),
|
j.template get<typename ConstructibleArrayType::value_type>(),
|
||||||
void())
|
void())
|
||||||
{
|
{
|
||||||
if (JSON_HEDLEY_UNLIKELY(!j.is_array()))
|
if (JSON_HEDLEY_UNLIKELY(!j.is_array()))
|
||||||
{
|
{
|
||||||
@ -19799,7 +19799,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
stack.reserve(object->size());
|
stack.reserve(object->size());
|
||||||
for (auto&& it : *object)
|
for (auto && it : *object)
|
||||||
{
|
{
|
||||||
stack.push_back(std::move(it.second));
|
stack.push_back(std::move(it.second));
|
||||||
}
|
}
|
||||||
@ -19821,7 +19821,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
}
|
}
|
||||||
else if (current_item.is_object())
|
else if (current_item.is_object())
|
||||||
{
|
{
|
||||||
for (auto&& it : *current_item.m_data.m_value.object)
|
for (auto && it : *current_item.m_data.m_value.object)
|
||||||
{
|
{
|
||||||
stack.push_back(std::move(it.second));
|
stack.push_back(std::move(it.second));
|
||||||
}
|
}
|
||||||
@ -24438,14 +24438,14 @@ struct less< ::nlohmann::detail::value_t> // do not remove the space after '<',
|
|||||||
*/
|
*/
|
||||||
bool operator()(::nlohmann::detail::value_t lhs,
|
bool operator()(::nlohmann::detail::value_t lhs,
|
||||||
::nlohmann::detail::value_t rhs) const noexcept
|
::nlohmann::detail::value_t rhs) const noexcept
|
||||||
{
|
{
|
||||||
#if JSON_HAS_THREE_WAY_COMPARISON
|
#if JSON_HAS_THREE_WAY_COMPARISON
|
||||||
return std::is_lt(lhs <=> rhs); // *NOPAD*
|
return std::is_lt(lhs <=> rhs); // *NOPAD*
|
||||||
#else
|
#else
|
||||||
return ::nlohmann::detail::operator<(lhs, rhs);
|
return ::nlohmann::detail::operator<(lhs, rhs);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// C++20 prohibit function specialization in the std namespace.
|
// C++20 prohibit function specialization in the std namespace.
|
||||||
#ifndef JSON_HAS_CPP_20
|
#ifndef JSON_HAS_CPP_20
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user