⚗️ add forgotten forward

This commit is contained in:
Niels Lohmann 2021-03-30 10:46:00 +02:00
parent 418fdbab62
commit 02b36e928f
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 2 additions and 2 deletions

View File

@ -4267,7 +4267,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()), *this));
}
const auto it = m_value.object->find(key);
const auto it = m_value.object->find(std::forward<KeyT>(key));
if (it != m_value.object->end())
{
m_value.object->erase(it);

View File

@ -21170,7 +21170,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()), *this));
}
const auto it = m_value.object->find(key);
const auto it = m_value.object->find(std::forward<KeyT>(key));
if (it != m_value.object->end())
{
m_value.object->erase(it);