diff --git a/include/boost/unordered/unordered_map.hpp b/include/boost/unordered/unordered_map.hpp index c9fd46d2..82cb7f80 100644 --- a/include/boost/unordered/unordered_map.hpp +++ b/include/boost/unordered/unordered_map.hpp @@ -1477,6 +1477,32 @@ namespace boost { std::pair equal_range( const key_type&) const; + template + typename boost::enable_if_c::value, + std::pair >::type + equal_range(const Key& key) + { + node_pointer p = table_.find_node_impl( + table::policy::apply_hash(this->hash_function(), key), key, + this->key_eq()); + + return std::make_pair( + iterator(p), iterator(p ? table_.next_group(p) : p)); + } + + template + typename boost::enable_if_c::value, + std::pair >::type + equal_range(const Key& key) const + { + node_pointer p = table_.find_node_impl( + table::policy::apply_hash(this->hash_function(), key), key, + this->key_eq()); + + return std::make_pair( + const_iterator(p), const_iterator(p ? table_.next_group(p) : p)); + } + // bucket interface size_type bucket_count() const BOOST_NOEXCEPT