Implement heterogeneous find() for multimap

This commit is contained in:
Christian Mazakas
2021-12-15 14:15:07 -08:00
parent 54d36f89ea
commit 9945ce7583

View File

@ -1448,6 +1448,28 @@ namespace boost {
iterator find(const key_type&);
const_iterator find(const key_type&) const;
template <class Key>
typename boost::enable_if_c<detail::is_transparent<Key, H>::value &&
detail::is_transparent<Key, P>::value,
iterator>::type
find(const Key& key)
{
return iterator(table_.find_node_impl(
table::policy::apply_hash(this->hash_function(), key), key,
this->key_eq()));
}
template <class Key>
typename boost::enable_if_c<detail::is_transparent<Key, H>::value &&
detail::is_transparent<Key, P>::value,
const_iterator>::type
find(const Key& key) const
{
return const_iterator(table_.find_node_impl(
table::policy::apply_hash(this->hash_function(), key), key,
this->key_eq()));
}
template <class CompatibleKey, class CompatibleHash,
class CompatiblePredicate>
iterator find(CompatibleKey const&, CompatibleHash const&,