42 #ifdef PB_DS_CLASS_C_DEC
45 inline typename PB_DS_CLASS_C_DEC::size_type
47 find_ins_pos(key_const_reference r_key,
false_type)
49 size_type hash = ranged_probe_fn_base::operator()(r_key);
55 size_type ins_pos = m_num_e;
56 resize_base::notify_insert_search_start();
57 for (i = 0; i < m_num_e; ++i)
59 const size_type pos = ranged_probe_fn_base::operator()(r_key, hash, i);
60 _GLIBCXX_DEBUG_ASSERT(pos < m_num_e);
61 entry*
const p_e = m_entries + pos;
64 case empty_entry_status:
66 resize_base::notify_insert_search_end();
67 PB_DS_CHECK_KEY_DOES_NOT_EXIST(r_key)
68 return (ins_pos == m_num_e) ? pos : ins_pos;
71 case erased_entry_status:
72 if (ins_pos == m_num_e)
75 case valid_entry_status:
76 if (hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), r_key))
78 resize_base::notify_insert_search_end();
79 PB_DS_CHECK_KEY_EXISTS(r_key)
84 _GLIBCXX_DEBUG_ASSERT(0);
87 resize_base::notify_insert_search_collision();
89 resize_base::notify_insert_search_end();
90 if (ins_pos == m_num_e)
91 __throw_insert_error();
100 key_const_reference r_key = PB_DS_V2F(r_val);
101 const size_type pos = find_ins_pos(r_key,
102 traits_base::m_store_extra_indicator);
104 if (m_entries[pos].m_stat == valid_entry_status)
106 PB_DS_CHECK_KEY_EXISTS(r_key)
107 return std::make_pair(&(m_entries + pos)->m_value,
false);
110 PB_DS_CHECK_KEY_DOES_NOT_EXIST(r_key)
111 return std::make_pair(insert_new_imp(r_val, pos),
true);
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
Struct holding two objects of arbitrary type.