🐛 add missing overload

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2026-05-15 10:01:38 +02:00
parent 630beaeb05
commit 53437add14
3 changed files with 35 additions and 0 deletions
+14
View File
@@ -340,6 +340,20 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
return Container::end();
}
template<class KeyType, detail::enable_if_t<
detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>
const_iterator find(KeyType && key) const
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it;
}
}
return Container::end();
}
std::pair<iterator, bool> insert( value_type&& value )
{
return emplace(value.first, std::move(value.second));