1
0
mirror of https://github.com/nlohmann/json.git synced 2026-07-21 19:23:03 +04:00

Re-add value_type detection to distinguish string types (#3604)

* Re-add value_type detection to is_constructible_string_type trait

* Add value_type detection to from_json for strings
This commit is contained in:
Florian Albrechtskirchinger
2022-07-28 21:52:23 +02:00
committed by GitHub
parent a714381a5f
commit a87c1885cb
3 changed files with 10 additions and 4 deletions
@@ -117,6 +117,7 @@ template <
typename BasicJsonType, typename StringType,
enable_if_t <
std::is_assignable<StringType&, const typename BasicJsonType::string_t>::value
&& is_detected_exact<typename BasicJsonType::string_t::value_type, value_type_t, StringType>::value
&& !std::is_same<typename BasicJsonType::string_t, StringType>::value
&& !is_json_ref<StringType>::value, int > = 0 >
inline void from_json(const BasicJsonType& j, StringType& s)