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:
committed by
GitHub
parent
a714381a5f
commit
a87c1885cb
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user