👌 apply review comments

This commit is contained in:
Niels Lohmann 2021-05-04 12:47:20 +02:00
parent aaef7cd2f8
commit b27938aca3
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 8 additions and 0 deletions

View File

@ -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 > ... >
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));
#endif
}
/*!

View File

@ -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 > ... >
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));
#endif
}
/*!