diff --git a/src/json.hpp b/src/json.hpp index fd27d83f..4435102e 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -398,40 +398,30 @@ struct is_compatible_object_type typename BasicJson::object_t, CompatibleObjectType>::value; }; -template -struct is_compatible_array_type_impl : std::false_type {}; - -template -struct is_compatible_array_type_impl +template +struct is_basic_json_nested_type { - static constexpr auto value = - not std::is_same::value and - not std::is_same::value and - not std::is_same::value and - not std::is_same::value and - not std::is_same::value and - not std::is_same::value; + static auto constexpr value = std::is_same::value or + std::is_same::value or + std::is_same::value or + std::is_same::value or + std::is_same::value; }; template struct is_compatible_array_type { - // the check for CompatibleArrayType = void is done in - // `is_compatible_object_type`, but we need the conjunction here as well - static auto constexpr value = is_compatible_array_type_impl< - conjunction>, + negation>, negation>, + negation>, has_value_type, - has_iterator>::value, - BasicJson, CompatibleArrayType>::value; + has_iterator>::value; }; template @@ -461,16 +451,6 @@ struct is_compatible_integer_type RealIntegerType, CompatibleNumberIntegerType > ::value; }; -template -struct is_basic_json_nested_type -{ - static auto constexpr value = std::is_same::value or - std::is_same::value or - std::is_same::value or - std::is_same::value or - std::is_same::value; -}; - // This trait checks if JSONSerializer::from_json(json const&, udt&) exists template