41#ifdef PB_DS_CLASS_C_DEC
45 typename PB_DS_CLASS_C_DEC::point_iterator,
48insert(const_reference r_val)
50 PB_DS_ASSERT_VALID((*
this))
51 entry_pointer p_l = find_imp(PB_DS_V2F(r_val));
55 PB_DS_CHECK_KEY_EXISTS(PB_DS_V2F(r_val))
56 return std::make_pair(point_iterator(&p_l->m_value),
false);
59 PB_DS_CHECK_KEY_DOES_NOT_EXIST(PB_DS_V2F(r_val))
61 p_l = allocate_new_entry(r_val, traits_base::m_no_throw_copies_indicator);
62 p_l->m_p_next = m_p_l;
64 PB_DS_ASSERT_VALID((*
this))
65 return
std::make_pair(point_iterator(&p_l->m_value), true);
69inline typename PB_DS_CLASS_C_DEC::entry_pointer
71allocate_new_entry(const_reference r_val, false_type)
73 entry_pointer p_l = s_entry_allocator.allocate(1);
74 cond_dealtor_t cond(p_l);
75 new (
const_cast<void*
>(
static_cast<const void*
>(&p_l->m_value)))
79 _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
80 init_entry_metadata(p_l, s_metadata_type_indicator);
85inline typename PB_DS_CLASS_C_DEC::entry_pointer
87allocate_new_entry(const_reference r_val, true_type)
89 entry_pointer p_l = s_entry_allocator.allocate(1);
90 new (&p_l->m_value) value_type(r_val);
91 _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
92 init_entry_metadata(p_l, s_metadata_type_indicator);
97template<
typename Metadata>
100init_entry_metadata(entry_pointer p_l, type_to_type<Metadata>)
101{
new (&p_l->m_update_metadata) Metadata(s_update_policy()); }
106init_entry_metadata(entry_pointer, type_to_type<null_type>)
ISO C++ entities toplevel namespace is std.
Struct holding two objects of arbitrary type.