👌 apply review comments

parent aaef7cd2
...@@ -3860,7 +3860,11 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec ...@@ -3860,7 +3860,11 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
detail::is_usable_as_key_type<basic_json_t, KeyType>::value > ... > detail::is_usable_as_key_type<basic_json_t, KeyType>::value > ... >
string_t value(const KeyType& key, const char* default_value) const string_t value(const KeyType& key, const char* default_value) const
{ {
#ifdef JSON_HAS_CPP_17
return value(key, std::string_view(default_value));
#else
return value(key, string_t(default_value)); return value(key, string_t(default_value));
#endif
} }
/*! /*!
......
...@@ -20907,7 +20907,11 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec ...@@ -20907,7 +20907,11 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
detail::is_usable_as_key_type<basic_json_t, KeyType>::value > ... > detail::is_usable_as_key_type<basic_json_t, KeyType>::value > ... >
string_t value(const KeyType& key, const char* default_value) const string_t value(const KeyType& key, const char* default_value) const
{ {
#ifdef JSON_HAS_CPP_17
return value(key, std::string_view(default_value));
#else
return value(key, string_t(default_value)); return value(key, string_t(default_value));
#endif
} }
/*! /*!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment