Insert-Type Methods

Method Description Complexity Guarantee Exception Guarantee
inline std::pair<find_iterator, bool>
  insert
  (const_mapped_reference r_value)
Inserts r_value into the table. Writes only if an entry with an equivalent key does not exist. If the entry was written, returns
std::make_pair(it, true)
where it corresponds to the new entry; Otherwise, returns
std::make_pair(find_end(), false)
.
O(1) average

O(m) worst

(m = #entries)

[1]

1,2

[1] Note that for multimap types, the mapped data part is a collection, and so the average and worst case complexities need to be multiplied by the corresponding complexities of copying collections.