diff --git a/include/boost/unordered/unordered_set.hpp b/include/boost/unordered/unordered_set.hpp index 4f691125..81f6e2f4 100644 --- a/include/boost/unordered/unordered_set.hpp +++ b/include/boost/unordered/unordered_set.hpp @@ -500,6 +500,18 @@ namespace boost { size_type count(const key_type&) const; + template + typename boost::enable_if_c::value, + size_type>::type + count(const Key& k) const + { + node_pointer n = table_.find_node_impl( + table::policy::apply_hash(this->hash_function(), k), k, + this->key_eq()); + + return n ? 1 : 0; + } + std::pair equal_range( const key_type&) const;