Add transparent impl of erase()

This commit is contained in:
Christian Mazakas
2023-03-30 12:41:31 -07:00
parent af4cdf8fab
commit 53e20a2a1b
2 changed files with 55 additions and 2 deletions

View File

@@ -216,6 +216,14 @@ namespace boost {
size_type erase(key_type const& k) { return table_.erase(k); }
template <class K>
typename std::enable_if<
detail::are_transparent<K, hasher, key_equal>::value, size_type>::type
erase(K&& k)
{
return table_.erase(std::forward<K>(k));
}
/// Hash Policy
///
void rehash(size_type n) { table_.rehash(n); }