Expand calls to count and equal_range implementation

This commit is contained in:
Daniel James
2017-04-23 10:09:18 +01:00
parent 25b0b66e52
commit 13ff1e7fb1
3 changed files with 24 additions and 37 deletions
@@ -3771,11 +3771,6 @@ struct table_unique : boost::unordered::detail::table<Types>
// Accessors
std::size_t count(const_key_type& k) const
{
return this->find_node(k) ? 1 : 0;
}
value_type& at(const_key_type& k) const
{
if (this->size_) {
@@ -3788,13 +3783,6 @@ struct table_unique : boost::unordered::detail::table<Types>
std::out_of_range("Unable to find key in unordered_map."));
}
std::pair<iterator, iterator> equal_range(const_key_type& k) const
{
node_pointer n = this->find_node(k);
return std::make_pair(
iterator(n), iterator(n ? node_algo::next_node(n) : n));
}
// equals
bool equals(table_unique const& other) const
@@ -4493,21 +4481,6 @@ struct table_equiv : boost::unordered::detail::table<Types>
this->move_init(x);
}
// Accessors
std::size_t count(const_key_type& k) const
{
node_pointer n = this->find_node(k);
return n ? node_algo::count(n, this) : 0;
}
std::pair<iterator, iterator> equal_range(const_key_type& k) const
{
node_pointer n = this->find_node(k);
return std::make_pair(
iterator(n), iterator(n ? node_algo::next_group(n, this) : n));
}
// Equality
bool equals(table_equiv const& other) const