42#ifdef PB_DS_CLASS_C_DEC
45typename PB_DS_CLASS_C_DEC::entry_allocator
46PB_DS_CLASS_C_DEC::s_entry_allocator;
49typename PB_DS_CLASS_C_DEC::entry_pointer_allocator
50PB_DS_CLASS_C_DEC::s_entry_pointer_allocator;
56copy_from_range(It first_it, It last_it)
58 while (first_it != last_it)
59 insert(*(first_it++));
65 ranged_hash_fn_base(resize_base::get_nearest_larger_size(1)),
66 m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
67 m_entries(s_entry_pointer_allocator.allocate(m_num_e))
70 PB_DS_ASSERT_VALID((*
this))
75PB_DS_CC_HASH_NAME(
const Hash_Fn& r_hash_fn) :
76 ranged_hash_fn_base(resize_base::get_nearest_larger_size(1), r_hash_fn),
77 m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
78 m_entries(s_entry_pointer_allocator.allocate(m_num_e))
81 PB_DS_ASSERT_VALID((*
this))
86PB_DS_CC_HASH_NAME(
const Hash_Fn& r_hash_fn,
const Eq_Fn& r_eq_fn) :
87 PB_DS_HASH_EQ_FN_C_DEC(r_eq_fn),
88 ranged_hash_fn_base(resize_base::get_nearest_larger_size(1), r_hash_fn),
89 m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
90 m_entries(s_entry_pointer_allocator.allocate(m_num_e))
92 std::fill(m_entries, m_entries + m_num_e, (entry_pointer)0);
93 Resize_Policy::notify_cleared();
94 ranged_hash_fn_base::notify_resized(m_num_e);
95 PB_DS_ASSERT_VALID((*
this))
100PB_DS_CC_HASH_NAME(
const Hash_Fn& r_hash_fn,
const Eq_Fn& r_eq_fn,
101 const Comb_Hash_Fn& r_comb_hash_fn) :
102 PB_DS_HASH_EQ_FN_C_DEC(r_eq_fn),
103 ranged_hash_fn_base(resize_base::get_nearest_larger_size(1),
104 r_hash_fn, r_comb_hash_fn),
105 m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
106 m_entries(s_entry_pointer_allocator.allocate(m_num_e))
109 PB_DS_ASSERT_VALID((*
this))
114PB_DS_CC_HASH_NAME(
const Hash_Fn& r_hash_fn,
const Eq_Fn& r_eq_fn,
115 const Comb_Hash_Fn& r_comb_hash_fn,
116 const Resize_Policy& r_resize_policy) :
117 PB_DS_HASH_EQ_FN_C_DEC(r_eq_fn),
118 Resize_Policy(r_resize_policy),
119 ranged_hash_fn_base(resize_base::get_nearest_larger_size(1),
120 r_hash_fn, r_comb_hash_fn),
121 m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
122 m_entries(s_entry_pointer_allocator.allocate(m_num_e))
125 PB_DS_ASSERT_VALID((*
this))
130PB_DS_CC_HASH_NAME(
const PB_DS_CLASS_C_DEC& other) :
131 PB_DS_HASH_EQ_FN_C_DEC(other),
132 resize_base(other), ranged_hash_fn_base(other),
133 m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
134 m_entries(s_entry_pointer_allocator.allocate(m_num_e))
137 PB_DS_ASSERT_VALID((*
this))
140 copy_from_range(other.begin(), other.end());
145 __throw_exception_again;
147 PB_DS_ASSERT_VALID((*
this))
158swap(PB_DS_CLASS_C_DEC& other)
160 PB_DS_ASSERT_VALID((*
this))
161 PB_DS_ASSERT_VALID(other)
163 std::swap(m_entries, other.m_entries);
164 std::swap(m_num_e, other.m_num_e);
165 std::swap(m_num_used_e, other.m_num_used_e);
166 ranged_hash_fn_base::swap(other);
167 hash_eq_fn_base::swap(other);
168 resize_base::swap(other);
170 _GLIBCXX_DEBUG_ONLY(debug_base::swap(other));
171 PB_DS_ASSERT_VALID((*this))
172 PB_DS_ASSERT_VALID(other)
181 s_entry_pointer_allocator.deallocate(m_entries, m_num_e);
189 std::fill(m_entries, m_entries + m_num_e, entry_pointer(0));
190 Resize_Policy::notify_resized(m_num_e);
191 Resize_Policy::notify_cleared();
192 ranged_hash_fn_base::notify_resized(m_num_e);
ISO C++ entities toplevel namespace is std.