Get rid of delete_nodes

This commit is contained in:
Daniel James
2017-05-06 04:58:57 +01:00
parent 0489069419
commit 6e074d7165
3 changed files with 69 additions and 74 deletions
+2 -20
View File
@@ -728,7 +728,7 @@ template <class K, class T, class H, class P, class A> class unordered_map
// value_allocator_traits::is_always_equal::value &&
// is_nothrow_move_assignable_v<H> &&
// is_nothrow_move_assignable_v<P>)
void clear() BOOST_NOEXCEPT;
void clear() BOOST_NOEXCEPT { table_.clear_impl(); }
template <typename H2, typename P2>
void merge(boost::unordered_map<K, T, H2, P2, A>& source);
@@ -1263,7 +1263,7 @@ template <class K, class T, class H, class P, class A> class unordered_multimap
// value_allocator_traits::is_always_equal::value &&
// is_nothrow_move_assignable_v<H> &&
// is_nothrow_move_assignable_v<P>)
void clear() BOOST_NOEXCEPT;
void clear() BOOST_NOEXCEPT { table_.clear_impl(); }
template <typename H2, typename P2>
void merge(boost::unordered_multimap<K, T, H2, P2, A>& source);
@@ -1611,15 +1611,6 @@ void unordered_map<K, T, H, P, A>::swap(unordered_map& other)
table_.swap(other.table_);
}
template <class K, class T, class H, class P, class A>
void unordered_map<K, T, H, P, A>::clear() BOOST_NOEXCEPT
{
if (table_.size_) {
table_.clear_buckets();
table_.delete_nodes(table_.get_previous_start(), node_pointer());
}
}
template <class K, class T, class H, class P, class A>
template <typename H2, typename P2>
void unordered_map<K, T, H, P, A>::merge(
@@ -2096,15 +2087,6 @@ void unordered_multimap<K, T, H, P, A>::swap(unordered_multimap& other)
table_.swap(other.table_);
}
template <class K, class T, class H, class P, class A>
void unordered_multimap<K, T, H, P, A>::clear() BOOST_NOEXCEPT
{
if (table_.size_) {
table_.clear_buckets();
table_.delete_nodes(table_.get_previous_start(), node_pointer());
}
}
// observers
template <class K, class T, class H, class P, class A>