41#ifdef PB_DS_CLASS_C_DEC
48 if (!resize_base::is_resize_needed())
50 resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e));
57do_resize(size_type len)
58{ resize_imp(resize_base::get_nearest_larger_size(len)); }
63do_resize_if_needed_no_throw()
65 if (!resize_base::is_resize_needed())
70 resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e));
75 PB_DS_ASSERT_VALID((*
this))
81resize_imp(size_type new_size)
83 PB_DS_ASSERT_VALID((*
this))
84 if (new_size == m_num_e)
87 const size_type old_size = m_num_e;
88 entry_pointer_array a_p_entries_resized;
91 ranged_hash_fn_base::notify_resized(new_size);
96 a_p_entries_resized = s_entry_pointer_allocator.allocate(new_size);
101 ranged_hash_fn_base::notify_resized(old_size);
102 __throw_exception_again;
106 resize_imp_no_exceptions(new_size, a_p_entries_resized, old_size);
107 Resize_Policy::notify_resized(new_size);
108 PB_DS_ASSERT_VALID((*
this))
114resize_imp_no_exceptions(size_type new_size, entry_pointer_array a_p_entries_resized, size_type old_size)
116 std::fill(a_p_entries_resized, a_p_entries_resized + m_num_e,
119 for (size_type pos = 0; pos < old_size; ++pos)
121 entry_pointer p_e = m_entries[pos];
123 p_e = resize_imp_no_exceptions_reassign_pointer(p_e, a_p_entries_resized, traits_base::m_store_extra_indicator);
127 _GLIBCXX_DEBUG_ONLY(assert_entry_pointer_array_valid(a_p_entries_resized,
128 __FILE__, __LINE__);)
129 s_entry_pointer_allocator.deallocate(m_entries, old_size);
130 m_entries = a_p_entries_resized;
131 PB_DS_ASSERT_VALID((*
this))