diff --git a/include/nlohmann/detail/meta/type_traits.hpp b/include/nlohmann/detail/meta/type_traits.hpp index 0901b71bb..cc3483122 100644 --- a/include/nlohmann/detail/meta/type_traits.hpp +++ b/include/nlohmann/detail/meta/type_traits.hpp @@ -183,7 +183,7 @@ template struct conjunction : std::true_type { }; template struct conjunction : B { }; template struct conjunction -: std::conditional, B>::type {}; +: std::conditional(B::value), conjunction, B>::type {}; // https://en.cppreference.com/w/cpp/types/negation template struct negation : std::integral_constant < bool, !B::value > { }; diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 3dcd48027..c5fd3fd0b 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -3374,7 +3374,7 @@ template struct conjunction : std::true_type { }; template struct conjunction : B { }; template struct conjunction -: std::conditional, B>::type {}; +: std::conditional(B::value), conjunction, B>::type {}; // https://en.cppreference.com/w/cpp/types/negation template struct negation : std::integral_constant < bool, !B::value > { };