41#ifdef PB_DS_CLASS_C_DEC
45hash_standard_resize_policy()
46: m_size(Size_Policy::get_nearest_larger_size(1))
47{ trigger_policy_base::notify_externally_resized(m_size); }
51hash_standard_resize_policy(
const Size_Policy& r_size_policy)
52: Size_Policy(r_size_policy), m_size(Size_Policy::get_nearest_larger_size(1))
53{ trigger_policy_base::notify_externally_resized(m_size); }
57hash_standard_resize_policy(
const Size_Policy& r_size_policy,
58 const Trigger_Policy& r_trigger_policy)
59: Size_Policy(r_size_policy), Trigger_Policy(r_trigger_policy),
60 m_size(Size_Policy::get_nearest_larger_size(1))
61{ trigger_policy_base::notify_externally_resized(m_size); }
65~hash_standard_resize_policy()
71swap(PB_DS_CLASS_C_DEC& other)
73 trigger_policy_base::swap(other);
74 size_policy_base::swap(other);
81notify_find_search_start()
82{ trigger_policy_base::notify_find_search_start(); }
87notify_find_search_collision()
88{ trigger_policy_base::notify_find_search_collision(); }
93notify_find_search_end()
94{ trigger_policy_base::notify_find_search_end(); }
99notify_insert_search_start()
100{ trigger_policy_base::notify_insert_search_start(); }
105notify_insert_search_collision()
106{ trigger_policy_base::notify_insert_search_collision(); }
111notify_insert_search_end()
112{ trigger_policy_base::notify_insert_search_end(); }
117notify_erase_search_start()
118{ trigger_policy_base::notify_erase_search_start(); }
123notify_erase_search_collision()
124{ trigger_policy_base::notify_erase_search_collision(); }
129notify_erase_search_end()
130{ trigger_policy_base::notify_erase_search_end(); }
135notify_inserted(size_type num_e)
136{ trigger_policy_base::notify_inserted(num_e); }
141notify_erased(size_type num_e)
142{ trigger_policy_base::notify_erased(num_e); }
148{ trigger_policy_base::notify_cleared(); }
153is_resize_needed()
const
154{
return trigger_policy_base::is_resize_needed(); }
157typename PB_DS_CLASS_C_DEC::size_type
159get_new_size(size_type size, size_type num_used_e)
const
161 if (trigger_policy_base::is_grow_needed(size, num_used_e))
162 return size_policy_base::get_nearest_larger_size(size);
163 return size_policy_base::get_nearest_smaller_size(size);
169notify_resized(size_type new_size)
171 trigger_policy_base::notify_resized(new_size);
176inline typename PB_DS_CLASS_C_DEC::size_type
178get_actual_size()
const
180 PB_DS_STATIC_ASSERT(access, external_size_access);
187resize(size_type new_size)
189 PB_DS_STATIC_ASSERT(access, external_size_access);
190 size_type actual_size = size_policy_base::get_nearest_larger_size(1);
191 while (actual_size < new_size)
193 const size_type pot = size_policy_base::get_nearest_larger_size(actual_size);
195 if (pot == actual_size && pot < new_size)
196 __throw_resize_error();
203 const size_type old_size = m_size;
206 do_resize(actual_size - 1);
208 __catch(insert_error& )
211 __throw_resize_error();
216 __throw_exception_again;
237get_trigger_policy()
const
249get_size_policy()
const
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.