Skip to content

Commit

Permalink
Re-add value_type detection to is_constructible_string_type trait
Browse files Browse the repository at this point in the history
  • Loading branch information
falbrechtskirchinger committed Jul 23, 2022
1 parent e91686c commit 372a47a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions include/nlohmann/detail/meta/type_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,10 @@ struct is_constructible_string_type
#endif

static constexpr auto value =
is_constructible<laundered_type,
typename BasicJsonType::string_t>::value;
conjunction <
is_constructible<laundered_type, typename BasicJsonType::string_t>,
is_detected_exact<typename BasicJsonType::string_t::value_type,
value_type_t, laundered_type >>::value;
};

template<typename BasicJsonType, typename CompatibleArrayType, typename = void>
Expand Down
6 changes: 4 additions & 2 deletions single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3651,8 +3651,10 @@ struct is_constructible_string_type
#endif

static constexpr auto value =
is_constructible<laundered_type,
typename BasicJsonType::string_t>::value;
conjunction <
is_constructible<laundered_type, typename BasicJsonType::string_t>,
is_detected_exact<typename BasicJsonType::string_t::value_type,
value_type_t, laundered_type >>::value;
};

template<typename BasicJsonType, typename CompatibleArrayType, typename = void>
Expand Down

0 comments on commit 372a47a

Please sign in to comment.