41 #ifdef PB_DS_CLASS_C_DEC
44 typename PB_DS_CLASS_C_DEC::entry_allocator
45 PB_DS_CLASS_C_DEC::s_entry_allocator;
48 typename PB_DS_CLASS_C_DEC::value_allocator
49 PB_DS_CLASS_C_DEC::s_value_allocator;
52 typename PB_DS_CLASS_C_DEC::no_throw_copies_t
53 PB_DS_CLASS_C_DEC::s_no_throw_copies_ind;
59 copy_from_range(It first_it, It last_it)
61 while (first_it != last_it)
63 insert_value(*first_it, s_no_throw_copies_ind);
67 PB_DS_ASSERT_VALID((*
this))
73 : m_size(0), m_actual_size(resize_policy::min_size),
74 m_a_entries(s_entry_allocator.allocate(m_actual_size))
75 { PB_DS_ASSERT_VALID((*
this)) }
79 binary_heap(
const Cmp_Fn& r_cmp_fn)
80 : entry_cmp(r_cmp_fn), m_size(0), m_actual_size(resize_policy::min_size),
81 m_a_entries(s_entry_allocator.allocate(m_actual_size))
82 { PB_DS_ASSERT_VALID((*
this)) }
86 binary_heap(
const PB_DS_CLASS_C_DEC& other)
87 : entry_cmp(other), resize_policy(other), m_size(0),
88 m_actual_size(other.m_actual_size),
89 m_a_entries(s_entry_allocator.allocate(m_actual_size))
91 PB_DS_ASSERT_VALID(other)
92 _GLIBCXX_DEBUG_ASSERT(m_a_entries != other.m_a_entries);
96 copy_from_range(other.begin(), other.end());
100 for (size_type i = 0; i < m_size; ++i)
101 erase_at(m_a_entries, i, s_no_throw_copies_ind);
103 s_entry_allocator.deallocate(m_a_entries, m_actual_size);
104 __throw_exception_again;
106 PB_DS_ASSERT_VALID((*
this))
112 swap(PB_DS_CLASS_C_DEC& other)
114 PB_DS_ASSERT_VALID((*
this))
115 PB_DS_ASSERT_VALID(other)
116 _GLIBCXX_DEBUG_ASSERT(m_a_entries != other.m_a_entries);
118 std::
swap((entry_cmp&)(*this), (entry_cmp&)other);
119 PB_DS_ASSERT_VALID((*this))
120 PB_DS_ASSERT_VALID(other)
126 value_swap(PB_DS_CLASS_C_DEC& other)
128 std::swap(m_a_entries, other.m_a_entries);
129 std::swap(m_size, other.m_size);
130 std::swap(m_actual_size, other.m_actual_size);
131 static_cast<resize_policy*
>(
this)->
swap(other);
138 for (size_type i = 0; i < m_size; ++i)
139 erase_at(m_a_entries, i, s_no_throw_copies_ind);
140 s_entry_allocator.deallocate(m_a_entries, m_actual_size);
void swap(basic_regex< _Ch_type, _Rx_traits > &__lhs, basic_regex< _Ch_type, _Rx_traits > &__rhs)
Swaps the contents of two regular expression objects.
ISO C++ entities toplevel namespace is std.