1 <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
2 <section><title>Reference</title>
3 <section id="header.boost.unordered_set_hpp"><title>Header <<ulink url="../../boost/unordered_set.hpp">boost/unordered_set.hpp</ulink>></title><synopsis xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">namespace</phrase> <phrase role="identifier">boost</phrase> <phrase role="special">{</phrase>
4 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">hash</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">></phrase><phrase role="special">,</phrase>
5 <phrase role="keyword">typename</phrase> Pred <phrase role="special">=</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">equal_to</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">></phrase><phrase role="special">,</phrase>
6 <phrase role="keyword">typename</phrase> Alloc <phrase role="special">=</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">allocator</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">></phrase> <phrase role="special">></phrase>
7 <phrase role="keyword">class</phrase> <link linkend="boost.unordered_set">unordered_set</link><phrase role="special">;</phrase>
8 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
9 <phrase role="keyword">bool</phrase> <link linkend="boost.unordered_set.operator==_id1"><phrase role="keyword">operator</phrase><phrase role="special">==</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
10 <phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
11 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
12 <phrase role="keyword">bool</phrase> <link linkend="boost.unordered_set.operator!=_id1"><phrase role="keyword">operator</phrase><phrase role="special">!=</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
13 <phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
14 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
15 <phrase role="keyword">void</phrase> <link linkend="boost.unordered_set.swap_id1"><phrase role="identifier">swap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
16 <phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
17 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">hash</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">></phrase><phrase role="special">,</phrase>
18 <phrase role="keyword">typename</phrase> Pred <phrase role="special">=</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">equal_to</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">></phrase><phrase role="special">,</phrase>
19 <phrase role="keyword">typename</phrase> Alloc <phrase role="special">=</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">allocator</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">></phrase> <phrase role="special">></phrase>
20 <phrase role="keyword">class</phrase> <link linkend="boost.unordered_multiset">unordered_multiset</link><phrase role="special">;</phrase>
21 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
22 <phrase role="keyword">bool</phrase> <link linkend="boost.unordered_multiset.operator==_id1"><phrase role="keyword">operator</phrase><phrase role="special">==</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
23 <phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
24 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
25 <phrase role="keyword">bool</phrase> <link linkend="boost.unordered_multiset.operator!=_id1"><phrase role="keyword">operator</phrase><phrase role="special">!=</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
26 <phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
27 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
28 <phrase role="keyword">void</phrase> <link linkend="boost.unordered_multiset.swap_id1"><phrase role="identifier">swap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
29 <phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
30 <phrase role="special">}</phrase></synopsis>
31 <refentry xmlns:xi="http://www.w3.org/2001/XInclude" id="boost.unordered_set"><refmeta><refentrytitle>Class template unordered_set</refentrytitle><manvolnum>3</manvolnum></refmeta><refnamediv><refname>boost::unordered_set</refname><refpurpose>
32 An unordered associative container that stores unique values.
33 </refpurpose></refnamediv><refsynopsisdiv><synopsis><phrase role="comment">// In header: <<link linkend="header.boost.unordered_set_hpp">boost/unordered_set.hpp</link>>
35 </phrase><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">hash</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">></phrase><phrase role="special">,</phrase>
36 <phrase role="keyword">typename</phrase> Pred <phrase role="special">=</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">equal_to</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">></phrase><phrase role="special">,</phrase>
37 <phrase role="keyword">typename</phrase> Alloc <phrase role="special">=</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">allocator</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">></phrase> <phrase role="special">></phrase>
38 <phrase role="keyword">class</phrase> <link linkend="boost.unordered_set">unordered_set</link> <phrase role="special">{</phrase>
39 <phrase role="keyword">public</phrase><phrase role="special">:</phrase>
40 <phrase role="comment">// <link linkend="boost.unordered_settypes">types</link></phrase>
41 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Value</phrase> <anchor id="boost.unordered_set.key_type"/><phrase role="identifier">key_type</phrase><phrase role="special">;</phrase>
42 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Value</phrase> <anchor id="boost.unordered_set.value_type"/><phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
43 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Hash</phrase> <anchor id="boost.unordered_set.hasher"/><phrase role="identifier">hasher</phrase><phrase role="special">;</phrase>
44 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Pred</phrase> <anchor id="boost.unordered_set.key_equal"/><phrase role="identifier">key_equal</phrase><phrase role="special">;</phrase>
45 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Alloc</phrase> <anchor id="boost.unordered_set.allocator_type"/><phrase role="identifier">allocator_type</phrase><phrase role="special">;</phrase>
46 <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">::</phrase><phrase role="identifier">pointer</phrase> <anchor id="boost.unordered_set.pointer"/><phrase role="identifier">pointer</phrase><phrase role="special">;</phrase>
47 <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">::</phrase><phrase role="identifier">const_pointer</phrase> <anchor id="boost.unordered_set.const_pointer"/><phrase role="identifier">const_pointer</phrase><phrase role="special">;</phrase>
48 <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">::</phrase><phrase role="identifier">reference</phrase> <anchor id="boost.unordered_set.reference"/><phrase role="identifier">reference</phrase><phrase role="special">;</phrase> <phrase role="comment">// lvalue of value_type.</phrase>
49 <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">::</phrase><phrase role="identifier">const_reference</phrase> <anchor id="boost.unordered_set.const_reference"/><phrase role="identifier">const_reference</phrase><phrase role="special">;</phrase> <phrase role="comment">// const lvalue of value_type.</phrase>
50 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_set.size_type"><phrase role="identifier">size_type</phrase></link><phrase role="special">;</phrase>
51 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_set.difference_type"><phrase role="identifier">difference_type</phrase></link><phrase role="special">;</phrase>
52 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_set.iterator"><phrase role="identifier">iterator</phrase></link><phrase role="special">;</phrase>
53 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_set.const_iterator"><phrase role="identifier">const_iterator</phrase></link><phrase role="special">;</phrase>
54 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_set.local_iterator"><phrase role="identifier">local_iterator</phrase></link><phrase role="special">;</phrase>
55 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_set.const_local_iterator"><phrase role="identifier">const_local_iterator</phrase></link><phrase role="special">;</phrase>
57 <phrase role="comment">// <link linkend="boost.unordered_setconstruct-copy-destruct">construct/copy/destruct</link></phrase>
58 <phrase role="keyword">explicit</phrase> <link linkend="id1-bb"><phrase role="identifier">unordered_set</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> <phrase role="special">=</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis><phrase role="special">,</phrase>
59 <phrase role="identifier">hasher</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">hasher</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
60 <phrase role="identifier">key_equal</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">key_equal</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
61 <phrase role="identifier">allocator_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
62 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> InputIterator<phrase role="special">></phrase>
63 <link linkend="id2-bb"><phrase role="identifier">unordered_set</phrase></link><phrase role="special">(</phrase><phrase role="identifier">InputIterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">InputIterator</phrase><phrase role="special">,</phrase>
64 <phrase role="identifier">size_type</phrase> <phrase role="special">=</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis><phrase role="special">,</phrase>
65 <phrase role="identifier">hasher</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">hasher</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase> <phrase role="identifier">key_equal</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">key_equal</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
66 <phrase role="identifier">allocator_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
67 <link linkend="id3-bb"><phrase role="identifier">unordered_set</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
68 <link linkend="id4-bb"><phrase role="identifier">unordered_set</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase> <phrase role="special">&&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
69 <phrase role="keyword">explicit</phrase> <link linkend="id5-bb"><phrase role="identifier">unordered_set</phrase></link><phrase role="special">(</phrase><phrase role="identifier">Allocator</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
70 <link linkend="id6-bb"><phrase role="identifier">unordered_set</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase> <phrase role="identifier">Allocator</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
71 <link linkend="id7-bb"><phrase role="special">~</phrase><phrase role="identifier">unordered_set</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
72 <phrase role="identifier">unordered_set</phrase><phrase role="special">&</phrase> <link linkend="id8-bb"><phrase role="keyword">operator</phrase><phrase role="special">=</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
73 <phrase role="identifier">unordered_set</phrase><phrase role="special">&</phrase> <link linkend="id9-bb"><phrase role="keyword">operator</phrase><phrase role="special">=</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase> <phrase role="special">&&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
74 <phrase role="identifier">allocator_type</phrase> <link linkend="id10-bb"><phrase role="identifier">get_allocator</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
76 <phrase role="comment">// <link linkend="id11-bb">size and capacity</link></phrase>
77 <phrase role="keyword">bool</phrase> <link linkend="id12-bb"><phrase role="identifier">empty</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
78 <phrase role="identifier">size_type</phrase> <link linkend="id13-bb"><phrase role="identifier">size</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
79 <phrase role="identifier">size_type</phrase> <link linkend="id14-bb"><phrase role="identifier">max_size</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
81 <phrase role="comment">// <link linkend="id15-bb">iterators</link></phrase>
82 <phrase role="identifier">iterator</phrase> <link linkend="id17-bb"><phrase role="identifier">begin</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
83 <phrase role="identifier">const_iterator</phrase> <link linkend="id18-bb"><phrase role="identifier">begin</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
84 <phrase role="identifier">iterator</phrase> <link linkend="id20-bb"><phrase role="identifier">end</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
85 <phrase role="identifier">const_iterator</phrase> <link linkend="id21-bb"><phrase role="identifier">end</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
86 <phrase role="identifier">const_iterator</phrase> <link linkend="id22-bb"><phrase role="identifier">cbegin</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
87 <phrase role="identifier">const_iterator</phrase> <link linkend="id23-bb"><phrase role="identifier">cend</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
89 <phrase role="comment">// <link linkend="id24-bb">modifiers</link></phrase>
90 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase><phrase role="special">...</phrase> Args<phrase role="special">></phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">iterator</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase><phrase role="special">></phrase> <link linkend="id25-bb"><phrase role="identifier">emplace</phrase></link><phrase role="special">(</phrase><phrase role="identifier">Args</phrase><phrase role="special">&&</phrase><phrase role="special">...</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
91 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase><phrase role="special">...</phrase> Args<phrase role="special">></phrase> <phrase role="identifier">iterator</phrase> <link linkend="id26-bb"><phrase role="identifier">emplace_hint</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">Args</phrase><phrase role="special">&&</phrase><phrase role="special">...</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
92 <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">iterator</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase><phrase role="special">></phrase> <link linkend="id27-bb"><phrase role="identifier">insert</phrase></link><phrase role="special">(</phrase><phrase role="identifier">value_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
93 <phrase role="identifier">iterator</phrase> <link linkend="id28-bb"><phrase role="identifier">insert</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">value_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
94 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> InputIterator<phrase role="special">></phrase> <phrase role="keyword">void</phrase> <link linkend="id29-bb"><phrase role="identifier">insert</phrase></link><phrase role="special">(</phrase><phrase role="identifier">InputIterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">InputIterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
95 <phrase role="identifier">iterator</phrase> <link linkend="id30-bb"><phrase role="identifier">erase</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
96 <phrase role="identifier">size_type</phrase> <link linkend="id31-bb"><phrase role="identifier">erase</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
97 <phrase role="identifier">iterator</phrase> <link linkend="id32-bb"><phrase role="identifier">erase</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">const_iterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
98 <phrase role="keyword">void</phrase> <link linkend="id33-bb"><phrase role="identifier">quick_erase</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
99 <phrase role="keyword">void</phrase> <link linkend="id34-bb"><phrase role="identifier">erase_return_void</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
100 <phrase role="keyword">void</phrase> <link linkend="id35-bb"><phrase role="identifier">clear</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
101 <phrase role="keyword">void</phrase> <link linkend="id36-bb"><phrase role="identifier">swap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
103 <phrase role="comment">// <link linkend="id37-bb">observers</link></phrase>
104 <phrase role="identifier">hasher</phrase> <link linkend="id38-bb"><phrase role="identifier">hash_function</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
105 <phrase role="identifier">key_equal</phrase> <link linkend="id39-bb"><phrase role="identifier">key_eq</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
107 <phrase role="comment">// <link linkend="id40-bb">lookup</link></phrase>
108 <phrase role="identifier">iterator</phrase> <link linkend="id42-bb"><phrase role="identifier">find</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
109 <phrase role="identifier">const_iterator</phrase> <link linkend="id43-bb"><phrase role="identifier">find</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
110 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> CompatibleKey<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> CompatibleHash<phrase role="special">,</phrase>
111 <phrase role="keyword">typename</phrase> CompatiblePredicate<phrase role="special">></phrase>
112 <phrase role="identifier">iterator</phrase> <link linkend="id44-bb"><phrase role="identifier">find</phrase></link><phrase role="special">(</phrase><phrase role="identifier">CompatibleKey</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase> <phrase role="identifier">CompatibleHash</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
113 <phrase role="identifier">CompatiblePredicate</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
114 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> CompatibleKey<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> CompatibleHash<phrase role="special">,</phrase>
115 <phrase role="keyword">typename</phrase> CompatiblePredicate<phrase role="special">></phrase>
116 <phrase role="identifier">const_iterator</phrase>
117 <link linkend="id45-bb"><phrase role="identifier">find</phrase></link><phrase role="special">(</phrase><phrase role="identifier">CompatibleKey</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase> <phrase role="identifier">CompatibleHash</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
118 <phrase role="identifier">CompatiblePredicate</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
119 <phrase role="identifier">size_type</phrase> <link linkend="id46-bb"><phrase role="identifier">count</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
120 <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">iterator</phrase><phrase role="special">></phrase> <link linkend="id48-bb"><phrase role="identifier">equal_range</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
121 <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">const_iterator</phrase><phrase role="special">></phrase> <link linkend="id49-bb"><phrase role="identifier">equal_range</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
123 <phrase role="comment">// <link linkend="id50-bb">bucket interface</link></phrase>
124 <phrase role="identifier">size_type</phrase> <link linkend="id51-bb"><phrase role="identifier">bucket_count</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
125 <phrase role="identifier">size_type</phrase> <link linkend="id52-bb"><phrase role="identifier">max_bucket_count</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
126 <phrase role="identifier">size_type</phrase> <link linkend="id53-bb"><phrase role="identifier">bucket_size</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
127 <phrase role="identifier">size_type</phrase> <link linkend="id54-bb"><phrase role="identifier">bucket</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
128 <phrase role="identifier">local_iterator</phrase> <link linkend="id56-bb"><phrase role="identifier">begin</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
129 <phrase role="identifier">const_local_iterator</phrase> <link linkend="id57-bb"><phrase role="identifier">begin</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
130 <phrase role="identifier">local_iterator</phrase> <link linkend="id59-bb"><phrase role="identifier">end</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
131 <phrase role="identifier">const_local_iterator</phrase> <link linkend="id60-bb"><phrase role="identifier">end</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
132 <phrase role="identifier">const_local_iterator</phrase> <link linkend="id61-bb"><phrase role="identifier">cbegin</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
133 <phrase role="identifier">const_local_iterator</phrase> <link linkend="id62-bb"><phrase role="identifier">cend</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
135 <phrase role="comment">// <link linkend="id63-bb">hash policy</link></phrase>
136 <phrase role="keyword">float</phrase> <link linkend="id64-bb"><phrase role="identifier">load_factor</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
137 <phrase role="keyword">float</phrase> <link linkend="id65-bb"><phrase role="identifier">max_load_factor</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
138 <phrase role="keyword">void</phrase> <link linkend="id66-bb"><phrase role="identifier">max_load_factor</phrase></link><phrase role="special">(</phrase><phrase role="keyword">float</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
139 <phrase role="keyword">void</phrase> <link linkend="id67-bb"><phrase role="identifier">rehash</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
140 <phrase role="special">}</phrase><phrase role="special">;</phrase>
142 <phrase role="comment">// <link linkend="id68-bb">Equality Comparisons</link></phrase>
143 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
144 <phrase role="keyword">bool</phrase> <link linkend="boost.unordered_set.operator==_id1"><phrase role="keyword">operator</phrase><phrase role="special">==</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
145 <phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
146 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
147 <phrase role="keyword">bool</phrase> <link linkend="boost.unordered_set.operator!=_id1"><phrase role="keyword">operator</phrase><phrase role="special">!=</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
148 <phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
150 <phrase role="comment">// <link linkend="id69-bb">swap</link></phrase>
151 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
152 <phrase role="keyword">void</phrase> <link linkend="boost.unordered_set.swap_id1"><phrase role="identifier">swap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
153 <phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></synopsis></refsynopsisdiv><refsect1><title>Description</title>
154 <para>Based on chapter 23 of
155 <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2960.pdf">the working draft of the C++ standard [n2960]</ulink>.
156 But without the updated rules for allocators.
158 <para><emphasis role="bold">Template Parameters</emphasis>
163 <entry><emphasis>Value</emphasis></entry>
164 <entry>Value must be Assignable and CopyConstructible</entry></row>
166 <entry><emphasis>Hash</emphasis></entry>
167 <entry>A unary function object type that acts a hash function for a <computeroutput>Value</computeroutput>. It takes a single argument of type <computeroutput>Value</computeroutput> and returns a value of type std::size_t.</entry></row>
169 <entry><emphasis>Pred</emphasis></entry>
170 <entry>A binary function object that implements an equivalence relation on values of type <computeroutput>Value</computeroutput>.
171 A binary function object that induces an equivalence relation on values of type Key.
172 It takes two arguments of type Key and returns a value of type bool.</entry></row>
174 <entry><emphasis>Alloc</emphasis></entry>
175 <entry>An allocator whose value type is the same as the container's value type.</entry></row></tbody></tgroup></informaltable></para>
176 <para>The elements are organized into buckets. Keys with the same hash code are stored in the same bucket.</para>
177 <para>The number of buckets can be automatically increased by a call to insert, or as the result of calling rehash.</para>
178 <refsect2><title><anchor id="boost.unordered_settypes"/><computeroutput>unordered_set</computeroutput>
180 types</title><orderedlist><listitem><para>
181 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_set.size_type"/><phrase role="identifier">size_type</phrase><phrase role="special">;</phrase></para>
182 <para>An unsigned integral type.</para>
183 <para>size_type can represent any non-negative value of difference_type.</para>
184 </listitem><listitem><para>
185 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_set.difference_type"/><phrase role="identifier">difference_type</phrase><phrase role="special">;</phrase></para>
186 <para>A signed integral type.</para>
187 <para>Is identical to the difference type of iterator and const_iterator.</para>
188 </listitem><listitem><para>
189 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_set.iterator"/><phrase role="identifier">iterator</phrase><phrase role="special">;</phrase></para>
190 <para>A constant iterator whose value type is value_type. </para>
191 <para>The iterator category is at least a forward iterator.</para>
192 <para>Convertible to const_iterator.</para>
193 </listitem><listitem><para>
194 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_set.const_iterator"/><phrase role="identifier">const_iterator</phrase><phrase role="special">;</phrase></para>
195 <para>A constant iterator whose value type is value_type. </para>
196 <para>The iterator category is at least a forward iterator.</para>
197 </listitem><listitem><para>
198 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_set.local_iterator"/><phrase role="identifier">local_iterator</phrase><phrase role="special">;</phrase></para>
199 <para>An iterator with the same value type, difference type and pointer and reference type as iterator.</para>
200 <para>A local_iterator object can be used to iterate through a single bucket.</para>
201 </listitem><listitem><para>
202 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_set.const_local_iterator"/><phrase role="identifier">const_local_iterator</phrase><phrase role="special">;</phrase></para>
203 <para>A constant iterator with the same value type, difference type and pointer and reference type as const_iterator.</para>
204 <para>A const_local_iterator object can be used to iterate through a single bucket.</para>
205 </listitem></orderedlist></refsect2><refsect2><title><anchor id="boost.unordered_setconstruct-copy-destruct"/><computeroutput>unordered_set</computeroutput>
207 construct/copy/destruct</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">explicit</phrase> <anchor id="id1-bb"/><phrase role="identifier">unordered_set</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n <phrase role="special">=</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis><phrase role="special">,</phrase>
208 <phrase role="identifier">hasher</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> hf <phrase role="special">=</phrase> <phrase role="identifier">hasher</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
209 <phrase role="identifier">key_equal</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> eq <phrase role="special">=</phrase> <phrase role="identifier">key_equal</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
210 <phrase role="identifier">allocator_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> a <phrase role="special">=</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.</para><variablelist spacing="compact"><?dbhtml
211 list-presentation="table"
212 ?><varlistentry><term>Postconditions:</term><listitem><computeroutput><link linkend="id13-bb">size</link>() == 0</computeroutput></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> InputIterator<phrase role="special">></phrase>
213 <anchor id="id2-bb"/><phrase role="identifier">unordered_set</phrase><phrase role="special">(</phrase><phrase role="identifier">InputIterator</phrase> f<phrase role="special">,</phrase> <phrase role="identifier">InputIterator</phrase> l<phrase role="special">,</phrase>
214 <phrase role="identifier">size_type</phrase> n <phrase role="special">=</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis><phrase role="special">,</phrase>
215 <phrase role="identifier">hasher</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> hf <phrase role="special">=</phrase> <phrase role="identifier">hasher</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
216 <phrase role="identifier">key_equal</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> eq <phrase role="special">=</phrase> <phrase role="identifier">key_equal</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
217 <phrase role="identifier">allocator_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> a <phrase role="special">=</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.</para></listitem><listitem><para><literallayout class="monospaced"><anchor id="id3-bb"/><phrase role="identifier">unordered_set</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.</para><variablelist spacing="compact"><?dbhtml
218 list-presentation="table"
219 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>value_type</computeroutput> is copy constructible</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id4-bb"/><phrase role="identifier">unordered_set</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase> <phrase role="special">&&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>The move constructor.</para><variablelist spacing="compact"><?dbhtml
220 list-presentation="table"
221 ?><varlistentry><term>Notes:</term><listitem><para>This is emulated on compilers without rvalue references.</para></listitem></varlistentry><varlistentry><term>Requires:</term><listitem><para>
222 <computeroutput>value_type</computeroutput> is move constructible.
223 (TODO: This is not actually required in this implementation).
224 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">explicit</phrase> <anchor id="id5-bb"/><phrase role="identifier">unordered_set</phrase><phrase role="special">(</phrase><phrase role="identifier">Allocator</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> a<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Constructs an empty container, using allocator <computeroutput>a</computeroutput>.</para></listitem><listitem><para><literallayout class="monospaced"><anchor id="id6-bb"/><phrase role="identifier">unordered_set</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> x<phrase role="special">,</phrase> <phrase role="identifier">Allocator</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> a<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Constructs an container, copying <computeroutput>x</computeroutput>'s contained elements, hash function, predicate, maximum load factor, but using allocator <computeroutput>a</computeroutput>.</para></listitem><listitem><para><literallayout class="monospaced"><anchor id="id7-bb"/><phrase role="special">~</phrase><phrase role="identifier">unordered_set</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
225 list-presentation="table"
226 ?><varlistentry><term>Notes:</term><listitem><para>The destructor is applied to every element, and all memory is deallocated</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><para><literallayout class="monospaced"><phrase role="identifier">unordered_set</phrase><phrase role="special">&</phrase> <anchor id="id8-bb"/><phrase role="keyword">operator</phrase><phrase role="special">=</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>The assignment operator. Copies the contained elements, hash function, predicate and maximum load factor but not the allocator.</para><variablelist spacing="compact"><?dbhtml
227 list-presentation="table"
228 ?><varlistentry><term>Notes:</term><listitem><para>
229 On compilers without rvalue references, there is a single assignment
230 operator with the signature <computeroutput>operator=(unordered_set)</computeroutput>
231 in order to emulate move semantics.
232 </para></listitem></varlistentry><varlistentry><term>Requires:</term><listitem><para><computeroutput>value_type</computeroutput> is copy constructible</para></listitem></varlistentry></variablelist><para><literallayout class="monospaced"><phrase role="identifier">unordered_set</phrase><phrase role="special">&</phrase> <anchor id="id9-bb"/><phrase role="keyword">operator</phrase><phrase role="special">=</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase> <phrase role="special">&&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>The move assignment operator.</para><variablelist spacing="compact"><?dbhtml
233 list-presentation="table"
234 ?><varlistentry><term>Notes:</term><listitem><para>
235 On compilers without rvalue references, there is a single assignment
236 operator with the signature <computeroutput>operator=(unordered_set)</computeroutput>
237 in order to emulate move semantics.
238 </para></listitem></varlistentry><varlistentry><term>Requires:</term><listitem><para>
239 <computeroutput>value_type</computeroutput> is move constructible.
240 (TODO: This is not actually required in this implementation).
241 </para></listitem></varlistentry></variablelist><para><literallayout class="monospaced"><phrase role="identifier">allocator_type</phrase> <anchor id="id10-bb"/><phrase role="identifier">get_allocator</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><refsect2><title><anchor id="id11-bb"/><computeroutput>unordered_set</computeroutput> size and capacity</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">bool</phrase> <anchor id="id12-bb"/><phrase role="identifier">empty</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
242 list-presentation="table"
243 ?><varlistentry><term>Returns:</term><listitem><computeroutput><link linkend="id13-bb">size</link>() == 0</computeroutput></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id13-bb"/><phrase role="identifier">size</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
244 list-presentation="table"
245 ?><varlistentry><term>Returns:</term><listitem><computeroutput>std::distance(<link linkend="id16-bb">begin</link>(), <link linkend="id19-bb">end</link>())</computeroutput></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id14-bb"/><phrase role="identifier">max_size</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
246 list-presentation="table"
247 ?><varlistentry><term>Returns:</term><listitem><computeroutput><link linkend="id13-bb">size</link>()</computeroutput> of the largest possible container.
248 </listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id15-bb"/><computeroutput>unordered_set</computeroutput> iterators</title><orderedlist><listitem><para><literallayout class="monospaced"><anchor id="id16-bb"/><phrase role="identifier">iterator</phrase> <anchor id="id17-bb"/><phrase role="identifier">begin</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
249 <phrase role="identifier">const_iterator</phrase> <anchor id="id18-bb"/><phrase role="identifier">begin</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
250 list-presentation="table"
251 ?><varlistentry><term>Returns:</term><listitem>An iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
252 </listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id19-bb"/><phrase role="identifier">iterator</phrase> <anchor id="id20-bb"/><phrase role="identifier">end</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
253 <phrase role="identifier">const_iterator</phrase> <anchor id="id21-bb"/><phrase role="identifier">end</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
254 list-presentation="table"
255 ?><varlistentry><term>Returns:</term><listitem>An iterator which refers to the past-the-end value for the container.
256 </listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">const_iterator</phrase> <anchor id="id22-bb"/><phrase role="identifier">cbegin</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
257 list-presentation="table"
258 ?><varlistentry><term>Returns:</term><listitem>A constant iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
259 </listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">const_iterator</phrase> <anchor id="id23-bb"/><phrase role="identifier">cend</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
260 list-presentation="table"
261 ?><varlistentry><term>Returns:</term><listitem>A constant iterator which refers to the past-the-end value for the container.
262 </listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id24-bb"/><computeroutput>unordered_set</computeroutput> modifiers</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase><phrase role="special">...</phrase> Args<phrase role="special">></phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">iterator</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase><phrase role="special">></phrase> <anchor id="id25-bb"/><phrase role="identifier">emplace</phrase><phrase role="special">(</phrase><phrase role="identifier">Args</phrase><phrase role="special">&&</phrase><phrase role="special">...</phrase> args<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts an object, constructed with the arguments <computeroutput>args</computeroutput>, in the container if and only if there is no element in the container with an equivalent value.</para><variablelist spacing="compact"><?dbhtml
263 list-presentation="table"
264 ?><varlistentry><term>Returns:</term><listitem><para>The bool component of the return type is true if an insert took place.</para><para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para><para>If the compiler doesn't support variadic template arguments or rvalue
265 references, this is emulated for up to 10 arguments, with no support
266 for rvalue references or move semantics.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase><phrase role="special">...</phrase> Args<phrase role="special">></phrase>
267 <phrase role="identifier">iterator</phrase> <anchor id="id26-bb"/><phrase role="identifier">emplace_hint</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> hint<phrase role="special">,</phrase> <phrase role="identifier">Args</phrase><phrase role="special">&&</phrase><phrase role="special">...</phrase> args<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts an object, constructed with the arguments <computeroutput>args</computeroutput>, in the container if and only if there is no element in the container with an equivalent value.</para><para>hint is a suggestion to where the element should be inserted.</para><variablelist spacing="compact"><?dbhtml
268 list-presentation="table"
269 ?><varlistentry><term>Returns:</term><listitem><para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value. </para><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para><para>If the compiler doesn't support variadic template arguments or rvalue
270 references, this is emulated for up to 10 arguments, with no support
271 for rvalue references or move semantics.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">iterator</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase><phrase role="special">></phrase> <anchor id="id27-bb"/><phrase role="identifier">insert</phrase><phrase role="special">(</phrase><phrase role="identifier">value_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> obj<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts obj in the container if and only if there is no element in the container with an equivalent value.</para><variablelist spacing="compact"><?dbhtml
272 list-presentation="table"
273 ?><varlistentry><term>Returns:</term><listitem><para>The bool component of the return type is true if an insert took place.</para><para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">iterator</phrase> <anchor id="id28-bb"/><phrase role="identifier">insert</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> hint<phrase role="special">,</phrase> <phrase role="identifier">value_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> obj<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts obj in the container if and only if there is no element in the container with an equivalent value.</para><para>hint is a suggestion to where the element should be inserted.</para><variablelist spacing="compact"><?dbhtml
274 list-presentation="table"
275 ?><varlistentry><term>Returns:</term><listitem><para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value. </para><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> InputIterator<phrase role="special">></phrase>
276 <phrase role="keyword">void</phrase> <anchor id="id29-bb"/><phrase role="identifier">insert</phrase><phrase role="special">(</phrase><phrase role="identifier">InputIterator</phrase> first<phrase role="special">,</phrase> <phrase role="identifier">InputIterator</phrase> last<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts a range of elements into the container. Elements are inserted if and only if there is no element in the container with an equivalent value.</para><variablelist spacing="compact"><?dbhtml
277 list-presentation="table"
278 ?><varlistentry><term>Throws:</term><listitem><para>When inserting a single element, if an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">iterator</phrase> <anchor id="id30-bb"/><phrase role="identifier">erase</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> position<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erase the element pointed to by <computeroutput>position</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
279 list-presentation="table"
280 ?><varlistentry><term>Returns:</term><listitem><para>The iterator following <computeroutput>position</computeroutput> before the erasure.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para><para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>
281 When the number of elements is a lot smaller than the number of buckets
282 this function can be very inefficient as it has to search through empty
283 buckets for the next element, in order to return the iterator.
284 The method <link linkend="id33-bb">quick_erase</link> is faster, but has yet
286 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id31-bb"/><phrase role="identifier">erase</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erase all elements with key equivalent to <computeroutput>k</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
287 list-presentation="table"
288 ?><varlistentry><term>Returns:</term><listitem><para>The number of elements erased.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">iterator</phrase> <anchor id="id32-bb"/><phrase role="identifier">erase</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> first<phrase role="special">,</phrase> <phrase role="identifier">const_iterator</phrase> last<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erases the elements in the range from <computeroutput>first</computeroutput> to <computeroutput>last</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
289 list-presentation="table"
290 ?><varlistentry><term>Returns:</term><listitem><para>The iterator following the erased elements - i.e. <computeroutput>last</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para><para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id33-bb"/><phrase role="identifier">quick_erase</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> position<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erase the element pointed to by <computeroutput>position</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
291 list-presentation="table"
292 ?><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para><para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>
293 This method is faster than <link linkend="id30-bb">erase</link> as
294 it doesn't have to find the next element in the container -
295 a potentially costly operation.
297 As it hasn't been standardized, it's likely that this may
298 change in the future.
299 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id34-bb"/><phrase role="identifier">erase_return_void</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> position<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erase the element pointed to by <computeroutput>position</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
300 list-presentation="table"
301 ?><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para><para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>
302 This method is now deprecated, use
303 quick_return instead. Although be
304 warned that as that isn't standardized yet, it could also
306 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id35-bb"/><phrase role="identifier">clear</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erases all elements in the container.</para><variablelist spacing="compact"><?dbhtml
307 list-presentation="table"
308 ?><varlistentry><term>Postconditions:</term><listitem><para><computeroutput><link linkend="id13-bb">size</link>() == 0</computeroutput></para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>Never throws an exception.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id36-bb"/><phrase role="identifier">swap</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
309 list-presentation="table"
310 ?><varlistentry><term>Throws:</term><listitem><para>If the allocators are equal, doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of <computeroutput>key_equal</computeroutput> or <computeroutput>hasher</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>For a discussion of the behavior when allocators aren't equal see
311 <link linkend="unordered.rationale.swapping_containers_with_unequal_allocators">the implementation details</link>.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id37-bb"/><computeroutput>unordered_set</computeroutput> observers</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="identifier">hasher</phrase> <anchor id="id38-bb"/><phrase role="identifier">hash_function</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
312 list-presentation="table"
313 ?><varlistentry><term>Returns:</term><listitem>The container's hash function.
314 </listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">key_equal</phrase> <anchor id="id39-bb"/><phrase role="identifier">key_eq</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
315 list-presentation="table"
316 ?><varlistentry><term>Returns:</term><listitem>The container's key equality predicate.
317 </listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id40-bb"/><computeroutput>unordered_set</computeroutput> lookup</title><orderedlist><listitem><para><literallayout class="monospaced"><anchor id="id41-bb"/><phrase role="identifier">iterator</phrase> <anchor id="id42-bb"/><phrase role="identifier">find</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase><phrase role="special">;</phrase>
318 <phrase role="identifier">const_iterator</phrase> <anchor id="id43-bb"/><phrase role="identifier">find</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
319 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> CompatibleKey<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> CompatibleHash<phrase role="special">,</phrase>
320 <phrase role="keyword">typename</phrase> CompatiblePredicate<phrase role="special">></phrase>
321 <phrase role="identifier">iterator</phrase> <anchor id="id44-bb"/><phrase role="identifier">find</phrase><phrase role="special">(</phrase><phrase role="identifier">CompatibleKey</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">,</phrase> <phrase role="identifier">CompatibleHash</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> hash<phrase role="special">,</phrase>
322 <phrase role="identifier">CompatiblePredicate</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> eq<phrase role="special">)</phrase><phrase role="special">;</phrase>
323 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> CompatibleKey<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> CompatibleHash<phrase role="special">,</phrase>
324 <phrase role="keyword">typename</phrase> CompatiblePredicate<phrase role="special">></phrase>
325 <phrase role="identifier">const_iterator</phrase>
326 <anchor id="id45-bb"/><phrase role="identifier">find</phrase><phrase role="special">(</phrase><phrase role="identifier">CompatibleKey</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">,</phrase> <phrase role="identifier">CompatibleHash</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> hash<phrase role="special">,</phrase>
327 <phrase role="identifier">CompatiblePredicate</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> eq<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
328 list-presentation="table"
329 ?><varlistentry><term>Returns:</term><listitem><para>An iterator pointing to an element with key equivalent to <computeroutput>k</computeroutput>, or <computeroutput>b.end()</computeroutput> if no such element exists.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>
330 The templated overloads are a non-standard extensions which
331 allows you to use a compatible hash function and equality
332 predicate for a key of a different type in order to avoid
333 an expensive type cast. In general, its use is not encouraged.
334 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id46-bb"/><phrase role="identifier">count</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
335 list-presentation="table"
336 ?><varlistentry><term>Returns:</term><listitem><para>The number of elements with key equivalent to <computeroutput>k</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id47-bb"/><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">iterator</phrase><phrase role="special">></phrase> <anchor id="id48-bb"/><phrase role="identifier">equal_range</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase><phrase role="special">;</phrase>
337 <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">const_iterator</phrase><phrase role="special">></phrase> <anchor id="id49-bb"/><phrase role="identifier">equal_range</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
338 list-presentation="table"
339 ?><varlistentry><term>Returns:</term><listitem><para>A range containing all elements with key equivalent to <computeroutput>k</computeroutput>.
340 If the container doesn't container any such elements, returns
341 <computeroutput>std::make_pair(b.end(),b.end())</computeroutput>.
342 </para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id50-bb"/><computeroutput>unordered_set</computeroutput> bucket interface</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id51-bb"/><phrase role="identifier">bucket_count</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
343 list-presentation="table"
344 ?><varlistentry><term>Returns:</term><listitem><para>The number of buckets.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id52-bb"/><phrase role="identifier">max_bucket_count</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
345 list-presentation="table"
346 ?><varlistentry><term>Returns:</term><listitem><para>An upper bound on the number of buckets.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id53-bb"/><phrase role="identifier">bucket_size</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
347 list-presentation="table"
348 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n < <link linkend="id51-bb">bucket_count</link>()</computeroutput></para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>The number of elements in bucket <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id54-bb"/><phrase role="identifier">bucket</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
349 list-presentation="table"
350 ?><varlistentry><term>Returns:</term><listitem><para>The index of the bucket which would contain an element with key <computeroutput>k</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Postconditions:</term><listitem><para>The return value is less than <computeroutput>bucket_count()</computeroutput></para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id55-bb"/><phrase role="identifier">local_iterator</phrase> <anchor id="id56-bb"/><phrase role="identifier">begin</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase><phrase role="special">;</phrase>
351 <phrase role="identifier">const_local_iterator</phrase> <anchor id="id57-bb"/><phrase role="identifier">begin</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
352 list-presentation="table"
353 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n</computeroutput> shall be in the range <computeroutput>[0, bucket_count())</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A local iterator pointing the first element in the bucket with index <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id58-bb"/><phrase role="identifier">local_iterator</phrase> <anchor id="id59-bb"/><phrase role="identifier">end</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase><phrase role="special">;</phrase>
354 <phrase role="identifier">const_local_iterator</phrase> <anchor id="id60-bb"/><phrase role="identifier">end</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
355 list-presentation="table"
356 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n</computeroutput> shall be in the range <computeroutput>[0, bucket_count())</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A local iterator pointing the 'one past the end' element in the bucket with index <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">const_local_iterator</phrase> <anchor id="id61-bb"/><phrase role="identifier">cbegin</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
357 list-presentation="table"
358 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n</computeroutput> shall be in the range <computeroutput>[0, bucket_count())</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A constant local iterator pointing the first element in the bucket with index <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">const_local_iterator</phrase> <anchor id="id62-bb"/><phrase role="identifier">cend</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
359 list-presentation="table"
360 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n</computeroutput> shall be in the range <computeroutput>[0, bucket_count())</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A constant local iterator pointing the 'one past the end' element in the bucket with index <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id63-bb"/><computeroutput>unordered_set</computeroutput> hash policy</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">float</phrase> <anchor id="id64-bb"/><phrase role="identifier">load_factor</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
361 list-presentation="table"
362 ?><varlistentry><term>Returns:</term><listitem><para>The average number of elements per bucket.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">float</phrase> <anchor id="id65-bb"/><phrase role="identifier">max_load_factor</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
363 list-presentation="table"
364 ?><varlistentry><term>Returns:</term><listitem><para>Returns the current maximum load factor.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id66-bb"/><phrase role="identifier">max_load_factor</phrase><phrase role="special">(</phrase><phrase role="keyword">float</phrase> z<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
365 list-presentation="table"
366 ?><varlistentry><term>Effects:</term><listitem><para>Changes the container's maximum load factor, using <computeroutput>z</computeroutput> as a hint.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id67-bb"/><phrase role="identifier">rehash</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Changes the number of buckets so that there at least <computeroutput>n</computeroutput> buckets, and so that the load factor is less than the maximum load factor.</para><para>Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.</para><variablelist spacing="compact"><?dbhtml
367 list-presentation="table"
368 ?><varlistentry><term>Throws:</term><listitem><para>The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id68-bb"/><computeroutput>unordered_set</computeroutput> Equality Comparisons</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
369 <phrase role="keyword">bool</phrase> <anchor id="boost.unordered_set.operator==_id1"/><phrase role="keyword">operator</phrase><phrase role="special">==</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> x<phrase role="special">,</phrase>
370 <phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> y<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
371 list-presentation="table"
372 ?><varlistentry><term>Notes:</term><listitem><para>This is a boost extension.</para><para>Behavior is undefined if the two containers don't have
373 equivalent equality predicates.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
374 <phrase role="keyword">bool</phrase> <anchor id="boost.unordered_set.operator!=_id1"/><phrase role="keyword">operator</phrase><phrase role="special">!=</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> x<phrase role="special">,</phrase>
375 <phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> y<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
376 list-presentation="table"
377 ?><varlistentry><term>Notes:</term><listitem><para>This is a boost extension.</para><para>Behavior is undefined if the two containers don't have
378 equivalent equality predicates.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id69-bb"/><computeroutput>unordered_set</computeroutput> swap</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
379 <phrase role="keyword">void</phrase> <anchor id="boost.unordered_set.swap_id1"/><phrase role="identifier">swap</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase> x<phrase role="special">,</phrase>
380 <phrase role="identifier">unordered_set</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase> y<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
381 list-presentation="table"
382 ?><varlistentry><term>Effects:</term><listitem><para><computeroutput>x.swap(y)</computeroutput></para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If the allocators are equal, doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of <computeroutput>Hash</computeroutput> or <computeroutput>Pred</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>For a discussion of the behavior when allocators aren't equal see
383 <link linkend="unordered.rationale.swapping_containers_with_unequal_allocators">the implementation details</link>.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2></refsect1></refentry><refentry xmlns:xi="http://www.w3.org/2001/XInclude" id="boost.unordered_multiset"><refmeta><refentrytitle>Class template unordered_multiset</refentrytitle><manvolnum>3</manvolnum></refmeta><refnamediv><refname>boost::unordered_multiset</refname><refpurpose>
384 An unordered associative container that stores values. The same key can be stored multiple times.
385 </refpurpose></refnamediv><refsynopsisdiv><synopsis><phrase role="comment">// In header: <<link linkend="header.boost.unordered_set_hpp">boost/unordered_set.hpp</link>>
387 </phrase><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">hash</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">></phrase><phrase role="special">,</phrase>
388 <phrase role="keyword">typename</phrase> Pred <phrase role="special">=</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">equal_to</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">></phrase><phrase role="special">,</phrase>
389 <phrase role="keyword">typename</phrase> Alloc <phrase role="special">=</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">allocator</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">></phrase> <phrase role="special">></phrase>
390 <phrase role="keyword">class</phrase> <link linkend="boost.unordered_multiset">unordered_multiset</link> <phrase role="special">{</phrase>
391 <phrase role="keyword">public</phrase><phrase role="special">:</phrase>
392 <phrase role="comment">// <link linkend="boost.unordered_multisettypes">types</link></phrase>
393 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Value</phrase> <anchor id="boost.unordered_multiset.key_type"/><phrase role="identifier">key_type</phrase><phrase role="special">;</phrase>
394 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Value</phrase> <anchor id="boost.unordered_multiset.value_type"/><phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
395 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Hash</phrase> <anchor id="boost.unordered_multiset.hasher"/><phrase role="identifier">hasher</phrase><phrase role="special">;</phrase>
396 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Pred</phrase> <anchor id="boost.unordered_multiset.key_equal"/><phrase role="identifier">key_equal</phrase><phrase role="special">;</phrase>
397 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Alloc</phrase> <anchor id="boost.unordered_multiset.allocator_type"/><phrase role="identifier">allocator_type</phrase><phrase role="special">;</phrase>
398 <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">::</phrase><phrase role="identifier">pointer</phrase> <anchor id="boost.unordered_multiset.pointer"/><phrase role="identifier">pointer</phrase><phrase role="special">;</phrase>
399 <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">::</phrase><phrase role="identifier">const_pointer</phrase> <anchor id="boost.unordered_multiset.const_pointer"/><phrase role="identifier">const_pointer</phrase><phrase role="special">;</phrase>
400 <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">::</phrase><phrase role="identifier">reference</phrase> <anchor id="boost.unordered_multiset.reference"/><phrase role="identifier">reference</phrase><phrase role="special">;</phrase> <phrase role="comment">// lvalue of value_type.</phrase>
401 <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">::</phrase><phrase role="identifier">const_reference</phrase> <anchor id="boost.unordered_multiset.const_reference"/><phrase role="identifier">const_reference</phrase><phrase role="special">;</phrase> <phrase role="comment">// const lvalue of value_type.</phrase>
402 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_multiset.size_type"><phrase role="identifier">size_type</phrase></link><phrase role="special">;</phrase>
403 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_multiset.difference_type"><phrase role="identifier">difference_type</phrase></link><phrase role="special">;</phrase>
404 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_multiset.iterator"><phrase role="identifier">iterator</phrase></link><phrase role="special">;</phrase>
405 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_multiset.const_iterator"><phrase role="identifier">const_iterator</phrase></link><phrase role="special">;</phrase>
406 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_multiset.local_iterator"><phrase role="identifier">local_iterator</phrase></link><phrase role="special">;</phrase>
407 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_multiset.const_local_iterator"><phrase role="identifier">const_local_iterator</phrase></link><phrase role="special">;</phrase>
409 <phrase role="comment">// <link linkend="boost.unordered_multisetconstruct-copy-destruct">construct/copy/destruct</link></phrase>
410 <phrase role="keyword">explicit</phrase> <link linkend="id70-bb"><phrase role="identifier">unordered_multiset</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> <phrase role="special">=</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis><phrase role="special">,</phrase>
411 <phrase role="identifier">hasher</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">hasher</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
412 <phrase role="identifier">key_equal</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">key_equal</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
413 <phrase role="identifier">allocator_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
414 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> InputIterator<phrase role="special">></phrase>
415 <link linkend="id71-bb"><phrase role="identifier">unordered_multiset</phrase></link><phrase role="special">(</phrase><phrase role="identifier">InputIterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">InputIterator</phrase><phrase role="special">,</phrase>
416 <phrase role="identifier">size_type</phrase> <phrase role="special">=</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis><phrase role="special">,</phrase>
417 <phrase role="identifier">hasher</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">hasher</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
418 <phrase role="identifier">key_equal</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">key_equal</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
419 <phrase role="identifier">allocator_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
420 <link linkend="id72-bb"><phrase role="identifier">unordered_multiset</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
421 <link linkend="id73-bb"><phrase role="identifier">unordered_multiset</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase> <phrase role="special">&&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
422 <phrase role="keyword">explicit</phrase> <link linkend="id74-bb"><phrase role="identifier">unordered_multiset</phrase></link><phrase role="special">(</phrase><phrase role="identifier">Allocator</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
423 <link linkend="id75-bb"><phrase role="identifier">unordered_multiset</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase> <phrase role="identifier">Allocator</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
424 <link linkend="id76-bb"><phrase role="special">~</phrase><phrase role="identifier">unordered_multiset</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
425 <phrase role="identifier">unordered_multiset</phrase><phrase role="special">&</phrase> <link linkend="id77-bb"><phrase role="keyword">operator</phrase><phrase role="special">=</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
426 <phrase role="identifier">unordered_multiset</phrase><phrase role="special">&</phrase> <link linkend="id78-bb"><phrase role="keyword">operator</phrase><phrase role="special">=</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase> <phrase role="special">&&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
427 <phrase role="identifier">allocator_type</phrase> <link linkend="id79-bb"><phrase role="identifier">get_allocator</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
429 <phrase role="comment">// <link linkend="id80-bb">size and capacity</link></phrase>
430 <phrase role="keyword">bool</phrase> <link linkend="id81-bb"><phrase role="identifier">empty</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
431 <phrase role="identifier">size_type</phrase> <link linkend="id82-bb"><phrase role="identifier">size</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
432 <phrase role="identifier">size_type</phrase> <link linkend="id83-bb"><phrase role="identifier">max_size</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
434 <phrase role="comment">// <link linkend="id84-bb">iterators</link></phrase>
435 <phrase role="identifier">iterator</phrase> <link linkend="id86-bb"><phrase role="identifier">begin</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
436 <phrase role="identifier">const_iterator</phrase> <link linkend="id87-bb"><phrase role="identifier">begin</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
437 <phrase role="identifier">iterator</phrase> <link linkend="id89-bb"><phrase role="identifier">end</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
438 <phrase role="identifier">const_iterator</phrase> <link linkend="id90-bb"><phrase role="identifier">end</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
439 <phrase role="identifier">const_iterator</phrase> <link linkend="id91-bb"><phrase role="identifier">cbegin</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
440 <phrase role="identifier">const_iterator</phrase> <link linkend="id92-bb"><phrase role="identifier">cend</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
442 <phrase role="comment">// <link linkend="id93-bb">modifiers</link></phrase>
443 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase><phrase role="special">...</phrase> Args<phrase role="special">></phrase> <phrase role="identifier">iterator</phrase> <link linkend="id94-bb"><phrase role="identifier">emplace</phrase></link><phrase role="special">(</phrase><phrase role="identifier">Args</phrase><phrase role="special">&&</phrase><phrase role="special">...</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
444 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase><phrase role="special">...</phrase> Args<phrase role="special">></phrase> <phrase role="identifier">iterator</phrase> <link linkend="id95-bb"><phrase role="identifier">emplace_hint</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">Args</phrase><phrase role="special">&&</phrase><phrase role="special">...</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
445 <phrase role="identifier">iterator</phrase> <link linkend="id96-bb"><phrase role="identifier">insert</phrase></link><phrase role="special">(</phrase><phrase role="identifier">value_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
446 <phrase role="identifier">iterator</phrase> <link linkend="id97-bb"><phrase role="identifier">insert</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">value_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
447 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> InputIterator<phrase role="special">></phrase> <phrase role="keyword">void</phrase> <link linkend="id98-bb"><phrase role="identifier">insert</phrase></link><phrase role="special">(</phrase><phrase role="identifier">InputIterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">InputIterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
448 <phrase role="identifier">iterator</phrase> <link linkend="id99-bb"><phrase role="identifier">erase</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
449 <phrase role="identifier">size_type</phrase> <link linkend="id100-bb"><phrase role="identifier">erase</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
450 <phrase role="identifier">iterator</phrase> <link linkend="id101-bb"><phrase role="identifier">erase</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">const_iterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
451 <phrase role="keyword">void</phrase> <link linkend="id102-bb"><phrase role="identifier">quick_erase</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
452 <phrase role="keyword">void</phrase> <link linkend="id103-bb"><phrase role="identifier">erase_return_void</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
453 <phrase role="keyword">void</phrase> <link linkend="id104-bb"><phrase role="identifier">clear</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
454 <phrase role="keyword">void</phrase> <link linkend="id105-bb"><phrase role="identifier">swap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
456 <phrase role="comment">// <link linkend="id106-bb">observers</link></phrase>
457 <phrase role="identifier">hasher</phrase> <link linkend="id107-bb"><phrase role="identifier">hash_function</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
458 <phrase role="identifier">key_equal</phrase> <link linkend="id108-bb"><phrase role="identifier">key_eq</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
460 <phrase role="comment">// <link linkend="id109-bb">lookup</link></phrase>
461 <phrase role="identifier">iterator</phrase> <link linkend="id111-bb"><phrase role="identifier">find</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
462 <phrase role="identifier">const_iterator</phrase> <link linkend="id112-bb"><phrase role="identifier">find</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
463 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> CompatibleKey<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> CompatibleHash<phrase role="special">,</phrase>
464 <phrase role="keyword">typename</phrase> CompatiblePredicate<phrase role="special">></phrase>
465 <phrase role="identifier">iterator</phrase> <link linkend="id113-bb"><phrase role="identifier">find</phrase></link><phrase role="special">(</phrase><phrase role="identifier">CompatibleKey</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase> <phrase role="identifier">CompatibleHash</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
466 <phrase role="identifier">CompatiblePredicate</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
467 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> CompatibleKey<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> CompatibleHash<phrase role="special">,</phrase>
468 <phrase role="keyword">typename</phrase> CompatiblePredicate<phrase role="special">></phrase>
469 <phrase role="identifier">const_iterator</phrase>
470 <link linkend="id114-bb"><phrase role="identifier">find</phrase></link><phrase role="special">(</phrase><phrase role="identifier">CompatibleKey</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase> <phrase role="identifier">CompatibleHash</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
471 <phrase role="identifier">CompatiblePredicate</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
472 <phrase role="identifier">size_type</phrase> <link linkend="id115-bb"><phrase role="identifier">count</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
473 <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">iterator</phrase><phrase role="special">></phrase> <link linkend="id117-bb"><phrase role="identifier">equal_range</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
474 <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">const_iterator</phrase><phrase role="special">></phrase> <link linkend="id118-bb"><phrase role="identifier">equal_range</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
476 <phrase role="comment">// <link linkend="id119-bb">bucket interface</link></phrase>
477 <phrase role="identifier">size_type</phrase> <link linkend="id120-bb"><phrase role="identifier">bucket_count</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
478 <phrase role="identifier">size_type</phrase> <link linkend="id121-bb"><phrase role="identifier">max_bucket_count</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
479 <phrase role="identifier">size_type</phrase> <link linkend="id122-bb"><phrase role="identifier">bucket_size</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
480 <phrase role="identifier">size_type</phrase> <link linkend="id123-bb"><phrase role="identifier">bucket</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
481 <phrase role="identifier">local_iterator</phrase> <link linkend="id125-bb"><phrase role="identifier">begin</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
482 <phrase role="identifier">const_local_iterator</phrase> <link linkend="id126-bb"><phrase role="identifier">begin</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
483 <phrase role="identifier">local_iterator</phrase> <link linkend="id128-bb"><phrase role="identifier">end</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
484 <phrase role="identifier">const_local_iterator</phrase> <link linkend="id129-bb"><phrase role="identifier">end</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
485 <phrase role="identifier">const_local_iterator</phrase> <link linkend="id130-bb"><phrase role="identifier">cbegin</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
486 <phrase role="identifier">const_local_iterator</phrase> <link linkend="id131-bb"><phrase role="identifier">cend</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
488 <phrase role="comment">// <link linkend="id132-bb">hash policy</link></phrase>
489 <phrase role="keyword">float</phrase> <link linkend="id133-bb"><phrase role="identifier">load_factor</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
490 <phrase role="keyword">float</phrase> <link linkend="id134-bb"><phrase role="identifier">max_load_factor</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
491 <phrase role="keyword">void</phrase> <link linkend="id135-bb"><phrase role="identifier">max_load_factor</phrase></link><phrase role="special">(</phrase><phrase role="keyword">float</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
492 <phrase role="keyword">void</phrase> <link linkend="id136-bb"><phrase role="identifier">rehash</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
493 <phrase role="special">}</phrase><phrase role="special">;</phrase>
495 <phrase role="comment">// <link linkend="id137-bb">Equality Comparisons</link></phrase>
496 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
497 <phrase role="keyword">bool</phrase> <link linkend="boost.unordered_multiset.operator==_id1"><phrase role="keyword">operator</phrase><phrase role="special">==</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
498 <phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
499 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
500 <phrase role="keyword">bool</phrase> <link linkend="boost.unordered_multiset.operator!=_id1"><phrase role="keyword">operator</phrase><phrase role="special">!=</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
501 <phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
503 <phrase role="comment">// <link linkend="id138-bb">swap</link></phrase>
504 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
505 <phrase role="keyword">void</phrase> <link linkend="boost.unordered_multiset.swap_id1"><phrase role="identifier">swap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
506 <phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></synopsis></refsynopsisdiv><refsect1><title>Description</title>
507 <para>Based on chapter 23 of
508 <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2960.pdf">the working draft of the C++ standard [n2960]</ulink>.
509 But without the updated rules for allocators.
511 <para><emphasis role="bold">Template Parameters</emphasis>
516 <entry><emphasis>Value</emphasis></entry>
517 <entry>Value must be Assignable and CopyConstructible</entry></row>
519 <entry><emphasis>Hash</emphasis></entry>
520 <entry>A unary function object type that acts a hash function for a <computeroutput>Value</computeroutput>. It takes a single argument of type <computeroutput>Value</computeroutput> and returns a value of type std::size_t.</entry></row>
522 <entry><emphasis>Pred</emphasis></entry>
523 <entry>A binary function object that implements an equivalence relation on values of type <computeroutput>Value</computeroutput>.
524 A binary function object that induces an equivalence relation on values of type Key.
525 It takes two arguments of type Key and returns a value of type bool.</entry></row>
527 <entry><emphasis>Alloc</emphasis></entry>
528 <entry>An allocator whose value type is the same as the container's value type.</entry></row></tbody></tgroup></informaltable></para>
529 <para>The elements are organized into buckets. Keys with the same hash code are stored in the same bucket and elements with equivalent keys are stored next to each other.</para>
530 <para>The number of buckets can be automatically increased by a call to insert, or as the result of calling rehash.</para>
531 <refsect2><title><anchor id="boost.unordered_multisettypes"/><computeroutput>unordered_multiset</computeroutput>
533 types</title><orderedlist><listitem><para>
534 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_multiset.size_type"/><phrase role="identifier">size_type</phrase><phrase role="special">;</phrase></para>
535 <para>An unsigned integral type.</para>
536 <para>size_type can represent any non-negative value of difference_type.</para>
537 </listitem><listitem><para>
538 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_multiset.difference_type"/><phrase role="identifier">difference_type</phrase><phrase role="special">;</phrase></para>
539 <para>A signed integral type.</para>
540 <para>Is identical to the difference type of iterator and const_iterator.</para>
541 </listitem><listitem><para>
542 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_multiset.iterator"/><phrase role="identifier">iterator</phrase><phrase role="special">;</phrase></para>
543 <para>A constant iterator whose value type is value_type. </para>
544 <para>The iterator category is at least a forward iterator.</para>
545 <para>Convertible to const_iterator.</para>
546 </listitem><listitem><para>
547 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_multiset.const_iterator"/><phrase role="identifier">const_iterator</phrase><phrase role="special">;</phrase></para>
548 <para>A constant iterator whose value type is value_type. </para>
549 <para>The iterator category is at least a forward iterator.</para>
550 </listitem><listitem><para>
551 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_multiset.local_iterator"/><phrase role="identifier">local_iterator</phrase><phrase role="special">;</phrase></para>
552 <para>An iterator with the same value type, difference type and pointer and reference type as iterator.</para>
553 <para>A local_iterator object can be used to iterate through a single bucket.</para>
554 </listitem><listitem><para>
555 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_multiset.const_local_iterator"/><phrase role="identifier">const_local_iterator</phrase><phrase role="special">;</phrase></para>
556 <para>A constant iterator with the same value type, difference type and pointer and reference type as const_iterator.</para>
557 <para>A const_local_iterator object can be used to iterate through a single bucket.</para>
558 </listitem></orderedlist></refsect2><refsect2><title><anchor id="boost.unordered_multisetconstruct-copy-destruct"/><computeroutput>unordered_multiset</computeroutput>
560 construct/copy/destruct</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">explicit</phrase> <anchor id="id70-bb"/><phrase role="identifier">unordered_multiset</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n <phrase role="special">=</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis><phrase role="special">,</phrase>
561 <phrase role="identifier">hasher</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> hf <phrase role="special">=</phrase> <phrase role="identifier">hasher</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
562 <phrase role="identifier">key_equal</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> eq <phrase role="special">=</phrase> <phrase role="identifier">key_equal</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
563 <phrase role="identifier">allocator_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> a <phrase role="special">=</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.</para><variablelist spacing="compact"><?dbhtml
564 list-presentation="table"
565 ?><varlistentry><term>Postconditions:</term><listitem><computeroutput><link linkend="id82-bb">size</link>() == 0</computeroutput></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> InputIterator<phrase role="special">></phrase>
566 <anchor id="id71-bb"/><phrase role="identifier">unordered_multiset</phrase><phrase role="special">(</phrase><phrase role="identifier">InputIterator</phrase> f<phrase role="special">,</phrase> <phrase role="identifier">InputIterator</phrase> l<phrase role="special">,</phrase>
567 <phrase role="identifier">size_type</phrase> n <phrase role="special">=</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis><phrase role="special">,</phrase>
568 <phrase role="identifier">hasher</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> hf <phrase role="special">=</phrase> <phrase role="identifier">hasher</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
569 <phrase role="identifier">key_equal</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> eq <phrase role="special">=</phrase> <phrase role="identifier">key_equal</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
570 <phrase role="identifier">allocator_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> a <phrase role="special">=</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.</para></listitem><listitem><para><literallayout class="monospaced"><anchor id="id72-bb"/><phrase role="identifier">unordered_multiset</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.</para><variablelist spacing="compact"><?dbhtml
571 list-presentation="table"
572 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>value_type</computeroutput> is copy constructible</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id73-bb"/><phrase role="identifier">unordered_multiset</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase> <phrase role="special">&&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>The move constructor.</para><variablelist spacing="compact"><?dbhtml
573 list-presentation="table"
574 ?><varlistentry><term>Notes:</term><listitem><para>This is emulated on compilers without rvalue references.</para></listitem></varlistentry><varlistentry><term>Requires:</term><listitem><para>
575 <computeroutput>value_type</computeroutput> is move constructible.
576 (TODO: This is not actually required in this implementation).
577 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">explicit</phrase> <anchor id="id74-bb"/><phrase role="identifier">unordered_multiset</phrase><phrase role="special">(</phrase><phrase role="identifier">Allocator</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> a<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Constructs an empty container, using allocator <computeroutput>a</computeroutput>.</para></listitem><listitem><para><literallayout class="monospaced"><anchor id="id75-bb"/><phrase role="identifier">unordered_multiset</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> x<phrase role="special">,</phrase> <phrase role="identifier">Allocator</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> a<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Constructs an container, copying <computeroutput>x</computeroutput>'s contained elements, hash function, predicate, maximum load factor, but using allocator <computeroutput>a</computeroutput>.</para></listitem><listitem><para><literallayout class="monospaced"><anchor id="id76-bb"/><phrase role="special">~</phrase><phrase role="identifier">unordered_multiset</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
578 list-presentation="table"
579 ?><varlistentry><term>Notes:</term><listitem><para>The destructor is applied to every element, and all memory is deallocated</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><para><literallayout class="monospaced"><phrase role="identifier">unordered_multiset</phrase><phrase role="special">&</phrase> <anchor id="id77-bb"/><phrase role="keyword">operator</phrase><phrase role="special">=</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>The assignment operator. Copies the contained elements, hash function, predicate and maximum load factor but not the allocator.</para><variablelist spacing="compact"><?dbhtml
580 list-presentation="table"
581 ?><varlistentry><term>Notes:</term><listitem><para>
582 On compilers without rvalue references, there is a single assignment
583 operator with the signature <computeroutput>operator=(unordered_multiset)</computeroutput>
584 in order to emulate move semantics.
585 </para></listitem></varlistentry><varlistentry><term>Requires:</term><listitem><para><computeroutput>value_type</computeroutput> is copy constructible</para></listitem></varlistentry></variablelist><para><literallayout class="monospaced"><phrase role="identifier">unordered_multiset</phrase><phrase role="special">&</phrase> <anchor id="id78-bb"/><phrase role="keyword">operator</phrase><phrase role="special">=</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase> <phrase role="special">&&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>The move assignment operator.</para><variablelist spacing="compact"><?dbhtml
586 list-presentation="table"
587 ?><varlistentry><term>Notes:</term><listitem><para>
588 On compilers without rvalue references, there is a single assignment
589 operator with the signature <computeroutput>operator=(unordered_multiset)</computeroutput>
590 in order to emulate move semantics.
591 </para></listitem></varlistentry><varlistentry><term>Requires:</term><listitem><para>
592 <computeroutput>value_type</computeroutput> is move constructible.
593 (TODO: This is not actually required in this implementation).
594 </para></listitem></varlistentry></variablelist><para><literallayout class="monospaced"><phrase role="identifier">allocator_type</phrase> <anchor id="id79-bb"/><phrase role="identifier">get_allocator</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><refsect2><title><anchor id="id80-bb"/><computeroutput>unordered_multiset</computeroutput> size and capacity</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">bool</phrase> <anchor id="id81-bb"/><phrase role="identifier">empty</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
595 list-presentation="table"
596 ?><varlistentry><term>Returns:</term><listitem><computeroutput><link linkend="id82-bb">size</link>() == 0</computeroutput></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id82-bb"/><phrase role="identifier">size</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
597 list-presentation="table"
598 ?><varlistentry><term>Returns:</term><listitem><computeroutput>std::distance(<link linkend="id85-bb">begin</link>(), <link linkend="id88-bb">end</link>())</computeroutput></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id83-bb"/><phrase role="identifier">max_size</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
599 list-presentation="table"
600 ?><varlistentry><term>Returns:</term><listitem><computeroutput><link linkend="id82-bb">size</link>()</computeroutput> of the largest possible container.
601 </listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id84-bb"/><computeroutput>unordered_multiset</computeroutput> iterators</title><orderedlist><listitem><para><literallayout class="monospaced"><anchor id="id85-bb"/><phrase role="identifier">iterator</phrase> <anchor id="id86-bb"/><phrase role="identifier">begin</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
602 <phrase role="identifier">const_iterator</phrase> <anchor id="id87-bb"/><phrase role="identifier">begin</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
603 list-presentation="table"
604 ?><varlistentry><term>Returns:</term><listitem>An iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
605 </listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id88-bb"/><phrase role="identifier">iterator</phrase> <anchor id="id89-bb"/><phrase role="identifier">end</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
606 <phrase role="identifier">const_iterator</phrase> <anchor id="id90-bb"/><phrase role="identifier">end</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
607 list-presentation="table"
608 ?><varlistentry><term>Returns:</term><listitem>An iterator which refers to the past-the-end value for the container.
609 </listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">const_iterator</phrase> <anchor id="id91-bb"/><phrase role="identifier">cbegin</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
610 list-presentation="table"
611 ?><varlistentry><term>Returns:</term><listitem>A constant iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
612 </listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">const_iterator</phrase> <anchor id="id92-bb"/><phrase role="identifier">cend</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
613 list-presentation="table"
614 ?><varlistentry><term>Returns:</term><listitem>A constant iterator which refers to the past-the-end value for the container.
615 </listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id93-bb"/><computeroutput>unordered_multiset</computeroutput> modifiers</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase><phrase role="special">...</phrase> Args<phrase role="special">></phrase> <phrase role="identifier">iterator</phrase> <anchor id="id94-bb"/><phrase role="identifier">emplace</phrase><phrase role="special">(</phrase><phrase role="identifier">Args</phrase><phrase role="special">&&</phrase><phrase role="special">...</phrase> args<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts an object, constructed with the arguments <computeroutput>args</computeroutput>, in the container.</para><variablelist spacing="compact"><?dbhtml
616 list-presentation="table"
617 ?><varlistentry><term>Returns:</term><listitem><para>An iterator pointing to the inserted element.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para><para>If the compiler doesn't support variadic template arguments or rvalue
618 references, this is emulated for up to 10 arguments, with no support
619 for rvalue references or move semantics.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase><phrase role="special">...</phrase> Args<phrase role="special">></phrase>
620 <phrase role="identifier">iterator</phrase> <anchor id="id95-bb"/><phrase role="identifier">emplace_hint</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> hint<phrase role="special">,</phrase> <phrase role="identifier">Args</phrase><phrase role="special">&&</phrase><phrase role="special">...</phrase> args<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts an object, constructed with the arguments <computeroutput>args</computeroutput>, in the container.</para><para>hint is a suggestion to where the element should be inserted.</para><variablelist spacing="compact"><?dbhtml
621 list-presentation="table"
622 ?><varlistentry><term>Returns:</term><listitem><para>An iterator pointing to the inserted element.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value. </para><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para><para>If the compiler doesn't support variadic template arguments or rvalue
623 references, this is emulated for up to 10 arguments, with no support
624 for rvalue references or move semantics.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">iterator</phrase> <anchor id="id96-bb"/><phrase role="identifier">insert</phrase><phrase role="special">(</phrase><phrase role="identifier">value_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> obj<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts obj in the container.</para><variablelist spacing="compact"><?dbhtml
625 list-presentation="table"
626 ?><varlistentry><term>Returns:</term><listitem><para>An iterator pointing to the inserted element.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">iterator</phrase> <anchor id="id97-bb"/><phrase role="identifier">insert</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> hint<phrase role="special">,</phrase> <phrase role="identifier">value_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> obj<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts obj in the container.</para><para>hint is a suggestion to where the element should be inserted.</para><variablelist spacing="compact"><?dbhtml
627 list-presentation="table"
628 ?><varlistentry><term>Returns:</term><listitem><para>An iterator pointing to the inserted element.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value. </para><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> InputIterator<phrase role="special">></phrase>
629 <phrase role="keyword">void</phrase> <anchor id="id98-bb"/><phrase role="identifier">insert</phrase><phrase role="special">(</phrase><phrase role="identifier">InputIterator</phrase> first<phrase role="special">,</phrase> <phrase role="identifier">InputIterator</phrase> last<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts a range of elements into the container.</para><variablelist spacing="compact"><?dbhtml
630 list-presentation="table"
631 ?><varlistentry><term>Throws:</term><listitem><para>When inserting a single element, if an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">iterator</phrase> <anchor id="id99-bb"/><phrase role="identifier">erase</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> position<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erase the element pointed to by <computeroutput>position</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
632 list-presentation="table"
633 ?><varlistentry><term>Returns:</term><listitem><para>The iterator following <computeroutput>position</computeroutput> before the erasure.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para><para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>
634 When the number of elements is a lot smaller than the number of buckets
635 this function can be very inefficient as it has to search through empty
636 buckets for the next element, in order to return the iterator.
637 The method <link linkend="id102-bb">quick_erase</link> is faster, but has yet
639 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id100-bb"/><phrase role="identifier">erase</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erase all elements with key equivalent to <computeroutput>k</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
640 list-presentation="table"
641 ?><varlistentry><term>Returns:</term><listitem><para>The number of elements erased.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">iterator</phrase> <anchor id="id101-bb"/><phrase role="identifier">erase</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> first<phrase role="special">,</phrase> <phrase role="identifier">const_iterator</phrase> last<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erases the elements in the range from <computeroutput>first</computeroutput> to <computeroutput>last</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
642 list-presentation="table"
643 ?><varlistentry><term>Returns:</term><listitem><para>The iterator following the erased elements - i.e. <computeroutput>last</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para><para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id102-bb"/><phrase role="identifier">quick_erase</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> position<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erase the element pointed to by <computeroutput>position</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
644 list-presentation="table"
645 ?><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para><para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>
646 This method is faster than <link linkend="id99-bb">erase</link> as
647 it doesn't have to find the next element in the container -
648 a potentially costly operation.
650 As it hasn't been standardized, it's likely that this may
651 change in the future.
652 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id103-bb"/><phrase role="identifier">erase_return_void</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> position<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erase the element pointed to by <computeroutput>position</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
653 list-presentation="table"
654 ?><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para><para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>
655 This method is now deprecated, use
656 quick_return instead. Although be
657 warned that as that isn't standardized yet, it could also
659 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id104-bb"/><phrase role="identifier">clear</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erases all elements in the container.</para><variablelist spacing="compact"><?dbhtml
660 list-presentation="table"
661 ?><varlistentry><term>Postconditions:</term><listitem><para><computeroutput><link linkend="id82-bb">size</link>() == 0</computeroutput></para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>Never throws an exception.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id105-bb"/><phrase role="identifier">swap</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
662 list-presentation="table"
663 ?><varlistentry><term>Throws:</term><listitem><para>If the allocators are equal, doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of <computeroutput>key_equal</computeroutput> or <computeroutput>hasher</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>For a discussion of the behavior when allocators aren't equal see
664 <link linkend="unordered.rationale.swapping_containers_with_unequal_allocators">the implementation details</link>.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id106-bb"/><computeroutput>unordered_multiset</computeroutput> observers</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="identifier">hasher</phrase> <anchor id="id107-bb"/><phrase role="identifier">hash_function</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
665 list-presentation="table"
666 ?><varlistentry><term>Returns:</term><listitem>The container's hash function.
667 </listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">key_equal</phrase> <anchor id="id108-bb"/><phrase role="identifier">key_eq</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
668 list-presentation="table"
669 ?><varlistentry><term>Returns:</term><listitem>The container's key equality predicate.
670 </listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id109-bb"/><computeroutput>unordered_multiset</computeroutput> lookup</title><orderedlist><listitem><para><literallayout class="monospaced"><anchor id="id110-bb"/><phrase role="identifier">iterator</phrase> <anchor id="id111-bb"/><phrase role="identifier">find</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase><phrase role="special">;</phrase>
671 <phrase role="identifier">const_iterator</phrase> <anchor id="id112-bb"/><phrase role="identifier">find</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
672 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> CompatibleKey<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> CompatibleHash<phrase role="special">,</phrase>
673 <phrase role="keyword">typename</phrase> CompatiblePredicate<phrase role="special">></phrase>
674 <phrase role="identifier">iterator</phrase> <anchor id="id113-bb"/><phrase role="identifier">find</phrase><phrase role="special">(</phrase><phrase role="identifier">CompatibleKey</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">,</phrase> <phrase role="identifier">CompatibleHash</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> hash<phrase role="special">,</phrase>
675 <phrase role="identifier">CompatiblePredicate</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> eq<phrase role="special">)</phrase><phrase role="special">;</phrase>
676 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> CompatibleKey<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> CompatibleHash<phrase role="special">,</phrase>
677 <phrase role="keyword">typename</phrase> CompatiblePredicate<phrase role="special">></phrase>
678 <phrase role="identifier">const_iterator</phrase>
679 <anchor id="id114-bb"/><phrase role="identifier">find</phrase><phrase role="special">(</phrase><phrase role="identifier">CompatibleKey</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">,</phrase> <phrase role="identifier">CompatibleHash</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> hash<phrase role="special">,</phrase>
680 <phrase role="identifier">CompatiblePredicate</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> eq<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
681 list-presentation="table"
682 ?><varlistentry><term>Returns:</term><listitem><para>An iterator pointing to an element with key equivalent to <computeroutput>k</computeroutput>, or <computeroutput>b.end()</computeroutput> if no such element exists.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>
683 The templated overloads are a non-standard extensions which
684 allows you to use a compatible hash function and equality
685 predicate for a key of a different type in order to avoid
686 an expensive type cast. In general, its use is not encouraged.
687 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id115-bb"/><phrase role="identifier">count</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
688 list-presentation="table"
689 ?><varlistentry><term>Returns:</term><listitem><para>The number of elements with key equivalent to <computeroutput>k</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id116-bb"/><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">iterator</phrase><phrase role="special">></phrase> <anchor id="id117-bb"/><phrase role="identifier">equal_range</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase><phrase role="special">;</phrase>
690 <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">const_iterator</phrase><phrase role="special">></phrase> <anchor id="id118-bb"/><phrase role="identifier">equal_range</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
691 list-presentation="table"
692 ?><varlistentry><term>Returns:</term><listitem><para>A range containing all elements with key equivalent to <computeroutput>k</computeroutput>.
693 If the container doesn't container any such elements, returns
694 <computeroutput>std::make_pair(b.end(),b.end())</computeroutput>.
695 </para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id119-bb"/><computeroutput>unordered_multiset</computeroutput> bucket interface</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id120-bb"/><phrase role="identifier">bucket_count</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
696 list-presentation="table"
697 ?><varlistentry><term>Returns:</term><listitem><para>The number of buckets.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id121-bb"/><phrase role="identifier">max_bucket_count</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
698 list-presentation="table"
699 ?><varlistentry><term>Returns:</term><listitem><para>An upper bound on the number of buckets.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id122-bb"/><phrase role="identifier">bucket_size</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
700 list-presentation="table"
701 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n < <link linkend="id120-bb">bucket_count</link>()</computeroutput></para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>The number of elements in bucket <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id123-bb"/><phrase role="identifier">bucket</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
702 list-presentation="table"
703 ?><varlistentry><term>Returns:</term><listitem><para>The index of the bucket which would contain an element with key <computeroutput>k</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Postconditions:</term><listitem><para>The return value is less than <computeroutput>bucket_count()</computeroutput></para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id124-bb"/><phrase role="identifier">local_iterator</phrase> <anchor id="id125-bb"/><phrase role="identifier">begin</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase><phrase role="special">;</phrase>
704 <phrase role="identifier">const_local_iterator</phrase> <anchor id="id126-bb"/><phrase role="identifier">begin</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
705 list-presentation="table"
706 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n</computeroutput> shall be in the range <computeroutput>[0, bucket_count())</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A local iterator pointing the first element in the bucket with index <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id127-bb"/><phrase role="identifier">local_iterator</phrase> <anchor id="id128-bb"/><phrase role="identifier">end</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase><phrase role="special">;</phrase>
707 <phrase role="identifier">const_local_iterator</phrase> <anchor id="id129-bb"/><phrase role="identifier">end</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
708 list-presentation="table"
709 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n</computeroutput> shall be in the range <computeroutput>[0, bucket_count())</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A local iterator pointing the 'one past the end' element in the bucket with index <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">const_local_iterator</phrase> <anchor id="id130-bb"/><phrase role="identifier">cbegin</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
710 list-presentation="table"
711 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n</computeroutput> shall be in the range <computeroutput>[0, bucket_count())</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A constant local iterator pointing the first element in the bucket with index <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">const_local_iterator</phrase> <anchor id="id131-bb"/><phrase role="identifier">cend</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
712 list-presentation="table"
713 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n</computeroutput> shall be in the range <computeroutput>[0, bucket_count())</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A constant local iterator pointing the 'one past the end' element in the bucket with index <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id132-bb"/><computeroutput>unordered_multiset</computeroutput> hash policy</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">float</phrase> <anchor id="id133-bb"/><phrase role="identifier">load_factor</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
714 list-presentation="table"
715 ?><varlistentry><term>Returns:</term><listitem><para>The average number of elements per bucket.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">float</phrase> <anchor id="id134-bb"/><phrase role="identifier">max_load_factor</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
716 list-presentation="table"
717 ?><varlistentry><term>Returns:</term><listitem><para>Returns the current maximum load factor.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id135-bb"/><phrase role="identifier">max_load_factor</phrase><phrase role="special">(</phrase><phrase role="keyword">float</phrase> z<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
718 list-presentation="table"
719 ?><varlistentry><term>Effects:</term><listitem><para>Changes the container's maximum load factor, using <computeroutput>z</computeroutput> as a hint.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id136-bb"/><phrase role="identifier">rehash</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Changes the number of buckets so that there at least <computeroutput>n</computeroutput> buckets, and so that the load factor is less than the maximum load factor.</para><para>Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.</para><variablelist spacing="compact"><?dbhtml
720 list-presentation="table"
721 ?><varlistentry><term>Throws:</term><listitem><para>The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id137-bb"/><computeroutput>unordered_multiset</computeroutput> Equality Comparisons</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
722 <phrase role="keyword">bool</phrase> <anchor id="boost.unordered_multiset.operator==_id1"/><phrase role="keyword">operator</phrase><phrase role="special">==</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> x<phrase role="special">,</phrase>
723 <phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> y<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
724 list-presentation="table"
725 ?><varlistentry><term>Notes:</term><listitem><para>This is a boost extension.</para><para>Behavior is undefined if the two containers don't have
726 equivalent equality predicates.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
727 <phrase role="keyword">bool</phrase> <anchor id="boost.unordered_multiset.operator!=_id1"/><phrase role="keyword">operator</phrase><phrase role="special">!=</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> x<phrase role="special">,</phrase>
728 <phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> y<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
729 list-presentation="table"
730 ?><varlistentry><term>Notes:</term><listitem><para>This is a boost extension.</para><para>Behavior is undefined if the two containers don't have
731 equivalent equality predicates.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id138-bb"/><computeroutput>unordered_multiset</computeroutput> swap</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Value<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
732 <phrase role="keyword">void</phrase> <anchor id="boost.unordered_multiset.swap_id1"/><phrase role="identifier">swap</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase> x<phrase role="special">,</phrase>
733 <phrase role="identifier">unordered_multiset</phrase><phrase role="special"><</phrase><phrase role="identifier">Value</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase> y<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
734 list-presentation="table"
735 ?><varlistentry><term>Effects:</term><listitem><para><computeroutput>x.swap(y)</computeroutput></para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If the allocators are equal, doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of <computeroutput>Hash</computeroutput> or <computeroutput>Pred</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>For a discussion of the behavior when allocators aren't equal see
736 <link linkend="unordered.rationale.swapping_containers_with_unequal_allocators">the implementation details</link>.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2></refsect1></refentry>
738 <section id="header.boost.unordered_map_hpp"><title>Header <<ulink url="../../boost/unordered_map.hpp">boost/unordered_map.hpp</ulink>></title><synopsis xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">namespace</phrase> <phrase role="identifier">boost</phrase> <phrase role="special">{</phrase>
739 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">hash</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">></phrase><phrase role="special">,</phrase>
740 <phrase role="keyword">typename</phrase> Pred <phrase role="special">=</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">equal_to</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">></phrase><phrase role="special">,</phrase>
741 <phrase role="keyword">typename</phrase> Alloc <phrase role="special">=</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">allocator</phrase><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">></phrase> <phrase role="special">></phrase> <phrase role="special">></phrase>
742 <phrase role="keyword">class</phrase> <link linkend="boost.unordered_map">unordered_map</link><phrase role="special">;</phrase>
743 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
744 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
745 <phrase role="keyword">bool</phrase> <link linkend="boost.unordered_map.operator==_id1"><phrase role="keyword">operator</phrase><phrase role="special">==</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
746 <phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
747 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
748 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
749 <phrase role="keyword">bool</phrase> <link linkend="boost.unordered_map.operator!=_id1"><phrase role="keyword">operator</phrase><phrase role="special">!=</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
750 <phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
751 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
752 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
753 <phrase role="keyword">void</phrase> <link linkend="boost.unordered_map.swap_id1"><phrase role="identifier">swap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
754 <phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
755 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">hash</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">></phrase><phrase role="special">,</phrase>
756 <phrase role="keyword">typename</phrase> Pred <phrase role="special">=</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">equal_to</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">></phrase><phrase role="special">,</phrase>
757 <phrase role="keyword">typename</phrase> Alloc <phrase role="special">=</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">allocator</phrase><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">></phrase> <phrase role="special">></phrase> <phrase role="special">></phrase>
758 <phrase role="keyword">class</phrase> <link linkend="boost.unordered_multimap">unordered_multimap</link><phrase role="special">;</phrase>
759 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
760 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
761 <phrase role="keyword">bool</phrase> <link linkend="boost.unordered_multimap.operator==_id1"><phrase role="keyword">operator</phrase><phrase role="special">==</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
762 <phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
763 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
764 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
765 <phrase role="keyword">bool</phrase> <link linkend="boost.unordered_multimap.operator!=_id1"><phrase role="keyword">operator</phrase><phrase role="special">!=</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
766 <phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
767 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
768 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
769 <phrase role="keyword">void</phrase> <link linkend="boost.unordered_multimap.swap_id1"><phrase role="identifier">swap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
770 <phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
771 <phrase role="special">}</phrase></synopsis>
772 <refentry xmlns:xi="http://www.w3.org/2001/XInclude" id="boost.unordered_map"><refmeta><refentrytitle>Class template unordered_map</refentrytitle><manvolnum>3</manvolnum></refmeta><refnamediv><refname>boost::unordered_map</refname><refpurpose>
773 An unordered associative container that associates unique keys with another value.
774 </refpurpose></refnamediv><refsynopsisdiv><synopsis><phrase role="comment">// In header: <<link linkend="header.boost.unordered_map_hpp">boost/unordered_map.hpp</link>>
776 </phrase><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">hash</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">></phrase><phrase role="special">,</phrase>
777 <phrase role="keyword">typename</phrase> Pred <phrase role="special">=</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">equal_to</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">></phrase><phrase role="special">,</phrase>
778 <phrase role="keyword">typename</phrase> Alloc <phrase role="special">=</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">allocator</phrase><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">></phrase> <phrase role="special">></phrase> <phrase role="special">></phrase>
779 <phrase role="keyword">class</phrase> <link linkend="boost.unordered_map">unordered_map</link> <phrase role="special">{</phrase>
780 <phrase role="keyword">public</phrase><phrase role="special">:</phrase>
781 <phrase role="comment">// <link linkend="boost.unordered_maptypes">types</link></phrase>
782 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Key</phrase> <anchor id="boost.unordered_map.key_type"/><phrase role="identifier">key_type</phrase><phrase role="special">;</phrase>
783 <phrase role="keyword">typedef</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">></phrase> <anchor id="boost.unordered_map.value_type"/><phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
784 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Mapped</phrase> <anchor id="boost.unordered_map.mapped_type"/><phrase role="identifier">mapped_type</phrase><phrase role="special">;</phrase>
785 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Hash</phrase> <anchor id="boost.unordered_map.hasher"/><phrase role="identifier">hasher</phrase><phrase role="special">;</phrase>
786 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Pred</phrase> <anchor id="boost.unordered_map.key_equal"/><phrase role="identifier">key_equal</phrase><phrase role="special">;</phrase>
787 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Alloc</phrase> <anchor id="boost.unordered_map.allocator_type"/><phrase role="identifier">allocator_type</phrase><phrase role="special">;</phrase>
788 <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">::</phrase><phrase role="identifier">pointer</phrase> <anchor id="boost.unordered_map.pointer"/><phrase role="identifier">pointer</phrase><phrase role="special">;</phrase>
789 <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">::</phrase><phrase role="identifier">const_pointer</phrase> <anchor id="boost.unordered_map.const_pointer"/><phrase role="identifier">const_pointer</phrase><phrase role="special">;</phrase>
790 <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">::</phrase><phrase role="identifier">reference</phrase> <anchor id="boost.unordered_map.reference"/><phrase role="identifier">reference</phrase><phrase role="special">;</phrase> <phrase role="comment">// lvalue of value_type.</phrase>
791 <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">::</phrase><phrase role="identifier">const_reference</phrase> <anchor id="boost.unordered_map.const_reference"/><phrase role="identifier">const_reference</phrase><phrase role="special">;</phrase> <phrase role="comment">// const lvalue of value_type.</phrase>
792 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_map.size_type"><phrase role="identifier">size_type</phrase></link><phrase role="special">;</phrase>
793 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_map.difference_type"><phrase role="identifier">difference_type</phrase></link><phrase role="special">;</phrase>
794 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_map.iterator"><phrase role="identifier">iterator</phrase></link><phrase role="special">;</phrase>
795 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_map.const_iterator"><phrase role="identifier">const_iterator</phrase></link><phrase role="special">;</phrase>
796 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_map.local_iterator"><phrase role="identifier">local_iterator</phrase></link><phrase role="special">;</phrase>
797 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_map.const_local_iterator"><phrase role="identifier">const_local_iterator</phrase></link><phrase role="special">;</phrase>
799 <phrase role="comment">// <link linkend="boost.unordered_mapconstruct-copy-destruct">construct/copy/destruct</link></phrase>
800 <phrase role="keyword">explicit</phrase> <link linkend="id139-bb"><phrase role="identifier">unordered_map</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> <phrase role="special">=</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis><phrase role="special">,</phrase>
801 <phrase role="identifier">hasher</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">hasher</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
802 <phrase role="identifier">key_equal</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">key_equal</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
803 <phrase role="identifier">allocator_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
804 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> InputIterator<phrase role="special">></phrase>
805 <link linkend="id140-bb"><phrase role="identifier">unordered_map</phrase></link><phrase role="special">(</phrase><phrase role="identifier">InputIterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">InputIterator</phrase><phrase role="special">,</phrase>
806 <phrase role="identifier">size_type</phrase> <phrase role="special">=</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis><phrase role="special">,</phrase>
807 <phrase role="identifier">hasher</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">hasher</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase> <phrase role="identifier">key_equal</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">key_equal</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
808 <phrase role="identifier">allocator_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
809 <link linkend="id141-bb"><phrase role="identifier">unordered_map</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
810 <link linkend="id142-bb"><phrase role="identifier">unordered_map</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase> <phrase role="special">&&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
811 <phrase role="keyword">explicit</phrase> <link linkend="id143-bb"><phrase role="identifier">unordered_map</phrase></link><phrase role="special">(</phrase><phrase role="identifier">Allocator</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
812 <link linkend="id144-bb"><phrase role="identifier">unordered_map</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase> <phrase role="identifier">Allocator</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
813 <link linkend="id145-bb"><phrase role="special">~</phrase><phrase role="identifier">unordered_map</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
814 <phrase role="identifier">unordered_map</phrase><phrase role="special">&</phrase> <link linkend="id146-bb"><phrase role="keyword">operator</phrase><phrase role="special">=</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
815 <phrase role="identifier">unordered_map</phrase><phrase role="special">&</phrase> <link linkend="id147-bb"><phrase role="keyword">operator</phrase><phrase role="special">=</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase> <phrase role="special">&&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
816 <phrase role="identifier">allocator_type</phrase> <link linkend="id148-bb"><phrase role="identifier">get_allocator</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
818 <phrase role="comment">// <link linkend="id149-bb">size and capacity</link></phrase>
819 <phrase role="keyword">bool</phrase> <link linkend="id150-bb"><phrase role="identifier">empty</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
820 <phrase role="identifier">size_type</phrase> <link linkend="id151-bb"><phrase role="identifier">size</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
821 <phrase role="identifier">size_type</phrase> <link linkend="id152-bb"><phrase role="identifier">max_size</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
823 <phrase role="comment">// <link linkend="id153-bb">iterators</link></phrase>
824 <phrase role="identifier">iterator</phrase> <link linkend="id155-bb"><phrase role="identifier">begin</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
825 <phrase role="identifier">const_iterator</phrase> <link linkend="id156-bb"><phrase role="identifier">begin</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
826 <phrase role="identifier">iterator</phrase> <link linkend="id158-bb"><phrase role="identifier">end</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
827 <phrase role="identifier">const_iterator</phrase> <link linkend="id159-bb"><phrase role="identifier">end</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
828 <phrase role="identifier">const_iterator</phrase> <link linkend="id160-bb"><phrase role="identifier">cbegin</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
829 <phrase role="identifier">const_iterator</phrase> <link linkend="id161-bb"><phrase role="identifier">cend</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
831 <phrase role="comment">// <link linkend="id162-bb">modifiers</link></phrase>
832 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase><phrase role="special">...</phrase> Args<phrase role="special">></phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">iterator</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase><phrase role="special">></phrase> <link linkend="id163-bb"><phrase role="identifier">emplace</phrase></link><phrase role="special">(</phrase><phrase role="identifier">Args</phrase><phrase role="special">&&</phrase><phrase role="special">...</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
833 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase><phrase role="special">...</phrase> Args<phrase role="special">></phrase> <phrase role="identifier">iterator</phrase> <link linkend="id164-bb"><phrase role="identifier">emplace_hint</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">Args</phrase><phrase role="special">&&</phrase><phrase role="special">...</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
834 <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">iterator</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase><phrase role="special">></phrase> <link linkend="id165-bb"><phrase role="identifier">insert</phrase></link><phrase role="special">(</phrase><phrase role="identifier">value_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
835 <phrase role="identifier">iterator</phrase> <link linkend="id166-bb"><phrase role="identifier">insert</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">value_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
836 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> InputIterator<phrase role="special">></phrase> <phrase role="keyword">void</phrase> <link linkend="id167-bb"><phrase role="identifier">insert</phrase></link><phrase role="special">(</phrase><phrase role="identifier">InputIterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">InputIterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
837 <phrase role="identifier">iterator</phrase> <link linkend="id168-bb"><phrase role="identifier">erase</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
838 <phrase role="identifier">size_type</phrase> <link linkend="id169-bb"><phrase role="identifier">erase</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
839 <phrase role="identifier">iterator</phrase> <link linkend="id170-bb"><phrase role="identifier">erase</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">const_iterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
840 <phrase role="keyword">void</phrase> <link linkend="id171-bb"><phrase role="identifier">quick_erase</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
841 <phrase role="keyword">void</phrase> <link linkend="id172-bb"><phrase role="identifier">erase_return_void</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
842 <phrase role="keyword">void</phrase> <link linkend="id173-bb"><phrase role="identifier">clear</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
843 <phrase role="keyword">void</phrase> <link linkend="id174-bb"><phrase role="identifier">swap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
845 <phrase role="comment">// <link linkend="id175-bb">observers</link></phrase>
846 <phrase role="identifier">hasher</phrase> <link linkend="id176-bb"><phrase role="identifier">hash_function</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
847 <phrase role="identifier">key_equal</phrase> <link linkend="id177-bb"><phrase role="identifier">key_eq</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
849 <phrase role="comment">// <link linkend="id178-bb">lookup</link></phrase>
850 <phrase role="identifier">iterator</phrase> <link linkend="id180-bb"><phrase role="identifier">find</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
851 <phrase role="identifier">const_iterator</phrase> <link linkend="id181-bb"><phrase role="identifier">find</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
852 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> CompatibleKey<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> CompatibleHash<phrase role="special">,</phrase>
853 <phrase role="keyword">typename</phrase> CompatiblePredicate<phrase role="special">></phrase>
854 <phrase role="identifier">iterator</phrase> <link linkend="id182-bb"><phrase role="identifier">find</phrase></link><phrase role="special">(</phrase><phrase role="identifier">CompatibleKey</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase> <phrase role="identifier">CompatibleHash</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
855 <phrase role="identifier">CompatiblePredicate</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
856 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> CompatibleKey<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> CompatibleHash<phrase role="special">,</phrase>
857 <phrase role="keyword">typename</phrase> CompatiblePredicate<phrase role="special">></phrase>
858 <phrase role="identifier">const_iterator</phrase>
859 <link linkend="id183-bb"><phrase role="identifier">find</phrase></link><phrase role="special">(</phrase><phrase role="identifier">CompatibleKey</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase> <phrase role="identifier">CompatibleHash</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
860 <phrase role="identifier">CompatiblePredicate</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
861 <phrase role="identifier">size_type</phrase> <link linkend="id184-bb"><phrase role="identifier">count</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
862 <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">iterator</phrase><phrase role="special">></phrase> <link linkend="id186-bb"><phrase role="identifier">equal_range</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
863 <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">const_iterator</phrase><phrase role="special">></phrase> <link linkend="id187-bb"><phrase role="identifier">equal_range</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
864 <phrase role="identifier">mapped_type</phrase><phrase role="special">&</phrase> <link linkend="id188-bb"><phrase role="keyword">operator</phrase><phrase role="special">[</phrase><phrase role="special">]</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
865 <phrase role="identifier">Mapped</phrase><phrase role="special">&</phrase> <link linkend="id190-bb"><phrase role="identifier">at</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
866 <phrase role="identifier">Mapped</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <link linkend="id191-bb"><phrase role="identifier">at</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
868 <phrase role="comment">// <link linkend="id192-bb">bucket interface</link></phrase>
869 <phrase role="identifier">size_type</phrase> <link linkend="id193-bb"><phrase role="identifier">bucket_count</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
870 <phrase role="identifier">size_type</phrase> <link linkend="id194-bb"><phrase role="identifier">max_bucket_count</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
871 <phrase role="identifier">size_type</phrase> <link linkend="id195-bb"><phrase role="identifier">bucket_size</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
872 <phrase role="identifier">size_type</phrase> <link linkend="id196-bb"><phrase role="identifier">bucket</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
873 <phrase role="identifier">local_iterator</phrase> <link linkend="id198-bb"><phrase role="identifier">begin</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
874 <phrase role="identifier">const_local_iterator</phrase> <link linkend="id199-bb"><phrase role="identifier">begin</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
875 <phrase role="identifier">local_iterator</phrase> <link linkend="id201-bb"><phrase role="identifier">end</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
876 <phrase role="identifier">const_local_iterator</phrase> <link linkend="id202-bb"><phrase role="identifier">end</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
877 <phrase role="identifier">const_local_iterator</phrase> <link linkend="id203-bb"><phrase role="identifier">cbegin</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
878 <phrase role="identifier">const_local_iterator</phrase> <link linkend="id204-bb"><phrase role="identifier">cend</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
880 <phrase role="comment">// <link linkend="id205-bb">hash policy</link></phrase>
881 <phrase role="keyword">float</phrase> <link linkend="id206-bb"><phrase role="identifier">load_factor</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
882 <phrase role="keyword">float</phrase> <link linkend="id207-bb"><phrase role="identifier">max_load_factor</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
883 <phrase role="keyword">void</phrase> <link linkend="id208-bb"><phrase role="identifier">max_load_factor</phrase></link><phrase role="special">(</phrase><phrase role="keyword">float</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
884 <phrase role="keyword">void</phrase> <link linkend="id209-bb"><phrase role="identifier">rehash</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
885 <phrase role="special">}</phrase><phrase role="special">;</phrase>
887 <phrase role="comment">// <link linkend="id210-bb">Equality Comparisons</link></phrase>
888 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
889 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
890 <phrase role="keyword">bool</phrase> <link linkend="boost.unordered_map.operator==_id1"><phrase role="keyword">operator</phrase><phrase role="special">==</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
891 <phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
892 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
893 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
894 <phrase role="keyword">bool</phrase> <link linkend="boost.unordered_map.operator!=_id1"><phrase role="keyword">operator</phrase><phrase role="special">!=</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
895 <phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
897 <phrase role="comment">// <link linkend="id211-bb">swap</link></phrase>
898 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
899 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
900 <phrase role="keyword">void</phrase> <link linkend="boost.unordered_map.swap_id1"><phrase role="identifier">swap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
901 <phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></synopsis></refsynopsisdiv><refsect1><title>Description</title>
902 <para>Based on chapter 23 of
903 <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2960.pdf">the working draft of the C++ standard [n2960]</ulink>.
904 But without the updated rules for allocators.
906 <para><emphasis role="bold">Template Parameters</emphasis>
911 <entry><emphasis>Key</emphasis></entry>
912 <entry>Key must be Assignable and CopyConstructible.</entry></row>
914 <entry><emphasis>Mapped</emphasis></entry>
915 <entry>Mapped must be CopyConstructible</entry></row>
917 <entry><emphasis>Hash</emphasis></entry>
918 <entry>A unary function object type that acts a hash function for a <computeroutput>Key</computeroutput>. It takes a single argument of type <computeroutput>Key</computeroutput> and returns a value of type std::size_t.</entry></row>
920 <entry><emphasis>Pred</emphasis></entry>
921 <entry>A binary function object that implements an equivalence relation on values of type <computeroutput>Key</computeroutput>.
922 A binary function object that induces an equivalence relation on values of type Key.
923 It takes two arguments of type Key and returns a value of type bool.</entry></row>
925 <entry><emphasis>Alloc</emphasis></entry>
926 <entry>An allocator whose value type is the same as the container's value type.</entry></row></tbody></tgroup></informaltable></para>
927 <para>The elements are organized into buckets. Keys with the same hash code are stored in the same bucket.</para>
928 <para>The number of buckets can be automatically increased by a call to insert, or as the result of calling rehash.</para>
929 <refsect2><title><anchor id="boost.unordered_maptypes"/><computeroutput>unordered_map</computeroutput>
931 types</title><orderedlist><listitem><para>
932 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_map.size_type"/><phrase role="identifier">size_type</phrase><phrase role="special">;</phrase></para>
933 <para>An unsigned integral type.</para>
934 <para>size_type can represent any non-negative value of difference_type.</para>
935 </listitem><listitem><para>
936 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_map.difference_type"/><phrase role="identifier">difference_type</phrase><phrase role="special">;</phrase></para>
937 <para>A signed integral type.</para>
938 <para>Is identical to the difference type of iterator and const_iterator.</para>
939 </listitem><listitem><para>
940 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_map.iterator"/><phrase role="identifier">iterator</phrase><phrase role="special">;</phrase></para>
941 <para>A iterator whose value type is value_type. </para>
942 <para>The iterator category is at least a forward iterator.</para>
943 <para>Convertible to const_iterator.</para>
944 </listitem><listitem><para>
945 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_map.const_iterator"/><phrase role="identifier">const_iterator</phrase><phrase role="special">;</phrase></para>
946 <para>A constant iterator whose value type is value_type. </para>
947 <para>The iterator category is at least a forward iterator.</para>
948 </listitem><listitem><para>
949 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_map.local_iterator"/><phrase role="identifier">local_iterator</phrase><phrase role="special">;</phrase></para>
950 <para>An iterator with the same value type, difference type and pointer and reference type as iterator.</para>
951 <para>A local_iterator object can be used to iterate through a single bucket.</para>
952 </listitem><listitem><para>
953 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_map.const_local_iterator"/><phrase role="identifier">const_local_iterator</phrase><phrase role="special">;</phrase></para>
954 <para>A constant iterator with the same value type, difference type and pointer and reference type as const_iterator.</para>
955 <para>A const_local_iterator object can be used to iterate through a single bucket.</para>
956 </listitem></orderedlist></refsect2><refsect2><title><anchor id="boost.unordered_mapconstruct-copy-destruct"/><computeroutput>unordered_map</computeroutput>
958 construct/copy/destruct</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">explicit</phrase> <anchor id="id139-bb"/><phrase role="identifier">unordered_map</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n <phrase role="special">=</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis><phrase role="special">,</phrase>
959 <phrase role="identifier">hasher</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> hf <phrase role="special">=</phrase> <phrase role="identifier">hasher</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
960 <phrase role="identifier">key_equal</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> eq <phrase role="special">=</phrase> <phrase role="identifier">key_equal</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
961 <phrase role="identifier">allocator_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> a <phrase role="special">=</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.</para><variablelist spacing="compact"><?dbhtml
962 list-presentation="table"
963 ?><varlistentry><term>Postconditions:</term><listitem><computeroutput><link linkend="id151-bb">size</link>() == 0</computeroutput></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> InputIterator<phrase role="special">></phrase>
964 <anchor id="id140-bb"/><phrase role="identifier">unordered_map</phrase><phrase role="special">(</phrase><phrase role="identifier">InputIterator</phrase> f<phrase role="special">,</phrase> <phrase role="identifier">InputIterator</phrase> l<phrase role="special">,</phrase>
965 <phrase role="identifier">size_type</phrase> n <phrase role="special">=</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis><phrase role="special">,</phrase>
966 <phrase role="identifier">hasher</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> hf <phrase role="special">=</phrase> <phrase role="identifier">hasher</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
967 <phrase role="identifier">key_equal</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> eq <phrase role="special">=</phrase> <phrase role="identifier">key_equal</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
968 <phrase role="identifier">allocator_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> a <phrase role="special">=</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.</para></listitem><listitem><para><literallayout class="monospaced"><anchor id="id141-bb"/><phrase role="identifier">unordered_map</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.</para><variablelist spacing="compact"><?dbhtml
969 list-presentation="table"
970 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>value_type</computeroutput> is copy constructible</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id142-bb"/><phrase role="identifier">unordered_map</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase> <phrase role="special">&&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>The move constructor.</para><variablelist spacing="compact"><?dbhtml
971 list-presentation="table"
972 ?><varlistentry><term>Notes:</term><listitem><para>This is emulated on compilers without rvalue references.</para></listitem></varlistentry><varlistentry><term>Requires:</term><listitem><para>
973 <computeroutput>value_type</computeroutput> is move constructible.
974 (TODO: This is not actually required in this implementation).
975 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">explicit</phrase> <anchor id="id143-bb"/><phrase role="identifier">unordered_map</phrase><phrase role="special">(</phrase><phrase role="identifier">Allocator</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> a<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Constructs an empty container, using allocator <computeroutput>a</computeroutput>.</para></listitem><listitem><para><literallayout class="monospaced"><anchor id="id144-bb"/><phrase role="identifier">unordered_map</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> x<phrase role="special">,</phrase> <phrase role="identifier">Allocator</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> a<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Constructs an container, copying <computeroutput>x</computeroutput>'s contained elements, hash function, predicate, maximum load factor, but using allocator <computeroutput>a</computeroutput>.</para></listitem><listitem><para><literallayout class="monospaced"><anchor id="id145-bb"/><phrase role="special">~</phrase><phrase role="identifier">unordered_map</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
976 list-presentation="table"
977 ?><varlistentry><term>Notes:</term><listitem><para>The destructor is applied to every element, and all memory is deallocated</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><para><literallayout class="monospaced"><phrase role="identifier">unordered_map</phrase><phrase role="special">&</phrase> <anchor id="id146-bb"/><phrase role="keyword">operator</phrase><phrase role="special">=</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>The assignment operator. Copies the contained elements, hash function, predicate and maximum load factor but not the allocator.</para><variablelist spacing="compact"><?dbhtml
978 list-presentation="table"
979 ?><varlistentry><term>Notes:</term><listitem><para>
980 On compilers without rvalue references, there is a single assignment
981 operator with the signature <computeroutput>operator=(unordered_map)</computeroutput>
982 in order to emulate move semantics.
983 </para></listitem></varlistentry><varlistentry><term>Requires:</term><listitem><para><computeroutput>value_type</computeroutput> is copy constructible</para></listitem></varlistentry></variablelist><para><literallayout class="monospaced"><phrase role="identifier">unordered_map</phrase><phrase role="special">&</phrase> <anchor id="id147-bb"/><phrase role="keyword">operator</phrase><phrase role="special">=</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase> <phrase role="special">&&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>The move assignment operator.</para><variablelist spacing="compact"><?dbhtml
984 list-presentation="table"
985 ?><varlistentry><term>Notes:</term><listitem><para>
986 On compilers without rvalue references, there is a single assignment
987 operator with the signature <computeroutput>operator=(unordered_map)</computeroutput>
988 in order to emulate move semantics.
989 </para></listitem></varlistentry><varlistentry><term>Requires:</term><listitem><para>
990 <computeroutput>value_type</computeroutput> is move constructible.
991 (TODO: This is not actually required in this implementation).
992 </para></listitem></varlistentry></variablelist><para><literallayout class="monospaced"><phrase role="identifier">allocator_type</phrase> <anchor id="id148-bb"/><phrase role="identifier">get_allocator</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><refsect2><title><anchor id="id149-bb"/><computeroutput>unordered_map</computeroutput> size and capacity</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">bool</phrase> <anchor id="id150-bb"/><phrase role="identifier">empty</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
993 list-presentation="table"
994 ?><varlistentry><term>Returns:</term><listitem><computeroutput><link linkend="id151-bb">size</link>() == 0</computeroutput></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id151-bb"/><phrase role="identifier">size</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
995 list-presentation="table"
996 ?><varlistentry><term>Returns:</term><listitem><computeroutput>std::distance(<link linkend="id154-bb">begin</link>(), <link linkend="id157-bb">end</link>())</computeroutput></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id152-bb"/><phrase role="identifier">max_size</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
997 list-presentation="table"
998 ?><varlistentry><term>Returns:</term><listitem><computeroutput><link linkend="id151-bb">size</link>()</computeroutput> of the largest possible container.
999 </listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id153-bb"/><computeroutput>unordered_map</computeroutput> iterators</title><orderedlist><listitem><para><literallayout class="monospaced"><anchor id="id154-bb"/><phrase role="identifier">iterator</phrase> <anchor id="id155-bb"/><phrase role="identifier">begin</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1000 <phrase role="identifier">const_iterator</phrase> <anchor id="id156-bb"/><phrase role="identifier">begin</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1001 list-presentation="table"
1002 ?><varlistentry><term>Returns:</term><listitem>An iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
1003 </listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id157-bb"/><phrase role="identifier">iterator</phrase> <anchor id="id158-bb"/><phrase role="identifier">end</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1004 <phrase role="identifier">const_iterator</phrase> <anchor id="id159-bb"/><phrase role="identifier">end</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1005 list-presentation="table"
1006 ?><varlistentry><term>Returns:</term><listitem>An iterator which refers to the past-the-end value for the container.
1007 </listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">const_iterator</phrase> <anchor id="id160-bb"/><phrase role="identifier">cbegin</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1008 list-presentation="table"
1009 ?><varlistentry><term>Returns:</term><listitem>A constant iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
1010 </listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">const_iterator</phrase> <anchor id="id161-bb"/><phrase role="identifier">cend</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1011 list-presentation="table"
1012 ?><varlistentry><term>Returns:</term><listitem>A constant iterator which refers to the past-the-end value for the container.
1013 </listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id162-bb"/><computeroutput>unordered_map</computeroutput> modifiers</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase><phrase role="special">...</phrase> Args<phrase role="special">></phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">iterator</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase><phrase role="special">></phrase> <anchor id="id163-bb"/><phrase role="identifier">emplace</phrase><phrase role="special">(</phrase><phrase role="identifier">Args</phrase><phrase role="special">&&</phrase><phrase role="special">...</phrase> args<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts an object, constructed with the arguments <computeroutput>args</computeroutput>, in the container if and only if there is no element in the container with an equivalent key.</para><variablelist spacing="compact"><?dbhtml
1014 list-presentation="table"
1015 ?><varlistentry><term>Returns:</term><listitem><para>The bool component of the return type is true if an insert took place.</para><para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para><para>If the compiler doesn't support variadic template arguments or rvalue
1016 references, this is emulated for up to 10 arguments, with no support
1017 for rvalue references or move semantics.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase><phrase role="special">...</phrase> Args<phrase role="special">></phrase>
1018 <phrase role="identifier">iterator</phrase> <anchor id="id164-bb"/><phrase role="identifier">emplace_hint</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> hint<phrase role="special">,</phrase> <phrase role="identifier">Args</phrase><phrase role="special">&&</phrase><phrase role="special">...</phrase> args<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts an object, constructed with the arguments <computeroutput>args</computeroutput>, in the container if and only if there is no element in the container with an equivalent key.</para><para>hint is a suggestion to where the element should be inserted.</para><variablelist spacing="compact"><?dbhtml
1019 list-presentation="table"
1020 ?><varlistentry><term>Returns:</term><listitem><para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same key. </para><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para><para>If the compiler doesn't support variadic template arguments or rvalue
1021 references, this is emulated for up to 10 arguments, with no support
1022 for rvalue references or move semantics.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">iterator</phrase><phrase role="special">,</phrase> <phrase role="keyword">bool</phrase><phrase role="special">></phrase> <anchor id="id165-bb"/><phrase role="identifier">insert</phrase><phrase role="special">(</phrase><phrase role="identifier">value_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> obj<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts obj in the container if and only if there is no element in the container with an equivalent key.</para><variablelist spacing="compact"><?dbhtml
1023 list-presentation="table"
1024 ?><varlistentry><term>Returns:</term><listitem><para>The bool component of the return type is true if an insert took place.</para><para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">iterator</phrase> <anchor id="id166-bb"/><phrase role="identifier">insert</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> hint<phrase role="special">,</phrase> <phrase role="identifier">value_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> obj<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts obj in the container if and only if there is no element in the container with an equivalent key.</para><para>hint is a suggestion to where the element should be inserted.</para><variablelist spacing="compact"><?dbhtml
1025 list-presentation="table"
1026 ?><varlistentry><term>Returns:</term><listitem><para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same key. </para><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> InputIterator<phrase role="special">></phrase>
1027 <phrase role="keyword">void</phrase> <anchor id="id167-bb"/><phrase role="identifier">insert</phrase><phrase role="special">(</phrase><phrase role="identifier">InputIterator</phrase> first<phrase role="special">,</phrase> <phrase role="identifier">InputIterator</phrase> last<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts a range of elements into the container. Elements are inserted if and only if there is no element in the container with an equivalent key.</para><variablelist spacing="compact"><?dbhtml
1028 list-presentation="table"
1029 ?><varlistentry><term>Throws:</term><listitem><para>When inserting a single element, if an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">iterator</phrase> <anchor id="id168-bb"/><phrase role="identifier">erase</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> position<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erase the element pointed to by <computeroutput>position</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
1030 list-presentation="table"
1031 ?><varlistentry><term>Returns:</term><listitem><para>The iterator following <computeroutput>position</computeroutput> before the erasure.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para><para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>
1032 When the number of elements is a lot smaller than the number of buckets
1033 this function can be very inefficient as it has to search through empty
1034 buckets for the next element, in order to return the iterator.
1035 The method <link linkend="id171-bb">quick_erase</link> is faster, but has yet
1037 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id169-bb"/><phrase role="identifier">erase</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erase all elements with key equivalent to <computeroutput>k</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
1038 list-presentation="table"
1039 ?><varlistentry><term>Returns:</term><listitem><para>The number of elements erased.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">iterator</phrase> <anchor id="id170-bb"/><phrase role="identifier">erase</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> first<phrase role="special">,</phrase> <phrase role="identifier">const_iterator</phrase> last<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erases the elements in the range from <computeroutput>first</computeroutput> to <computeroutput>last</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
1040 list-presentation="table"
1041 ?><varlistentry><term>Returns:</term><listitem><para>The iterator following the erased elements - i.e. <computeroutput>last</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para><para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id171-bb"/><phrase role="identifier">quick_erase</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> position<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erase the element pointed to by <computeroutput>position</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
1042 list-presentation="table"
1043 ?><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para><para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>
1044 This method is faster than <link linkend="id168-bb">erase</link> as
1045 it doesn't have to find the next element in the container -
1046 a potentially costly operation.
1048 As it hasn't been standardized, it's likely that this may
1049 change in the future.
1050 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id172-bb"/><phrase role="identifier">erase_return_void</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> position<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erase the element pointed to by <computeroutput>position</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
1051 list-presentation="table"
1052 ?><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para><para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>
1053 This method is now deprecated, use
1054 quick_return instead. Although be
1055 warned that as that isn't standardized yet, it could also
1057 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id173-bb"/><phrase role="identifier">clear</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erases all elements in the container.</para><variablelist spacing="compact"><?dbhtml
1058 list-presentation="table"
1059 ?><varlistentry><term>Postconditions:</term><listitem><para><computeroutput><link linkend="id151-bb">size</link>() == 0</computeroutput></para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>Never throws an exception.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id174-bb"/><phrase role="identifier">swap</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1060 list-presentation="table"
1061 ?><varlistentry><term>Throws:</term><listitem><para>If the allocators are equal, doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of <computeroutput>key_equal</computeroutput> or <computeroutput>hasher</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>For a discussion of the behavior when allocators aren't equal see
1062 <link linkend="unordered.rationale.swapping_containers_with_unequal_allocators">the implementation details</link>.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id175-bb"/><computeroutput>unordered_map</computeroutput> observers</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="identifier">hasher</phrase> <anchor id="id176-bb"/><phrase role="identifier">hash_function</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1063 list-presentation="table"
1064 ?><varlistentry><term>Returns:</term><listitem>The container's hash function.
1065 </listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">key_equal</phrase> <anchor id="id177-bb"/><phrase role="identifier">key_eq</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1066 list-presentation="table"
1067 ?><varlistentry><term>Returns:</term><listitem>The container's key equality predicate.
1068 </listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id178-bb"/><computeroutput>unordered_map</computeroutput> lookup</title><orderedlist><listitem><para><literallayout class="monospaced"><anchor id="id179-bb"/><phrase role="identifier">iterator</phrase> <anchor id="id180-bb"/><phrase role="identifier">find</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase><phrase role="special">;</phrase>
1069 <phrase role="identifier">const_iterator</phrase> <anchor id="id181-bb"/><phrase role="identifier">find</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1070 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> CompatibleKey<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> CompatibleHash<phrase role="special">,</phrase>
1071 <phrase role="keyword">typename</phrase> CompatiblePredicate<phrase role="special">></phrase>
1072 <phrase role="identifier">iterator</phrase> <anchor id="id182-bb"/><phrase role="identifier">find</phrase><phrase role="special">(</phrase><phrase role="identifier">CompatibleKey</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">,</phrase> <phrase role="identifier">CompatibleHash</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> hash<phrase role="special">,</phrase>
1073 <phrase role="identifier">CompatiblePredicate</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> eq<phrase role="special">)</phrase><phrase role="special">;</phrase>
1074 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> CompatibleKey<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> CompatibleHash<phrase role="special">,</phrase>
1075 <phrase role="keyword">typename</phrase> CompatiblePredicate<phrase role="special">></phrase>
1076 <phrase role="identifier">const_iterator</phrase>
1077 <anchor id="id183-bb"/><phrase role="identifier">find</phrase><phrase role="special">(</phrase><phrase role="identifier">CompatibleKey</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">,</phrase> <phrase role="identifier">CompatibleHash</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> hash<phrase role="special">,</phrase>
1078 <phrase role="identifier">CompatiblePredicate</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> eq<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1079 list-presentation="table"
1080 ?><varlistentry><term>Returns:</term><listitem><para>An iterator pointing to an element with key equivalent to <computeroutput>k</computeroutput>, or <computeroutput>b.end()</computeroutput> if no such element exists.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>
1081 The templated overloads are a non-standard extensions which
1082 allows you to use a compatible hash function and equality
1083 predicate for a key of a different type in order to avoid
1084 an expensive type cast. In general, its use is not encouraged.
1085 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id184-bb"/><phrase role="identifier">count</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1086 list-presentation="table"
1087 ?><varlistentry><term>Returns:</term><listitem><para>The number of elements with key equivalent to <computeroutput>k</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id185-bb"/><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">iterator</phrase><phrase role="special">></phrase> <anchor id="id186-bb"/><phrase role="identifier">equal_range</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase><phrase role="special">;</phrase>
1088 <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">const_iterator</phrase><phrase role="special">></phrase> <anchor id="id187-bb"/><phrase role="identifier">equal_range</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1089 list-presentation="table"
1090 ?><varlistentry><term>Returns:</term><listitem><para>A range containing all elements with key equivalent to <computeroutput>k</computeroutput>.
1091 If the container doesn't container any such elements, returns
1092 <computeroutput>std::make_pair(b.end(),b.end())</computeroutput>.
1093 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">mapped_type</phrase><phrase role="special">&</phrase> <anchor id="id188-bb"/><phrase role="keyword">operator</phrase><phrase role="special">[</phrase><phrase role="special">]</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1094 list-presentation="table"
1095 ?><varlistentry><term>Effects:</term><listitem><para>If the container does not already contain an elements with a key equivalent to <computeroutput>k</computeroutput>, inserts the value <computeroutput>std::pair<key_type const, mapped_type>(k, mapped_type())</computeroutput></para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A reference to <computeroutput>x.second</computeroutput> where x is the element already in the container, or the newly inserted element with a key equivalent to <computeroutput>k</computeroutput></para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id189-bb"/><phrase role="identifier">Mapped</phrase><phrase role="special">&</phrase> <anchor id="id190-bb"/><phrase role="identifier">at</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase><phrase role="special">;</phrase>
1096 <phrase role="identifier">Mapped</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <anchor id="id191-bb"/><phrase role="identifier">at</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1097 list-presentation="table"
1098 ?><varlistentry><term>Returns:</term><listitem><para>A reference to <computeroutput>x.second</computeroutput> where <computeroutput>x</computeroutput> is the (unique) element whose key is equivalent to <computeroutput>k</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>An exception object of type <computeroutput>std::out_of_range</computeroutput> if no such element is present.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>This is not specified in the draft standard, but that is probably an oversight. The issue has been raised in
1099 <ulink url="http://groups.google.com/group/comp.std.c++/browse_thread/thread/ab7c22a868fd370b">comp.std.c++</ulink>.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id192-bb"/><computeroutput>unordered_map</computeroutput> bucket interface</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id193-bb"/><phrase role="identifier">bucket_count</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1100 list-presentation="table"
1101 ?><varlistentry><term>Returns:</term><listitem><para>The number of buckets.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id194-bb"/><phrase role="identifier">max_bucket_count</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1102 list-presentation="table"
1103 ?><varlistentry><term>Returns:</term><listitem><para>An upper bound on the number of buckets.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id195-bb"/><phrase role="identifier">bucket_size</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1104 list-presentation="table"
1105 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n < <link linkend="id193-bb">bucket_count</link>()</computeroutput></para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>The number of elements in bucket <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id196-bb"/><phrase role="identifier">bucket</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1106 list-presentation="table"
1107 ?><varlistentry><term>Returns:</term><listitem><para>The index of the bucket which would contain an element with key <computeroutput>k</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Postconditions:</term><listitem><para>The return value is less than <computeroutput>bucket_count()</computeroutput></para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id197-bb"/><phrase role="identifier">local_iterator</phrase> <anchor id="id198-bb"/><phrase role="identifier">begin</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase><phrase role="special">;</phrase>
1108 <phrase role="identifier">const_local_iterator</phrase> <anchor id="id199-bb"/><phrase role="identifier">begin</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1109 list-presentation="table"
1110 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n</computeroutput> shall be in the range <computeroutput>[0, bucket_count())</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A local iterator pointing the first element in the bucket with index <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id200-bb"/><phrase role="identifier">local_iterator</phrase> <anchor id="id201-bb"/><phrase role="identifier">end</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase><phrase role="special">;</phrase>
1111 <phrase role="identifier">const_local_iterator</phrase> <anchor id="id202-bb"/><phrase role="identifier">end</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1112 list-presentation="table"
1113 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n</computeroutput> shall be in the range <computeroutput>[0, bucket_count())</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A local iterator pointing the 'one past the end' element in the bucket with index <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">const_local_iterator</phrase> <anchor id="id203-bb"/><phrase role="identifier">cbegin</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1114 list-presentation="table"
1115 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n</computeroutput> shall be in the range <computeroutput>[0, bucket_count())</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A constant local iterator pointing the first element in the bucket with index <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">const_local_iterator</phrase> <anchor id="id204-bb"/><phrase role="identifier">cend</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1116 list-presentation="table"
1117 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n</computeroutput> shall be in the range <computeroutput>[0, bucket_count())</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A constant local iterator pointing the 'one past the end' element in the bucket with index <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id205-bb"/><computeroutput>unordered_map</computeroutput> hash policy</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">float</phrase> <anchor id="id206-bb"/><phrase role="identifier">load_factor</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1118 list-presentation="table"
1119 ?><varlistentry><term>Returns:</term><listitem><para>The average number of elements per bucket.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">float</phrase> <anchor id="id207-bb"/><phrase role="identifier">max_load_factor</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1120 list-presentation="table"
1121 ?><varlistentry><term>Returns:</term><listitem><para>Returns the current maximum load factor.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id208-bb"/><phrase role="identifier">max_load_factor</phrase><phrase role="special">(</phrase><phrase role="keyword">float</phrase> z<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1122 list-presentation="table"
1123 ?><varlistentry><term>Effects:</term><listitem><para>Changes the container's maximum load factor, using <computeroutput>z</computeroutput> as a hint.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id209-bb"/><phrase role="identifier">rehash</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Changes the number of buckets so that there at least <computeroutput>n</computeroutput> buckets, and so that the load factor is less than the maximum load factor.</para><para>Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.</para><variablelist spacing="compact"><?dbhtml
1124 list-presentation="table"
1125 ?><varlistentry><term>Throws:</term><listitem><para>The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id210-bb"/><computeroutput>unordered_map</computeroutput> Equality Comparisons</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
1126 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
1127 <phrase role="keyword">bool</phrase> <anchor id="boost.unordered_map.operator==_id1"/><phrase role="keyword">operator</phrase><phrase role="special">==</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> x<phrase role="special">,</phrase>
1128 <phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> y<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1129 list-presentation="table"
1130 ?><varlistentry><term>Notes:</term><listitem><para>This is a boost extension.</para><para>Behavior is undefined if the two containers don't have
1131 equivalent equality predicates.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
1132 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
1133 <phrase role="keyword">bool</phrase> <anchor id="boost.unordered_map.operator!=_id1"/><phrase role="keyword">operator</phrase><phrase role="special">!=</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> x<phrase role="special">,</phrase>
1134 <phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> y<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1135 list-presentation="table"
1136 ?><varlistentry><term>Notes:</term><listitem><para>This is a boost extension.</para><para>Behavior is undefined if the two containers don't have
1137 equivalent equality predicates.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id211-bb"/><computeroutput>unordered_map</computeroutput> swap</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
1138 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
1139 <phrase role="keyword">void</phrase> <anchor id="boost.unordered_map.swap_id1"/><phrase role="identifier">swap</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase> x<phrase role="special">,</phrase>
1140 <phrase role="identifier">unordered_map</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase> y<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1141 list-presentation="table"
1142 ?><varlistentry><term>Effects:</term><listitem><para><computeroutput>x.swap(y)</computeroutput></para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If the allocators are equal, doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of <computeroutput>Hash</computeroutput> or <computeroutput>Pred</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>For a discussion of the behavior when allocators aren't equal see
1143 <link linkend="unordered.rationale.swapping_containers_with_unequal_allocators">the implementation details</link>.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2></refsect1></refentry><refentry xmlns:xi="http://www.w3.org/2001/XInclude" id="boost.unordered_multimap"><refmeta><refentrytitle>Class template unordered_multimap</refentrytitle><manvolnum>3</manvolnum></refmeta><refnamediv><refname>boost::unordered_multimap</refname><refpurpose>
1144 An unordered associative container that associates keys with another value. The same key can be stored multiple times.
1145 </refpurpose></refnamediv><refsynopsisdiv><synopsis><phrase role="comment">// In header: <<link linkend="header.boost.unordered_map_hpp">boost/unordered_map.hpp</link>>
1147 </phrase><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">hash</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">></phrase><phrase role="special">,</phrase>
1148 <phrase role="keyword">typename</phrase> Pred <phrase role="special">=</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">equal_to</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">></phrase><phrase role="special">,</phrase>
1149 <phrase role="keyword">typename</phrase> Alloc <phrase role="special">=</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">allocator</phrase><phrase role="special"><</phrase><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">></phrase> <phrase role="special">></phrase> <phrase role="special">></phrase>
1150 <phrase role="keyword">class</phrase> <link linkend="boost.unordered_multimap">unordered_multimap</link> <phrase role="special">{</phrase>
1151 <phrase role="keyword">public</phrase><phrase role="special">:</phrase>
1152 <phrase role="comment">// <link linkend="boost.unordered_multimaptypes">types</link></phrase>
1153 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Key</phrase> <anchor id="boost.unordered_multimap.key_type"/><phrase role="identifier">key_type</phrase><phrase role="special">;</phrase>
1154 <phrase role="keyword">typedef</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase> <phrase role="keyword">const</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">></phrase> <anchor id="boost.unordered_multimap.value_type"/><phrase role="identifier">value_type</phrase><phrase role="special">;</phrase>
1155 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Mapped</phrase> <anchor id="boost.unordered_multimap.mapped_type"/><phrase role="identifier">mapped_type</phrase><phrase role="special">;</phrase>
1156 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Hash</phrase> <anchor id="boost.unordered_multimap.hasher"/><phrase role="identifier">hasher</phrase><phrase role="special">;</phrase>
1157 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Pred</phrase> <anchor id="boost.unordered_multimap.key_equal"/><phrase role="identifier">key_equal</phrase><phrase role="special">;</phrase>
1158 <phrase role="keyword">typedef</phrase> <phrase role="identifier">Alloc</phrase> <anchor id="boost.unordered_multimap.allocator_type"/><phrase role="identifier">allocator_type</phrase><phrase role="special">;</phrase>
1159 <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">::</phrase><phrase role="identifier">pointer</phrase> <anchor id="boost.unordered_multimap.pointer"/><phrase role="identifier">pointer</phrase><phrase role="special">;</phrase>
1160 <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">::</phrase><phrase role="identifier">const_pointer</phrase> <anchor id="boost.unordered_multimap.const_pointer"/><phrase role="identifier">const_pointer</phrase><phrase role="special">;</phrase>
1161 <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">::</phrase><phrase role="identifier">reference</phrase> <anchor id="boost.unordered_multimap.reference"/><phrase role="identifier">reference</phrase><phrase role="special">;</phrase> <phrase role="comment">// lvalue of value_type.</phrase>
1162 <phrase role="keyword">typedef</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">::</phrase><phrase role="identifier">const_reference</phrase> <anchor id="boost.unordered_multimap.const_reference"/><phrase role="identifier">const_reference</phrase><phrase role="special">;</phrase> <phrase role="comment">// const lvalue of value_type.</phrase>
1163 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_multimap.size_type"><phrase role="identifier">size_type</phrase></link><phrase role="special">;</phrase>
1164 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_multimap.difference_type"><phrase role="identifier">difference_type</phrase></link><phrase role="special">;</phrase>
1165 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_multimap.iterator"><phrase role="identifier">iterator</phrase></link><phrase role="special">;</phrase>
1166 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_multimap.const_iterator"><phrase role="identifier">const_iterator</phrase></link><phrase role="special">;</phrase>
1167 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_multimap.local_iterator"><phrase role="identifier">local_iterator</phrase></link><phrase role="special">;</phrase>
1168 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <link linkend="boost.unordered_multimap.const_local_iterator"><phrase role="identifier">const_local_iterator</phrase></link><phrase role="special">;</phrase>
1170 <phrase role="comment">// <link linkend="boost.unordered_multimapconstruct-copy-destruct">construct/copy/destruct</link></phrase>
1171 <phrase role="keyword">explicit</phrase> <link linkend="id212-bb"><phrase role="identifier">unordered_multimap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> <phrase role="special">=</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis><phrase role="special">,</phrase>
1172 <phrase role="identifier">hasher</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">hasher</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
1173 <phrase role="identifier">key_equal</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">key_equal</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
1174 <phrase role="identifier">allocator_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1175 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> InputIterator<phrase role="special">></phrase>
1176 <link linkend="id213-bb"><phrase role="identifier">unordered_multimap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">InputIterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">InputIterator</phrase><phrase role="special">,</phrase>
1177 <phrase role="identifier">size_type</phrase> <phrase role="special">=</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis><phrase role="special">,</phrase>
1178 <phrase role="identifier">hasher</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">hasher</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
1179 <phrase role="identifier">key_equal</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">key_equal</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
1180 <phrase role="identifier">allocator_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> <phrase role="special">=</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1181 <link linkend="id214-bb"><phrase role="identifier">unordered_multimap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1182 <link linkend="id215-bb"><phrase role="identifier">unordered_multimap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase> <phrase role="special">&&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1183 <phrase role="keyword">explicit</phrase> <link linkend="id216-bb"><phrase role="identifier">unordered_multimap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">Allocator</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1184 <link linkend="id217-bb"><phrase role="identifier">unordered_multimap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase> <phrase role="identifier">Allocator</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1185 <link linkend="id218-bb"><phrase role="special">~</phrase><phrase role="identifier">unordered_multimap</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1186 <phrase role="identifier">unordered_multimap</phrase><phrase role="special">&</phrase> <link linkend="id219-bb"><phrase role="keyword">operator</phrase><phrase role="special">=</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1187 <phrase role="identifier">unordered_multimap</phrase><phrase role="special">&</phrase> <link linkend="id220-bb"><phrase role="keyword">operator</phrase><phrase role="special">=</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase> <phrase role="special">&&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1188 <phrase role="identifier">allocator_type</phrase> <link linkend="id221-bb"><phrase role="identifier">get_allocator</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1190 <phrase role="comment">// <link linkend="id222-bb">size and capacity</link></phrase>
1191 <phrase role="keyword">bool</phrase> <link linkend="id223-bb"><phrase role="identifier">empty</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1192 <phrase role="identifier">size_type</phrase> <link linkend="id224-bb"><phrase role="identifier">size</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1193 <phrase role="identifier">size_type</phrase> <link linkend="id225-bb"><phrase role="identifier">max_size</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1195 <phrase role="comment">// <link linkend="id226-bb">iterators</link></phrase>
1196 <phrase role="identifier">iterator</phrase> <link linkend="id228-bb"><phrase role="identifier">begin</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1197 <phrase role="identifier">const_iterator</phrase> <link linkend="id229-bb"><phrase role="identifier">begin</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1198 <phrase role="identifier">iterator</phrase> <link linkend="id231-bb"><phrase role="identifier">end</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1199 <phrase role="identifier">const_iterator</phrase> <link linkend="id232-bb"><phrase role="identifier">end</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1200 <phrase role="identifier">const_iterator</phrase> <link linkend="id233-bb"><phrase role="identifier">cbegin</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1201 <phrase role="identifier">const_iterator</phrase> <link linkend="id234-bb"><phrase role="identifier">cend</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1203 <phrase role="comment">// <link linkend="id235-bb">modifiers</link></phrase>
1204 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase><phrase role="special">...</phrase> Args<phrase role="special">></phrase> <phrase role="identifier">iterator</phrase> <link linkend="id236-bb"><phrase role="identifier">emplace</phrase></link><phrase role="special">(</phrase><phrase role="identifier">Args</phrase><phrase role="special">&&</phrase><phrase role="special">...</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1205 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase><phrase role="special">...</phrase> Args<phrase role="special">></phrase> <phrase role="identifier">iterator</phrase> <link linkend="id237-bb"><phrase role="identifier">emplace_hint</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">Args</phrase><phrase role="special">&&</phrase><phrase role="special">...</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1206 <phrase role="identifier">iterator</phrase> <link linkend="id238-bb"><phrase role="identifier">insert</phrase></link><phrase role="special">(</phrase><phrase role="identifier">value_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1207 <phrase role="identifier">iterator</phrase> <link linkend="id239-bb"><phrase role="identifier">insert</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">value_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1208 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> InputIterator<phrase role="special">></phrase> <phrase role="keyword">void</phrase> <link linkend="id240-bb"><phrase role="identifier">insert</phrase></link><phrase role="special">(</phrase><phrase role="identifier">InputIterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">InputIterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1209 <phrase role="identifier">iterator</phrase> <link linkend="id241-bb"><phrase role="identifier">erase</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1210 <phrase role="identifier">size_type</phrase> <link linkend="id242-bb"><phrase role="identifier">erase</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1211 <phrase role="identifier">iterator</phrase> <link linkend="id243-bb"><phrase role="identifier">erase</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">const_iterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1212 <phrase role="keyword">void</phrase> <link linkend="id244-bb"><phrase role="identifier">quick_erase</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1213 <phrase role="keyword">void</phrase> <link linkend="id245-bb"><phrase role="identifier">erase_return_void</phrase></link><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1214 <phrase role="keyword">void</phrase> <link linkend="id246-bb"><phrase role="identifier">clear</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1215 <phrase role="keyword">void</phrase> <link linkend="id247-bb"><phrase role="identifier">swap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1217 <phrase role="comment">// <link linkend="id248-bb">observers</link></phrase>
1218 <phrase role="identifier">hasher</phrase> <link linkend="id249-bb"><phrase role="identifier">hash_function</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1219 <phrase role="identifier">key_equal</phrase> <link linkend="id250-bb"><phrase role="identifier">key_eq</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1221 <phrase role="comment">// <link linkend="id251-bb">lookup</link></phrase>
1222 <phrase role="identifier">iterator</phrase> <link linkend="id253-bb"><phrase role="identifier">find</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1223 <phrase role="identifier">const_iterator</phrase> <link linkend="id254-bb"><phrase role="identifier">find</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1224 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> CompatibleKey<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> CompatibleHash<phrase role="special">,</phrase>
1225 <phrase role="keyword">typename</phrase> CompatiblePredicate<phrase role="special">></phrase>
1226 <phrase role="identifier">iterator</phrase> <link linkend="id255-bb"><phrase role="identifier">find</phrase></link><phrase role="special">(</phrase><phrase role="identifier">CompatibleKey</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase> <phrase role="identifier">CompatibleHash</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
1227 <phrase role="identifier">CompatiblePredicate</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1228 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> CompatibleKey<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> CompatibleHash<phrase role="special">,</phrase>
1229 <phrase role="keyword">typename</phrase> CompatiblePredicate<phrase role="special">></phrase>
1230 <phrase role="identifier">const_iterator</phrase>
1231 <link linkend="id256-bb"><phrase role="identifier">find</phrase></link><phrase role="special">(</phrase><phrase role="identifier">CompatibleKey</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase> <phrase role="identifier">CompatibleHash</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
1232 <phrase role="identifier">CompatiblePredicate</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1233 <phrase role="identifier">size_type</phrase> <link linkend="id257-bb"><phrase role="identifier">count</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1234 <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">iterator</phrase><phrase role="special">></phrase> <link linkend="id259-bb"><phrase role="identifier">equal_range</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1235 <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">const_iterator</phrase><phrase role="special">></phrase> <link linkend="id260-bb"><phrase role="identifier">equal_range</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1237 <phrase role="comment">// <link linkend="id261-bb">bucket interface</link></phrase>
1238 <phrase role="identifier">size_type</phrase> <link linkend="id262-bb"><phrase role="identifier">bucket_count</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1239 <phrase role="identifier">size_type</phrase> <link linkend="id263-bb"><phrase role="identifier">max_bucket_count</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1240 <phrase role="identifier">size_type</phrase> <link linkend="id264-bb"><phrase role="identifier">bucket_size</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1241 <phrase role="identifier">size_type</phrase> <link linkend="id265-bb"><phrase role="identifier">bucket</phrase></link><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1242 <phrase role="identifier">local_iterator</phrase> <link linkend="id267-bb"><phrase role="identifier">begin</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1243 <phrase role="identifier">const_local_iterator</phrase> <link linkend="id268-bb"><phrase role="identifier">begin</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1244 <phrase role="identifier">local_iterator</phrase> <link linkend="id270-bb"><phrase role="identifier">end</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1245 <phrase role="identifier">const_local_iterator</phrase> <link linkend="id271-bb"><phrase role="identifier">end</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1246 <phrase role="identifier">const_local_iterator</phrase> <link linkend="id272-bb"><phrase role="identifier">cbegin</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1247 <phrase role="identifier">const_local_iterator</phrase> <link linkend="id273-bb"><phrase role="identifier">cend</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1249 <phrase role="comment">// <link linkend="id274-bb">hash policy</link></phrase>
1250 <phrase role="keyword">float</phrase> <link linkend="id275-bb"><phrase role="identifier">load_factor</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1251 <phrase role="keyword">float</phrase> <link linkend="id276-bb"><phrase role="identifier">max_load_factor</phrase></link><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1252 <phrase role="keyword">void</phrase> <link linkend="id277-bb"><phrase role="identifier">max_load_factor</phrase></link><phrase role="special">(</phrase><phrase role="keyword">float</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1253 <phrase role="keyword">void</phrase> <link linkend="id278-bb"><phrase role="identifier">rehash</phrase></link><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1254 <phrase role="special">}</phrase><phrase role="special">;</phrase>
1256 <phrase role="comment">// <link linkend="id279-bb">Equality Comparisons</link></phrase>
1257 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
1258 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
1259 <phrase role="keyword">bool</phrase> <link linkend="boost.unordered_multimap.operator==_id1"><phrase role="keyword">operator</phrase><phrase role="special">==</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
1260 <phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1261 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
1262 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
1263 <phrase role="keyword">bool</phrase> <link linkend="boost.unordered_multimap.operator!=_id1"><phrase role="keyword">operator</phrase><phrase role="special">!=</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
1264 <phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1266 <phrase role="comment">// <link linkend="id280-bb">swap</link></phrase>
1267 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
1268 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
1269 <phrase role="keyword">void</phrase> <link linkend="boost.unordered_multimap.swap_id1"><phrase role="identifier">swap</phrase></link><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase><phrase role="special">,</phrase>
1270 <phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></synopsis></refsynopsisdiv><refsect1><title>Description</title>
1271 <para>Based on chapter 23 of
1272 <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2960.pdf">the working draft of the C++ standard [n2960]</ulink>.
1273 But without the updated rules for allocators.
1275 <para><emphasis role="bold">Template Parameters</emphasis>
1280 <entry><emphasis>Key</emphasis></entry>
1281 <entry>Key must be Assignable and CopyConstructible.</entry></row>
1283 <entry><emphasis>Mapped</emphasis></entry>
1284 <entry>Mapped must be CopyConstructible</entry></row>
1286 <entry><emphasis>Hash</emphasis></entry>
1287 <entry>A unary function object type that acts a hash function for a <computeroutput>Key</computeroutput>. It takes a single argument of type <computeroutput>Key</computeroutput> and returns a value of type std::size_t.</entry></row>
1289 <entry><emphasis>Pred</emphasis></entry>
1290 <entry>A binary function object that implements an equivalence relation on values of type <computeroutput>Key</computeroutput>.
1291 A binary function object that induces an equivalence relation on values of type Key.
1292 It takes two arguments of type Key and returns a value of type bool.</entry></row>
1294 <entry><emphasis>Alloc</emphasis></entry>
1295 <entry>An allocator whose value type is the same as the container's value type.</entry></row></tbody></tgroup></informaltable></para>
1296 <para>The elements are organized into buckets. Keys with the same hash code are stored in the same bucket and elements with equivalent keys are stored next to each other.</para>
1297 <para>The number of buckets can be automatically increased by a call to insert, or as the result of calling rehash.</para>
1298 <refsect2><title><anchor id="boost.unordered_multimaptypes"/><computeroutput>unordered_multimap</computeroutput>
1300 types</title><orderedlist><listitem><para>
1301 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_multimap.size_type"/><phrase role="identifier">size_type</phrase><phrase role="special">;</phrase></para>
1302 <para>An unsigned integral type.</para>
1303 <para>size_type can represent any non-negative value of difference_type.</para>
1304 </listitem><listitem><para>
1305 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_multimap.difference_type"/><phrase role="identifier">difference_type</phrase><phrase role="special">;</phrase></para>
1306 <para>A signed integral type.</para>
1307 <para>Is identical to the difference type of iterator and const_iterator.</para>
1308 </listitem><listitem><para>
1309 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_multimap.iterator"/><phrase role="identifier">iterator</phrase><phrase role="special">;</phrase></para>
1310 <para>A iterator whose value type is value_type. </para>
1311 <para>The iterator category is at least a forward iterator.</para>
1312 <para>Convertible to const_iterator.</para>
1313 </listitem><listitem><para>
1314 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_multimap.const_iterator"/><phrase role="identifier">const_iterator</phrase><phrase role="special">;</phrase></para>
1315 <para>A constant iterator whose value type is value_type. </para>
1316 <para>The iterator category is at least a forward iterator.</para>
1317 </listitem><listitem><para>
1318 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_multimap.local_iterator"/><phrase role="identifier">local_iterator</phrase><phrase role="special">;</phrase></para>
1319 <para>An iterator with the same value type, difference type and pointer and reference type as iterator.</para>
1320 <para>A local_iterator object can be used to iterate through a single bucket.</para>
1321 </listitem><listitem><para>
1322 <phrase role="keyword">typedef</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis> <anchor id="boost.unordered_multimap.const_local_iterator"/><phrase role="identifier">const_local_iterator</phrase><phrase role="special">;</phrase></para>
1323 <para>A constant iterator with the same value type, difference type and pointer and reference type as const_iterator.</para>
1324 <para>A const_local_iterator object can be used to iterate through a single bucket.</para>
1325 </listitem></orderedlist></refsect2><refsect2><title><anchor id="boost.unordered_multimapconstruct-copy-destruct"/><computeroutput>unordered_multimap</computeroutput>
1327 construct/copy/destruct</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">explicit</phrase> <anchor id="id212-bb"/><phrase role="identifier">unordered_multimap</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n <phrase role="special">=</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis><phrase role="special">,</phrase>
1328 <phrase role="identifier">hasher</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> hf <phrase role="special">=</phrase> <phrase role="identifier">hasher</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
1329 <phrase role="identifier">key_equal</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> eq <phrase role="special">=</phrase> <phrase role="identifier">key_equal</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
1330 <phrase role="identifier">allocator_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> a <phrase role="special">=</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.</para><variablelist spacing="compact"><?dbhtml
1331 list-presentation="table"
1332 ?><varlistentry><term>Postconditions:</term><listitem><computeroutput><link linkend="id224-bb">size</link>() == 0</computeroutput></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> InputIterator<phrase role="special">></phrase>
1333 <anchor id="id213-bb"/><phrase role="identifier">unordered_multimap</phrase><phrase role="special">(</phrase><phrase role="identifier">InputIterator</phrase> f<phrase role="special">,</phrase> <phrase role="identifier">InputIterator</phrase> l<phrase role="special">,</phrase>
1334 <phrase role="identifier">size_type</phrase> n <phrase role="special">=</phrase> <emphasis><phrase role="identifier">implementation</phrase><phrase role="special">-</phrase><phrase role="identifier">defined</phrase></emphasis><phrase role="special">,</phrase>
1335 <phrase role="identifier">hasher</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> hf <phrase role="special">=</phrase> <phrase role="identifier">hasher</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
1336 <phrase role="identifier">key_equal</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> eq <phrase role="special">=</phrase> <phrase role="identifier">key_equal</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">,</phrase>
1337 <phrase role="identifier">allocator_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> a <phrase role="special">=</phrase> <phrase role="identifier">allocator_type</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.</para></listitem><listitem><para><literallayout class="monospaced"><anchor id="id214-bb"/><phrase role="identifier">unordered_multimap</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.</para><variablelist spacing="compact"><?dbhtml
1338 list-presentation="table"
1339 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>value_type</computeroutput> is copy constructible</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id215-bb"/><phrase role="identifier">unordered_multimap</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase> <phrase role="special">&&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>The move constructor.</para><variablelist spacing="compact"><?dbhtml
1340 list-presentation="table"
1341 ?><varlistentry><term>Notes:</term><listitem><para>This is emulated on compilers without rvalue references.</para></listitem></varlistentry><varlistentry><term>Requires:</term><listitem><para>
1342 <computeroutput>value_type</computeroutput> is move constructible.
1343 (TODO: This is not actually required in this implementation).
1344 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">explicit</phrase> <anchor id="id216-bb"/><phrase role="identifier">unordered_multimap</phrase><phrase role="special">(</phrase><phrase role="identifier">Allocator</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> a<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Constructs an empty container, using allocator <computeroutput>a</computeroutput>.</para></listitem><listitem><para><literallayout class="monospaced"><anchor id="id217-bb"/><phrase role="identifier">unordered_multimap</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> x<phrase role="special">,</phrase> <phrase role="identifier">Allocator</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> a<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Constructs an container, copying <computeroutput>x</computeroutput>'s contained elements, hash function, predicate, maximum load factor, but using allocator <computeroutput>a</computeroutput>.</para></listitem><listitem><para><literallayout class="monospaced"><anchor id="id218-bb"/><phrase role="special">~</phrase><phrase role="identifier">unordered_multimap</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1345 list-presentation="table"
1346 ?><varlistentry><term>Notes:</term><listitem><para>The destructor is applied to every element, and all memory is deallocated</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><para><literallayout class="monospaced"><phrase role="identifier">unordered_multimap</phrase><phrase role="special">&</phrase> <anchor id="id219-bb"/><phrase role="keyword">operator</phrase><phrase role="special">=</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>The assignment operator. Copies the contained elements, hash function, predicate and maximum load factor but not the allocator.</para><variablelist spacing="compact"><?dbhtml
1347 list-presentation="table"
1348 ?><varlistentry><term>Notes:</term><listitem><para>
1349 On compilers without rvalue references, there is a single assignment
1350 operator with the signature <computeroutput>operator=(unordered_multimap)</computeroutput>
1351 in order to emulate move semantics.
1352 </para></listitem></varlistentry><varlistentry><term>Requires:</term><listitem><para><computeroutput>value_type</computeroutput> is copy constructible</para></listitem></varlistentry></variablelist><para><literallayout class="monospaced"><phrase role="identifier">unordered_multimap</phrase><phrase role="special">&</phrase> <anchor id="id220-bb"/><phrase role="keyword">operator</phrase><phrase role="special">=</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase> <phrase role="special">&&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>The move assignment operator.</para><variablelist spacing="compact"><?dbhtml
1353 list-presentation="table"
1354 ?><varlistentry><term>Notes:</term><listitem><para>
1355 On compilers without rvalue references, there is a single assignment
1356 operator with the signature <computeroutput>operator=(unordered_multimap)</computeroutput>
1357 in order to emulate move semantics.
1358 </para></listitem></varlistentry><varlistentry><term>Requires:</term><listitem><para>
1359 <computeroutput>value_type</computeroutput> is move constructible.
1360 (TODO: This is not actually required in this implementation).
1361 </para></listitem></varlistentry></variablelist><para><literallayout class="monospaced"><phrase role="identifier">allocator_type</phrase> <anchor id="id221-bb"/><phrase role="identifier">get_allocator</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><refsect2><title><anchor id="id222-bb"/><computeroutput>unordered_multimap</computeroutput> size and capacity</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">bool</phrase> <anchor id="id223-bb"/><phrase role="identifier">empty</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1362 list-presentation="table"
1363 ?><varlistentry><term>Returns:</term><listitem><computeroutput><link linkend="id224-bb">size</link>() == 0</computeroutput></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id224-bb"/><phrase role="identifier">size</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1364 list-presentation="table"
1365 ?><varlistentry><term>Returns:</term><listitem><computeroutput>std::distance(<link linkend="id227-bb">begin</link>(), <link linkend="id230-bb">end</link>())</computeroutput></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id225-bb"/><phrase role="identifier">max_size</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1366 list-presentation="table"
1367 ?><varlistentry><term>Returns:</term><listitem><computeroutput><link linkend="id224-bb">size</link>()</computeroutput> of the largest possible container.
1368 </listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id226-bb"/><computeroutput>unordered_multimap</computeroutput> iterators</title><orderedlist><listitem><para><literallayout class="monospaced"><anchor id="id227-bb"/><phrase role="identifier">iterator</phrase> <anchor id="id228-bb"/><phrase role="identifier">begin</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1369 <phrase role="identifier">const_iterator</phrase> <anchor id="id229-bb"/><phrase role="identifier">begin</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1370 list-presentation="table"
1371 ?><varlistentry><term>Returns:</term><listitem>An iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
1372 </listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id230-bb"/><phrase role="identifier">iterator</phrase> <anchor id="id231-bb"/><phrase role="identifier">end</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
1373 <phrase role="identifier">const_iterator</phrase> <anchor id="id232-bb"/><phrase role="identifier">end</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1374 list-presentation="table"
1375 ?><varlistentry><term>Returns:</term><listitem>An iterator which refers to the past-the-end value for the container.
1376 </listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">const_iterator</phrase> <anchor id="id233-bb"/><phrase role="identifier">cbegin</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1377 list-presentation="table"
1378 ?><varlistentry><term>Returns:</term><listitem>A constant iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
1379 </listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">const_iterator</phrase> <anchor id="id234-bb"/><phrase role="identifier">cend</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1380 list-presentation="table"
1381 ?><varlistentry><term>Returns:</term><listitem>A constant iterator which refers to the past-the-end value for the container.
1382 </listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id235-bb"/><computeroutput>unordered_multimap</computeroutput> modifiers</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase><phrase role="special">...</phrase> Args<phrase role="special">></phrase> <phrase role="identifier">iterator</phrase> <anchor id="id236-bb"/><phrase role="identifier">emplace</phrase><phrase role="special">(</phrase><phrase role="identifier">Args</phrase><phrase role="special">&&</phrase><phrase role="special">...</phrase> args<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts an object, constructed with the arguments <computeroutput>args</computeroutput>, in the container.</para><variablelist spacing="compact"><?dbhtml
1383 list-presentation="table"
1384 ?><varlistentry><term>Returns:</term><listitem><para>An iterator pointing to the inserted element.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para><para>If the compiler doesn't support variadic template arguments or rvalue
1385 references, this is emulated for up to 10 arguments, with no support
1386 for rvalue references or move semantics.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase><phrase role="special">...</phrase> Args<phrase role="special">></phrase>
1387 <phrase role="identifier">iterator</phrase> <anchor id="id237-bb"/><phrase role="identifier">emplace_hint</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> hint<phrase role="special">,</phrase> <phrase role="identifier">Args</phrase><phrase role="special">&&</phrase><phrase role="special">...</phrase> args<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts an object, constructed with the arguments <computeroutput>args</computeroutput>, in the container.</para><para>hint is a suggestion to where the element should be inserted.</para><variablelist spacing="compact"><?dbhtml
1388 list-presentation="table"
1389 ?><varlistentry><term>Returns:</term><listitem><para>An iterator pointing to the inserted element.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same key. </para><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para><para>If the compiler doesn't support variadic template arguments or rvalue
1390 references, this is emulated for up to 10 arguments, with no support
1391 for rvalue references or move semantics.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">iterator</phrase> <anchor id="id238-bb"/><phrase role="identifier">insert</phrase><phrase role="special">(</phrase><phrase role="identifier">value_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> obj<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts obj in the container.</para><variablelist spacing="compact"><?dbhtml
1392 list-presentation="table"
1393 ?><varlistentry><term>Returns:</term><listitem><para>An iterator pointing to the inserted element.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">iterator</phrase> <anchor id="id239-bb"/><phrase role="identifier">insert</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> hint<phrase role="special">,</phrase> <phrase role="identifier">value_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> obj<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts obj in the container.</para><para>hint is a suggestion to where the element should be inserted.</para><variablelist spacing="compact"><?dbhtml
1394 list-presentation="table"
1395 ?><varlistentry><term>Returns:</term><listitem><para>An iterator pointing to the inserted element.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same key. </para><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> InputIterator<phrase role="special">></phrase>
1396 <phrase role="keyword">void</phrase> <anchor id="id240-bb"/><phrase role="identifier">insert</phrase><phrase role="special">(</phrase><phrase role="identifier">InputIterator</phrase> first<phrase role="special">,</phrase> <phrase role="identifier">InputIterator</phrase> last<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Inserts a range of elements into the container.</para><variablelist spacing="compact"><?dbhtml
1397 list-presentation="table"
1398 ?><varlistentry><term>Throws:</term><listitem><para>When inserting a single element, if an exception is thrown by an operation other than a call to <computeroutput>hasher</computeroutput> the function has no effect.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para><para>Pointers and references to elements are never invalidated.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">iterator</phrase> <anchor id="id241-bb"/><phrase role="identifier">erase</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> position<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erase the element pointed to by <computeroutput>position</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
1399 list-presentation="table"
1400 ?><varlistentry><term>Returns:</term><listitem><para>The iterator following <computeroutput>position</computeroutput> before the erasure.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para><para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>
1401 When the number of elements is a lot smaller than the number of buckets
1402 this function can be very inefficient as it has to search through empty
1403 buckets for the next element, in order to return the iterator.
1404 The method <link linkend="id244-bb">quick_erase</link> is faster, but has yet
1406 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id242-bb"/><phrase role="identifier">erase</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erase all elements with key equivalent to <computeroutput>k</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
1407 list-presentation="table"
1408 ?><varlistentry><term>Returns:</term><listitem><para>The number of elements erased.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">iterator</phrase> <anchor id="id243-bb"/><phrase role="identifier">erase</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> first<phrase role="special">,</phrase> <phrase role="identifier">const_iterator</phrase> last<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erases the elements in the range from <computeroutput>first</computeroutput> to <computeroutput>last</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
1409 list-presentation="table"
1410 ?><varlistentry><term>Returns:</term><listitem><para>The iterator following the erased elements - i.e. <computeroutput>last</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para><para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id244-bb"/><phrase role="identifier">quick_erase</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> position<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erase the element pointed to by <computeroutput>position</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
1411 list-presentation="table"
1412 ?><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para><para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>
1413 This method is faster than <link linkend="id241-bb">erase</link> as
1414 it doesn't have to find the next element in the container -
1415 a potentially costly operation.
1417 As it hasn't been standardized, it's likely that this may
1418 change in the future.
1419 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id245-bb"/><phrase role="identifier">erase_return_void</phrase><phrase role="special">(</phrase><phrase role="identifier">const_iterator</phrase> position<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erase the element pointed to by <computeroutput>position</computeroutput>.</para><variablelist spacing="compact"><?dbhtml
1420 list-presentation="table"
1421 ?><varlistentry><term>Throws:</term><listitem><para>Only throws an exception if it is thrown by <computeroutput>hasher</computeroutput> or <computeroutput>key_equal</computeroutput>.</para><para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>
1422 This method is now deprecated, use
1423 quick_return instead. Although be
1424 warned that as that isn't standardized yet, it could also
1426 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id246-bb"/><phrase role="identifier">clear</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Erases all elements in the container.</para><variablelist spacing="compact"><?dbhtml
1427 list-presentation="table"
1428 ?><varlistentry><term>Postconditions:</term><listitem><para><computeroutput><link linkend="id224-bb">size</link>() == 0</computeroutput></para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>Never throws an exception.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id247-bb"/><phrase role="identifier">swap</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase><phrase role="special">&</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1429 list-presentation="table"
1430 ?><varlistentry><term>Throws:</term><listitem><para>If the allocators are equal, doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of <computeroutput>key_equal</computeroutput> or <computeroutput>hasher</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>For a discussion of the behavior when allocators aren't equal see
1431 <link linkend="unordered.rationale.swapping_containers_with_unequal_allocators">the implementation details</link>.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id248-bb"/><computeroutput>unordered_multimap</computeroutput> observers</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="identifier">hasher</phrase> <anchor id="id249-bb"/><phrase role="identifier">hash_function</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1432 list-presentation="table"
1433 ?><varlistentry><term>Returns:</term><listitem>The container's hash function.
1434 </listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">key_equal</phrase> <anchor id="id250-bb"/><phrase role="identifier">key_eq</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1435 list-presentation="table"
1436 ?><varlistentry><term>Returns:</term><listitem>The container's key equality predicate.
1437 </listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id251-bb"/><computeroutput>unordered_multimap</computeroutput> lookup</title><orderedlist><listitem><para><literallayout class="monospaced"><anchor id="id252-bb"/><phrase role="identifier">iterator</phrase> <anchor id="id253-bb"/><phrase role="identifier">find</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase><phrase role="special">;</phrase>
1438 <phrase role="identifier">const_iterator</phrase> <anchor id="id254-bb"/><phrase role="identifier">find</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
1439 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> CompatibleKey<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> CompatibleHash<phrase role="special">,</phrase>
1440 <phrase role="keyword">typename</phrase> CompatiblePredicate<phrase role="special">></phrase>
1441 <phrase role="identifier">iterator</phrase> <anchor id="id255-bb"/><phrase role="identifier">find</phrase><phrase role="special">(</phrase><phrase role="identifier">CompatibleKey</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">,</phrase> <phrase role="identifier">CompatibleHash</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> hash<phrase role="special">,</phrase>
1442 <phrase role="identifier">CompatiblePredicate</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> eq<phrase role="special">)</phrase><phrase role="special">;</phrase>
1443 <phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> CompatibleKey<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> CompatibleHash<phrase role="special">,</phrase>
1444 <phrase role="keyword">typename</phrase> CompatiblePredicate<phrase role="special">></phrase>
1445 <phrase role="identifier">const_iterator</phrase>
1446 <anchor id="id256-bb"/><phrase role="identifier">find</phrase><phrase role="special">(</phrase><phrase role="identifier">CompatibleKey</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">,</phrase> <phrase role="identifier">CompatibleHash</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> hash<phrase role="special">,</phrase>
1447 <phrase role="identifier">CompatiblePredicate</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> eq<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1448 list-presentation="table"
1449 ?><varlistentry><term>Returns:</term><listitem><para>An iterator pointing to an element with key equivalent to <computeroutput>k</computeroutput>, or <computeroutput>b.end()</computeroutput> if no such element exists.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>
1450 The templated overloads are a non-standard extensions which
1451 allows you to use a compatible hash function and equality
1452 predicate for a key of a different type in order to avoid
1453 an expensive type cast. In general, its use is not encouraged.
1454 </para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id257-bb"/><phrase role="identifier">count</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1455 list-presentation="table"
1456 ?><varlistentry><term>Returns:</term><listitem><para>The number of elements with key equivalent to <computeroutput>k</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id258-bb"/><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">iterator</phrase><phrase role="special">></phrase> <anchor id="id259-bb"/><phrase role="identifier">equal_range</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase><phrase role="special">;</phrase>
1457 <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">pair</phrase><phrase role="special"><</phrase><phrase role="identifier">const_iterator</phrase><phrase role="special">,</phrase> <phrase role="identifier">const_iterator</phrase><phrase role="special">></phrase> <anchor id="id260-bb"/><phrase role="identifier">equal_range</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1458 list-presentation="table"
1459 ?><varlistentry><term>Returns:</term><listitem><para>A range containing all elements with key equivalent to <computeroutput>k</computeroutput>.
1460 If the container doesn't container any such elements, returns
1461 <computeroutput>std::make_pair(b.end(),b.end())</computeroutput>.
1462 </para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id261-bb"/><computeroutput>unordered_multimap</computeroutput> bucket interface</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id262-bb"/><phrase role="identifier">bucket_count</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1463 list-presentation="table"
1464 ?><varlistentry><term>Returns:</term><listitem><para>The number of buckets.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id263-bb"/><phrase role="identifier">max_bucket_count</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1465 list-presentation="table"
1466 ?><varlistentry><term>Returns:</term><listitem><para>An upper bound on the number of buckets.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id264-bb"/><phrase role="identifier">bucket_size</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1467 list-presentation="table"
1468 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n < <link linkend="id262-bb">bucket_count</link>()</computeroutput></para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>The number of elements in bucket <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">size_type</phrase> <anchor id="id265-bb"/><phrase role="identifier">bucket</phrase><phrase role="special">(</phrase><phrase role="identifier">key_type</phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> k<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1469 list-presentation="table"
1470 ?><varlistentry><term>Returns:</term><listitem><para>The index of the bucket which would contain an element with key <computeroutput>k</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Postconditions:</term><listitem><para>The return value is less than <computeroutput>bucket_count()</computeroutput></para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id266-bb"/><phrase role="identifier">local_iterator</phrase> <anchor id="id267-bb"/><phrase role="identifier">begin</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase><phrase role="special">;</phrase>
1471 <phrase role="identifier">const_local_iterator</phrase> <anchor id="id268-bb"/><phrase role="identifier">begin</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1472 list-presentation="table"
1473 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n</computeroutput> shall be in the range <computeroutput>[0, bucket_count())</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A local iterator pointing the first element in the bucket with index <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><anchor id="id269-bb"/><phrase role="identifier">local_iterator</phrase> <anchor id="id270-bb"/><phrase role="identifier">end</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase><phrase role="special">;</phrase>
1474 <phrase role="identifier">const_local_iterator</phrase> <anchor id="id271-bb"/><phrase role="identifier">end</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1475 list-presentation="table"
1476 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n</computeroutput> shall be in the range <computeroutput>[0, bucket_count())</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A local iterator pointing the 'one past the end' element in the bucket with index <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">const_local_iterator</phrase> <anchor id="id272-bb"/><phrase role="identifier">cbegin</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1477 list-presentation="table"
1478 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n</computeroutput> shall be in the range <computeroutput>[0, bucket_count())</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A constant local iterator pointing the first element in the bucket with index <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="identifier">const_local_iterator</phrase> <anchor id="id273-bb"/><phrase role="identifier">cend</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1479 list-presentation="table"
1480 ?><varlistentry><term>Requires:</term><listitem><para><computeroutput>n</computeroutput> shall be in the range <computeroutput>[0, bucket_count())</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Returns:</term><listitem><para>A constant local iterator pointing the 'one past the end' element in the bucket with index <computeroutput>n</computeroutput>.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id274-bb"/><computeroutput>unordered_multimap</computeroutput> hash policy</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">float</phrase> <anchor id="id275-bb"/><phrase role="identifier">load_factor</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1481 list-presentation="table"
1482 ?><varlistentry><term>Returns:</term><listitem><para>The average number of elements per bucket.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">float</phrase> <anchor id="id276-bb"/><phrase role="identifier">max_load_factor</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1483 list-presentation="table"
1484 ?><varlistentry><term>Returns:</term><listitem><para>Returns the current maximum load factor.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id277-bb"/><phrase role="identifier">max_load_factor</phrase><phrase role="special">(</phrase><phrase role="keyword">float</phrase> z<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1485 list-presentation="table"
1486 ?><varlistentry><term>Effects:</term><listitem><para>Changes the container's maximum load factor, using <computeroutput>z</computeroutput> as a hint.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id278-bb"/><phrase role="identifier">rehash</phrase><phrase role="special">(</phrase><phrase role="identifier">size_type</phrase> n<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para>Changes the number of buckets so that there at least <computeroutput>n</computeroutput> buckets, and so that the load factor is less than the maximum load factor.</para><para>Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.</para><variablelist spacing="compact"><?dbhtml
1487 list-presentation="table"
1488 ?><varlistentry><term>Throws:</term><listitem><para>The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id279-bb"/><computeroutput>unordered_multimap</computeroutput> Equality Comparisons</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
1489 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
1490 <phrase role="keyword">bool</phrase> <anchor id="boost.unordered_multimap.operator==_id1"/><phrase role="keyword">operator</phrase><phrase role="special">==</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> x<phrase role="special">,</phrase>
1491 <phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> y<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1492 list-presentation="table"
1493 ?><varlistentry><term>Notes:</term><listitem><para>This is a boost extension.</para><para>Behavior is undefined if the two containers don't have
1494 equivalent equality predicates.</para></listitem></varlistentry></variablelist></listitem><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
1495 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
1496 <phrase role="keyword">bool</phrase> <anchor id="boost.unordered_multimap.operator!=_id1"/><phrase role="keyword">operator</phrase><phrase role="special">!=</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> x<phrase role="special">,</phrase>
1497 <phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase> <phrase role="keyword">const</phrase><phrase role="special">&</phrase> y<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1498 list-presentation="table"
1499 ?><varlistentry><term>Notes:</term><listitem><para>This is a boost extension.</para><para>Behavior is undefined if the two containers don't have
1500 equivalent equality predicates.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2><refsect2><title><anchor id="id280-bb"/><computeroutput>unordered_multimap</computeroutput> swap</title><orderedlist><listitem><para><literallayout class="monospaced"><phrase role="keyword">template</phrase><phrase role="special"><</phrase><phrase role="keyword">typename</phrase> Key<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Mapped<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Hash<phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> Pred<phrase role="special">,</phrase>
1501 <phrase role="keyword">typename</phrase> Alloc<phrase role="special">></phrase>
1502 <phrase role="keyword">void</phrase> <anchor id="boost.unordered_multimap.swap_id1"/><phrase role="identifier">swap</phrase><phrase role="special">(</phrase><phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase> x<phrase role="special">,</phrase>
1503 <phrase role="identifier">unordered_multimap</phrase><phrase role="special"><</phrase><phrase role="identifier">Key</phrase><phrase role="special">,</phrase> <phrase role="identifier">Mapped</phrase><phrase role="special">,</phrase> <phrase role="identifier">Hash</phrase><phrase role="special">,</phrase> <phrase role="identifier">Pred</phrase><phrase role="special">,</phrase> <phrase role="identifier">Alloc</phrase><phrase role="special">></phrase><phrase role="special">&</phrase> y<phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><variablelist spacing="compact"><?dbhtml
1504 list-presentation="table"
1505 ?><varlistentry><term>Effects:</term><listitem><para><computeroutput>x.swap(y)</computeroutput></para></listitem></varlistentry><varlistentry><term>Throws:</term><listitem><para>If the allocators are equal, doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of <computeroutput>Hash</computeroutput> or <computeroutput>Pred</computeroutput>.</para></listitem></varlistentry><varlistentry><term>Notes:</term><listitem><para>For a discussion of the behavior when allocators aren't equal see
1506 <link linkend="unordered.rationale.swapping_containers_with_unequal_allocators">the implementation details</link>.</para></listitem></varlistentry></variablelist></listitem></orderedlist></refsect2></refsect1></refentry>