43 typename PB_DS_CLASS_C_DEC::point_iterator,
46 insert(const_reference r_val)
48 PB_DS_ASSERT_VALID((*
this))
49 entry_pointer p_l = find_imp(PB_DS_V2F(r_val));
53 PB_DS_CHECK_KEY_EXISTS(PB_DS_V2F(r_val))
54 return
std::
make_pair(point_iterator(&p_l->m_value), false);
57 PB_DS_CHECK_KEY_DOES_NOT_EXIST(PB_DS_V2F(r_val))
59 p_l = allocate_new_entry(r_val, traits_base::m_no_throw_copies_indicator);
60 p_l->m_p_next = m_p_l;
62 PB_DS_ASSERT_VALID((*this))
63 return
std::
make_pair(point_iterator(&p_l->m_value), true);
67 inline typename PB_DS_CLASS_C_DEC::entry_pointer
69 allocate_new_entry(const_reference r_val,
false_type)
71 entry_pointer p_l = s_entry_allocator.allocate(1);
72 cond_dealtor_t cond(p_l);
73 new (
const_cast<void*
>(
static_cast<const void*
>(&p_l->m_value)))
77 _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
78 init_entry_metadata(p_l, s_metadata_type_indicator);
83 inline typename PB_DS_CLASS_C_DEC::entry_pointer
85 allocate_new_entry(const_reference r_val,
true_type)
87 entry_pointer p_l = s_entry_allocator.allocate(1);
88 new (&p_l->m_value) value_type(r_val);
89 _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
90 init_entry_metadata(p_l, s_metadata_type_indicator);
95 template<
typename Metadata>
98 init_entry_metadata(entry_pointer p_l, type_to_type<Metadata>)
99 {
new (&p_l->m_update_metadata) Metadata(s_update_policy()); }
104 init_entry_metadata(entry_pointer, type_to_type<null_type>)
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
ISO C++ entities toplevel namespace is std.
constexpr pair< typename __decay_and_strip< _T1 >::__type, typename __decay_and_strip< _T2 >::__type > make_pair(_T1 &&__x, _T2 &&__y)
A convenience wrapper for creating a pair from two objects.
Struct holding two objects of arbitrary type.