From 47bc4021130e66dd235de387e10081259489623b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Delrieu?= Date: Tue, 22 Nov 2016 13:27:00 +0100 Subject: [PATCH] only use conjunction & co when needed to avoid MSVC crashing --- src/json.hpp | 69 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 29 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index 0c477a0d2..34d3cb202 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -205,25 +205,28 @@ template struct is_compatible_array_type_impl { static constexpr auto value = - conjunction< - negation, - std::is_same, - std::is_same, - std::is_same, - std::is_same, - std::is_same>>, - std::is_constructible>::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 = is_compatible_array_type_impl< - conjunction>, - has_value_type, - has_iterator>::value, BasicJson, CompatibleArrayType>::value; + static auto constexpr value = disjunction, + is_compatible_array_type_impl< + conjunction>, + negation>, + has_value_type, + has_iterator>::value, + BasicJson, CompatibleArrayType>>::value; }; template @@ -270,14 +273,16 @@ struct is_compatible_float_type template struct is_compatible_basic_json_type { - static auto constexpr value = disjunction< - is_compatible_array_type, - is_compatible_object_type, - is_compatible_float_type, - is_compatible_integer_type, - is_compatible_unsigned_integer_type, - std::is_constructible, - std::is_same>::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