Add the amalgamated files
This commit is contained in:
parent
56f17665f1
commit
f26bec833c
@ -325,9 +325,9 @@ inline void from_json(const BasicJsonType& j, typename BasicJsonType::binary_t&
|
|||||||
bin = *j.template get_ptr<const typename BasicJsonType::binary_t*>();
|
bin = *j.template get_ptr<const typename BasicJsonType::binary_t*>();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename BasicJsonType, typename ConstructibleObjectType,
|
template < typename BasicJsonType, typename ConstructibleObjectType,
|
||||||
enable_if_t<is_constructible_object_type<BasicJsonType, ConstructibleObjectType>::value&&
|
enable_if_t < is_constructible_object_type<BasicJsonType, ConstructibleObjectType>::value&&
|
||||||
!std::is_enum<typename ConstructibleObjectType::key_type>::value, int> = 0>
|
!std::is_enum<typename ConstructibleObjectType::key_type>::value, int > = 0 >
|
||||||
inline void from_json(const BasicJsonType& j, ConstructibleObjectType& obj)
|
inline void from_json(const BasicJsonType& j, ConstructibleObjectType& obj)
|
||||||
{
|
{
|
||||||
if (JSON_HEDLEY_UNLIKELY(!j.is_object()))
|
if (JSON_HEDLEY_UNLIKELY(!j.is_object()))
|
||||||
@ -348,10 +348,10 @@ inline void from_json(const BasicJsonType& j, ConstructibleObjectType& obj)
|
|||||||
obj = std::move(ret);
|
obj = std::move(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename BasicJsonType, typename Key, typename Value, typename Compare, typename Allocator,
|
template < typename BasicJsonType, typename Key, typename Value, typename Compare, typename Allocator,
|
||||||
enable_if_t<is_constructible_object_type<BasicJsonType, std::map<Key, Value, Compare, Allocator>>::value&&
|
enable_if_t < is_constructible_object_type<BasicJsonType, std::map<Key, Value, Compare, Allocator>>::value&&
|
||||||
is_compatible_object_type<BasicJsonType, std::map<Key, Value, Compare, Allocator>>::value&&
|
is_compatible_object_type<BasicJsonType, std::map<Key, Value, Compare, Allocator>>::value&&
|
||||||
std::is_enum<Key>::value, int> = 0>
|
std::is_enum<Key>::value, int > = 0 >
|
||||||
inline void from_json(const BasicJsonType& j, std::map<Key, Value, Compare, Allocator>& m)
|
inline void from_json(const BasicJsonType& j, std::map<Key, Value, Compare, Allocator>& m)
|
||||||
{
|
{
|
||||||
if (JSON_HEDLEY_UNLIKELY(!j.is_object()))
|
if (JSON_HEDLEY_UNLIKELY(!j.is_object()))
|
||||||
@ -361,7 +361,7 @@ inline void from_json(const BasicJsonType& j, std::map<Key, Value, Compare, Allo
|
|||||||
m.clear();
|
m.clear();
|
||||||
for (const auto& p : j.items())
|
for (const auto& p : j.items())
|
||||||
{
|
{
|
||||||
m.emplace(string_to_enum(json(p.key()),Key()), p.value().template get<Value>());
|
m.emplace(string_to_enum(json(p.key()), Key()), p.value().template get<Value>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -459,7 +459,7 @@ auto from_json(BasicJsonType&& j, TupleRelated&& t)
|
|||||||
template < typename BasicJsonType, typename Key, typename Value, typename Compare, typename Allocator,
|
template < typename BasicJsonType, typename Key, typename Value, typename Compare, typename Allocator,
|
||||||
typename = enable_if_t < !std::is_constructible <
|
typename = enable_if_t < !std::is_constructible <
|
||||||
typename BasicJsonType::string_t, Key >::value &&
|
typename BasicJsonType::string_t, Key >::value &&
|
||||||
!is_compatible_object_type<BasicJsonType, std::map<Key, Value, Compare, Allocator>>::value>>
|
!is_compatible_object_type<BasicJsonType, std::map<Key, Value, Compare, Allocator>>::value >>
|
||||||
inline void from_json(const BasicJsonType& j, std::map<Key, Value, Compare, Allocator>& m)
|
inline void from_json(const BasicJsonType& j, std::map<Key, Value, Compare, Allocator>& m)
|
||||||
{
|
{
|
||||||
if (JSON_HEDLEY_UNLIKELY(!j.is_array()))
|
if (JSON_HEDLEY_UNLIKELY(!j.is_array()))
|
||||||
|
|||||||
@ -5776,7 +5776,8 @@ struct external_constructor<value_t::object>
|
|||||||
|
|
||||||
template < typename BasicJsonType, typename CompatibleObjectType,
|
template < typename BasicJsonType, typename CompatibleObjectType,
|
||||||
enable_if_t < !std::is_same<CompatibleObjectType, typename BasicJsonType::object_t>::value&&
|
enable_if_t < !std::is_same<CompatibleObjectType, typename BasicJsonType::object_t>::value&&
|
||||||
is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value&& !is_basic_json<CompatibleObjectType>::value&&
|
is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value&&
|
||||||
|
!is_basic_json<CompatibleObjectType>::value&&
|
||||||
!std::is_enum<typename CompatibleObjectType::key_type>::value, int > = 0 >
|
!std::is_enum<typename CompatibleObjectType::key_type>::value, int > = 0 >
|
||||||
static void construct(BasicJsonType& j, const CompatibleObjectType& obj)
|
static void construct(BasicJsonType& j, const CompatibleObjectType& obj)
|
||||||
{
|
{
|
||||||
@ -5915,7 +5916,8 @@ inline void to_json(BasicJsonType& j, typename BasicJsonType::array_t&& arr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template < typename BasicJsonType, typename CompatibleObjectType,
|
template < typename BasicJsonType, typename CompatibleObjectType,
|
||||||
enable_if_t < is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value&& !is_basic_json<CompatibleObjectType>::value&&
|
enable_if_t < is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value&&
|
||||||
|
!is_basic_json<CompatibleObjectType>::value&&
|
||||||
!std::is_enum<typename CompatibleObjectType::key_type>::value, int > = 0 >
|
!std::is_enum<typename CompatibleObjectType::key_type>::value, int > = 0 >
|
||||||
inline void to_json(BasicJsonType& j, const CompatibleObjectType& obj)
|
inline void to_json(BasicJsonType& j, const CompatibleObjectType& obj)
|
||||||
{
|
{
|
||||||
@ -5923,8 +5925,8 @@ inline void to_json(BasicJsonType& j, const CompatibleObjectType& obj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template < typename BasicJsonType, typename Key, typename Value,
|
template < typename BasicJsonType, typename Key, typename Value,
|
||||||
enable_if_t < (is_compatible_object_type<BasicJsonType, std::map<Key, Value>>::value)&&
|
enable_if_t < is_compatible_object_type<BasicJsonType, std::map<Key, Value>>::value&&
|
||||||
(!is_basic_json<std::map<Key, Value>>::value)&&
|
!is_basic_json<std::map<Key, Value>>::value&&
|
||||||
std::is_enum<Key>::value, int > = 0 >
|
std::is_enum<Key>::value, int > = 0 >
|
||||||
inline void to_json(BasicJsonType& j, const std::map<Key, Value>& obj)
|
inline void to_json(BasicJsonType& j, const std::map<Key, Value>& obj)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user