add "void _erase(const_iterator cit)" APIs

This commit is contained in:
greg
2019-03-30 14:39:10 -04:00
parent 2836a43989
commit 2b41b843b3
+2
View File
@@ -1460,6 +1460,7 @@ public:
PolicyTraits::destroy(&alloc_ref(), it.slot_); PolicyTraits::destroy(&alloc_ref(), it.slot_);
erase_meta_only(it); erase_meta_only(it);
} }
void _erase(const_iterator cit) { _erase(cit.inner_); }
// This overload is necessary because otherwise erase<K>(const K&) would be // This overload is necessary because otherwise erase<K>(const K&) would be
// a better match if non-const iterator is passed as an argument. // a better match if non-const iterator is passed as an argument.
@@ -2974,6 +2975,7 @@ public:
assert(it.inner_ != nullptr); assert(it.inner_ != nullptr);
it.inner_->set_._erase(it.it_); it.inner_->set_._erase(it.it_);
} }
void _erase(const_iterator cit) { _erase(cit.iter_); }
// This overload is necessary because otherwise erase<K>(const K&) would be // This overload is necessary because otherwise erase<K>(const K&) would be
// a better match if non-const iterator is passed as an argument. // a better match if non-const iterator is passed as an argument.