diff --git a/src/json.hpp b/src/json.hpp index 34d3cb20..2ab6efd9 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -183,19 +183,20 @@ template struct is_compatible_object_type_impl { static constexpr auto value = - std::is_constructible::value and - std::is_constructible::value; + std::is_constructible::value and + std::is_constructible::value; }; template struct is_compatible_object_type { static auto constexpr value = is_compatible_object_type_impl< - conjunction>, - has_mapped_type, - has_key_type>::value, - RealType, CompatibleObjectType>::value; - + conjunction>, + has_mapped_type, + has_key_type>::value, + RealType, CompatibleObjectType>::value; }; template @@ -205,28 +206,34 @@ template struct is_compatible_array_type_impl { 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; - + 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; }; template struct is_compatible_array_type { - static auto constexpr value = disjunction, - is_compatible_array_type_impl< - conjunction>, - negation>, - has_value_type, - has_iterator>::value, - BasicJson, CompatibleArrayType>>::value; + static auto constexpr value = disjunction< + std::is_same, + is_compatible_array_type_impl< + conjunction>, + negation>, + has_value_type, + has_iterator>::value, + BasicJson, CompatibleArrayType>>::value; }; template @@ -235,15 +242,19 @@ struct is_compatible_integer_type_impl : std::false_type{}; template struct is_compatible_integer_type_impl { - static constexpr auto value = std::is_constructible::value and - std::numeric_limits::is_integer and - std::numeric_limits::is_signed; + static constexpr auto value = + std::is_constructible::value and + std::numeric_limits::is_integer and + std::numeric_limits::is_signed; }; template struct is_compatible_integer_type { - static constexpr auto value = is_compatible_integer_type_impl::value, RealIntegerType, CompatibleNumberIntegerType>::value; + static constexpr auto value = is_compatible_integer_type_impl< + std::is_arithmetic::value, RealIntegerType, + CompatibleNumberIntegerType>::value; }; template @@ -252,37 +263,43 @@ struct is_compatible_unsigned_integer_type_impl : std::false_type{}; template struct is_compatible_unsigned_integer_type_impl { - static constexpr auto value = std::is_constructible::value and - std::numeric_limits::is_integer and - not std::numeric_limits::is_signed; + static constexpr auto value = + std::is_constructible::value and + std::numeric_limits::is_integer and + not std::numeric_limits::is_signed; }; template struct is_compatible_unsigned_integer_type { - static constexpr auto value = is_compatible_unsigned_integer_type_impl::value, RealUnsignedType, CompatibleNumberUnsignedType>::value; + static constexpr auto value = is_compatible_unsigned_integer_type_impl< + std::is_arithmetic::value, RealUnsignedType, + CompatibleNumberUnsignedType>::value; }; template struct is_compatible_float_type { - static constexpr auto value = std::is_constructible::value and - std::is_floating_point::value; + static constexpr auto value = + std::is_constructible::value and + std::is_floating_point::value; }; template struct is_compatible_basic_json_type { - static auto constexpr value = - - std::is_same::value or - std::is_constructible::value or - std::is_same::value or - is_compatible_array_type::value or - is_compatible_object_type::value or - is_compatible_float_type::value or - is_compatible_integer_type::value or - is_compatible_unsigned_integer_type::value; + static auto constexpr value = + std::is_same::value or + std::is_constructible::value or + std::is_same::value or + is_compatible_array_type::value or + is_compatible_object_type::value or + is_compatible_float_type::value or + is_compatible_integer_type::value or + is_compatible_unsigned_integer_type::value; }; template