43 inline typename PB_DS_CLASS_C_DEC::size_type
45 find_ins_pos(key_const_reference r_key,
false_type)
47 size_type hash = ranged_probe_fn_base::operator()(r_key);
53 size_type ins_pos = m_num_e;
54 resize_base::notify_insert_search_start();
55 for (i = 0; i < m_num_e; ++i)
57 const size_type pos = ranged_probe_fn_base::operator()(r_key, hash, i);
58 _GLIBCXX_DEBUG_ASSERT(pos < m_num_e);
59 entry*
const p_e = m_entries + pos;
62 case empty_entry_status:
64 resize_base::notify_insert_search_end();
65 PB_DS_CHECK_KEY_DOES_NOT_EXIST(r_key)
66 return (ins_pos == m_num_e) ? pos : ins_pos;
69 case erased_entry_status:
70 if (ins_pos == m_num_e)
73 case valid_entry_status:
74 if (hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), r_key))
76 resize_base::notify_insert_search_end();
77 PB_DS_CHECK_KEY_EXISTS(r_key)
82 _GLIBCXX_DEBUG_ASSERT(0);
85 resize_base::notify_insert_search_collision();
87 resize_base::notify_insert_search_end();
88 if (ins_pos == m_num_e)
89 __throw_insert_error();
94 inline std::pair<typename PB_DS_CLASS_C_DEC::point_iterator,
bool>
98 key_const_reference r_key = PB_DS_V2F(r_val);
99 const size_type pos = find_ins_pos(r_key,
100 traits_base::m_store_extra_indicator);
102 if (m_entries[pos].m_stat == valid_entry_status)
104 PB_DS_CHECK_KEY_EXISTS(r_key)
105 return std::
make_pair(&(m_entries + pos)->m_value, false);
108 PB_DS_CHECK_KEY_DOES_NOT_EXIST(r_key)
109 return std::
make_pair(insert_new_imp(r_val, pos), true);
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.
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.