do not check for compatible_object_type in compatible_array_type

This commit is contained in:
Théo DELRIEU 2018-09-05 17:26:32 +02:00
parent 29f72966c3
commit 628f76729e
No known key found for this signature in database
GPG key ID: A5A505438C20539A
2 changed files with 12 additions and 8 deletions

View file

@ -249,8 +249,10 @@ void to_json(BasicJsonType& j, const std::vector<bool>& e)
}
template <typename BasicJsonType, typename CompatibleArrayType,
enable_if_t<is_compatible_array_type<BasicJsonType, CompatibleArrayType>::value or
std::is_same<typename BasicJsonType::array_t, CompatibleArrayType>::value,
enable_if_t<is_compatible_array_type<BasicJsonType,
CompatibleArrayType>::value and
not is_compatible_object_type<
BasicJsonType, CompatibleArrayType>::value,
int> = 0>
void to_json(BasicJsonType& j, const CompatibleArrayType& arr)
{

View file

@ -1770,8 +1770,10 @@ void to_json(BasicJsonType& j, const std::vector<bool>& e)
}
template <typename BasicJsonType, typename CompatibleArrayType,
enable_if_t<is_compatible_array_type<BasicJsonType, CompatibleArrayType>::value or
std::is_same<typename BasicJsonType::array_t, CompatibleArrayType>::value,
enable_if_t<is_compatible_array_type<BasicJsonType,
CompatibleArrayType>::value and
not is_compatible_object_type<
BasicJsonType, CompatibleArrayType>::value,
int> = 0>
void to_json(BasicJsonType& j, const CompatibleArrayType& arr)
{