47 if (!resize_base::is_resize_needed())
49 resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e));
56 do_resize(size_type len)
57 { resize_imp(resize_base::get_nearest_larger_size(len)); }
62 do_resize_if_needed_no_throw()
64 if (!resize_base::is_resize_needed())
69 resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e));
74 PB_DS_ASSERT_VALID((*
this))
80 resize_imp(size_type new_size)
82 PB_DS_ASSERT_VALID((*
this))
83 if (new_size == m_num_e)
86 const size_type old_size = m_num_e;
87 entry_pointer_array a_p_entries_resized;
90 ranged_hash_fn_base::notify_resized(new_size);
95 a_p_entries_resized = s_entry_pointer_allocator.allocate(new_size);
100 ranged_hash_fn_base::notify_resized(old_size);
101 __throw_exception_again;
105 resize_imp_no_exceptions(new_size, a_p_entries_resized, old_size);
106 Resize_Policy::notify_resized(new_size);
107 PB_DS_ASSERT_VALID((*
this))
113 resize_imp_no_exceptions(size_type new_size, entry_pointer_array a_p_entries_resized, size_type old_size)
115 std::fill(a_p_entries_resized, a_p_entries_resized + m_num_e,
118 for (size_type pos = 0; pos < old_size; ++pos)
120 entry_pointer p_e = m_entries[pos];
122 p_e = resize_imp_no_exceptions_reassign_pointer(p_e, a_p_entries_resized, traits_base::m_store_extra_indicator);
126 _GLIBCXX_DEBUG_ONLY(assert_entry_pointer_array_valid(a_p_entries_resized,
127 __FILE__, __LINE__);)
128 s_entry_pointer_allocator.deallocate(m_entries, old_size);
129 m_entries = a_p_entries_resized;
130 PB_DS_ASSERT_VALID((*
this))