1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
4 <title>Insert-type Methods
</title>
5 <meta name=
"GENERATOR" content=
"Microsoft Visual Studio .NET 7.1">
6 <meta name=
"vs_targetSchema" content=
"http://schemas.microsoft.com/intellisense/ie5">
8 <body bgcolor =
"white">
9 <h2>Insert-Type Methods
</h2>
10 <TABLE WIDTH=
"100%" BORDER=
"1" ID=
"Table1">
12 <TD Width =
"30%" ALIGN=
"left"><b>Method
</b></TD>
13 <TD Width =
"50%" ALIGN=
"left"><b>Description
</b></TD>
14 <TD Width =
"10%" ALIGN=
"left"><b>Complexity Guarantee
</b></TD>
15 <TD Width =
"10%" ALIGN=
"left"><b>Exception Guarantee
</b></TD>
19 <pre><b>inline
</b> std::pair
<<a href =
"find_iterator.html">find_iterator
</a>,
<b>bool
</b>>
21 (
<a href =
"mapped_value_type_defs.html">const_mapped_reference
</a> r_value)
24 <TD ALIGN=
"left">Inserts
<tt>r_value
</tt> into the table. Writes only if an entry with an equivalent key does not exist. If the entry was written, returns
25 <pre>std::make_pair(it,
<b>true
</b>)
26 </pre> where
<tt>it
</tt> corresponds to the new entry;
28 <pre>std::make_pair(
<a href =
"find_type_methods.html">find_end()
</a>,
<b>false
</b>)
30 <TD ALIGN=
"left"><i>O(
1)
</i> average
<p><i>O(m)
</i> worst
</p> <p>(
<i>m
</i> = #entries)
</p> <p><sub><a href =
"#mmap_complex">[
1]
</a></sub></p></TD>
31 <TD ALIGN=
"left"><a href =
"exception_guarantees_specifics.html#basic_guarantee">1</a>,
<a href =
"exception_guarantees_specifics.html#strong_guarantee">2</a></TD>
36 <a name =
"mmap_complex">[
1]
</a> Note that for multimap types, the mapped data part is a collection, and so the average and worst case complexities
37 need to be multiplied by the corresponding complexities of copying collections.