Implement an alternative erase function that doesn't return an iterator.

Ref #3693

[SVN r58403]
This commit is contained in:
Daniel James committed 2009-12-15 22:52:52 +00:00
1 parent 2f0a94bcfd
commit 4e6292b439
7 files changed
+210 -6

No files matched your search

+11 -1
View File
@@ -652,10 +652,20 @@ namespace boost { namespace unordered_detail {
return *it ? this->erase_group(it, bucket) : 0;
}
template <class T>
void hash_table<T>::erase(iterator_base r)
{
BOOST_ASSERT(r.node_);
--this->size_;
node::unlink_node(*r.bucket_, r.node_);
this->delete_node(r.node_);
// r has been invalidated but its bucket is still valid
this->recompute_begin_bucket(r.bucket_);
}
template <class T>
BOOST_DEDUCED_TYPENAME T::iterator_base
hash_table<T>::erase(iterator_base r)
hash_table<T>::erase_return_iterator(iterator_base r)
{
BOOST_ASSERT(r.node_);
iterator_base next = r;