42 typename PB_DS_CLASS_C_DEC::entry_allocator
43 PB_DS_CLASS_C_DEC::s_entry_allocator;
46 typename PB_DS_CLASS_C_DEC::value_allocator
47 PB_DS_CLASS_C_DEC::s_value_allocator;
50 typename PB_DS_CLASS_C_DEC::no_throw_copies_t
51 PB_DS_CLASS_C_DEC::s_no_throw_copies_ind;
57 copy_from_range(It first_it, It last_it)
59 while (first_it != last_it)
61 insert_value(*first_it, s_no_throw_copies_ind);
65 PB_DS_ASSERT_VALID((*
this))
71 : m_size(0), m_actual_size(resize_policy::min_size),
72 m_a_entries(s_entry_allocator.allocate(m_actual_size))
73 { PB_DS_ASSERT_VALID((*
this)) }
77 binary_heap(
const Cmp_Fn& r_cmp_fn)
78 : entry_cmp(r_cmp_fn), m_size(0), m_actual_size(resize_policy::min_size),
79 m_a_entries(s_entry_allocator.allocate(m_actual_size))
80 { PB_DS_ASSERT_VALID((*
this)) }
84 binary_heap(
const PB_DS_CLASS_C_DEC& other)
85 : entry_cmp(other), resize_policy(other), m_size(0),
86 m_actual_size(other.m_actual_size),
87 m_a_entries(s_entry_allocator.allocate(m_actual_size))
89 PB_DS_ASSERT_VALID(other)
90 _GLIBCXX_DEBUG_ASSERT(m_a_entries != other.m_a_entries);
94 copy_from_range(other.begin(), other.end());
98 for (size_type i = 0; i < m_size; ++i)
99 erase_at(m_a_entries, i, s_no_throw_copies_ind);
101 s_entry_allocator.deallocate(m_a_entries, m_actual_size);
102 __throw_exception_again;
104 PB_DS_ASSERT_VALID((*
this))
110 swap(PB_DS_CLASS_C_DEC& other)
112 PB_DS_ASSERT_VALID((*
this))
113 PB_DS_ASSERT_VALID(other)
114 _GLIBCXX_DEBUG_ASSERT(m_a_entries != other.m_a_entries);
116 std::swap((entry_cmp&)(*this), (entry_cmp&)other);
117 PB_DS_ASSERT_VALID((*this))
118 PB_DS_ASSERT_VALID(other)
124 value_swap(PB_DS_CLASS_C_DEC& other)
126 std::swap(m_a_entries, other.m_a_entries);
127 std::swap(m_size, other.m_size);
128 std::swap(m_actual_size, other.m_actual_size);
129 static_cast<resize_policy*
>(
this)->swap(other);
136 for (size_type i = 0; i < m_size; ++i)
137 erase_at(m_a_entries, i, s_no_throw_copies_ind);
138 s_entry_allocator.deallocate(m_a_entries, m_actual_size);
ISO C++ entities toplevel namespace is std.