diff --git a/src/json.hpp b/src/json.hpp index ff58df20..2265457f 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -512,7 +512,7 @@ class basic_json /// workaround type for MSVC using basic_json_t = basic_json; + AllocatorType, JSONSerializer>; public: // forward declarations @@ -1565,15 +1565,19 @@ class basic_json } // constructor chosen when JSONSerializer::to_json exists for type T - template >::value and not (detail::is_compatible_object_type>::value or - detail::is_compatible_array_type>::value or - detail::is_compatible_float_type>::value or - detail::is_compatible_integer_type>::value or - detail::is_compatible_unsigned_integer_type>::value or - std::is_constructible>::value or - std::is_base_of>::value or - std::is_same>::value), int> = 0> + template , basic_json_t>>, +detail::negation>, + detail::is_compatible_object_type>, + detail::is_compatible_float_type>, + detail::is_compatible_integer_type>, + detail::is_compatible_unsigned_integer_type>, + std::is_constructible>, + std::is_base_of>, + std::is_same>>>, + detail::has_to_json< + JSONSerializer, basic_json, uncvref_t> +>::value, int> = 0> explicit basic_json(T &&val) { JSONSerializer>::to_json(*this, std::forward(val));