From 372a47a7fabfa342a6e30345550b966e42370200 Mon Sep 17 00:00:00 2001 From: Florian Albrechtskirchinger Date: Sat, 23 Jul 2022 22:09:51 +0200 Subject: [PATCH] Re-add value_type detection to is_constructible_string_type trait --- include/nlohmann/detail/meta/type_traits.hpp | 6 ++++-- single_include/nlohmann/json.hpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/nlohmann/detail/meta/type_traits.hpp b/include/nlohmann/detail/meta/type_traits.hpp index 11bf3c12a..796d5b0cd 100644 --- a/include/nlohmann/detail/meta/type_traits.hpp +++ b/include/nlohmann/detail/meta/type_traits.hpp @@ -363,8 +363,10 @@ struct is_constructible_string_type #endif static constexpr auto value = - is_constructible::value; + conjunction < + is_constructible, + is_detected_exact>::value; }; template diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index dd9c39fb5..859fdd552 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -3651,8 +3651,10 @@ struct is_constructible_string_type #endif static constexpr auto value = - is_constructible::value; + conjunction < + is_constructible, + is_detected_exact>::value; }; template