Imported Upstream version 1.64.0
[platform/upstream/boost.git] / libs / intrusive / doc / autodoc.xml
1 <?xml version="1.0" standalone="yes"?>
2 <library-reference><header name="boost/intrusive/any_hook.hpp">
3 <namespace name="boost">
4 <namespace name="intrusive">
5 <struct name="make_any_base_hook"><template>
6       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
7     </template><description><para>Helper metafunction to define a <computeroutput><computeroutput><classname alt="boost::intrusive::any_base_hook">any_base_hook</classname></computeroutput> that</computeroutput> yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
8 </struct><class name="any_base_hook"><template>
9       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
10     </template><inherit access="public">make_any_base_hook::type&lt; O1, O2, O3 &gt;</inherit><description><para>Derive a class from this hook in order to store objects of that class in an intrusive container.</para><para>The hook admits the following options: <computeroutput>tag&lt;&gt;</computeroutput>, <computeroutput>void_pointer&lt;&gt;</computeroutput> and <computeroutput>link_mode&lt;&gt;</computeroutput>.</para><para><computeroutput>tag&lt;&gt;</computeroutput> defines a tag to identify the node. The same tag value can be used in different classes, but if a class is derived from more than one <computeroutput><classname alt="boost::intrusive::any_base_hook">any_base_hook</classname></computeroutput>, then each <computeroutput><classname alt="boost::intrusive::any_base_hook">any_base_hook</classname></computeroutput> needs its unique tag.</para><para><computeroutput>link_mode&lt;&gt;</computeroutput> will specify the linking mode of the hook (<computeroutput>normal_link</computeroutput>, <computeroutput>safe_link</computeroutput>).</para><para><computeroutput>void_pointer&lt;&gt;</computeroutput> is the pointer type that will be used internally in the hook and the container configured to use this hook. </para></description><method-group name="public member functions">
11 <method name="is_linked" cv="const"><type>bool</type><description><para><emphasis role="bold">Precondition</emphasis>: <classname alt="boost::intrusive::link_mode">link_mode</classname> must be <computeroutput>safe_link</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: true, if the node belongs to a container, false otherwise. This function can be used to test whether <computeroutput>container::iterator_to</computeroutput> will return a valid iterator.</para><para><emphasis role="bold">Complexity</emphasis>: Constant </para></description></method>
12 </method-group>
13 <constructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></constructor>
14 <constructor><parameter name=""><paramtype>const <classname>any_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing a copy-constructor makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></constructor>
15 <copy-assignment><type><classname>any_base_hook</classname> &amp;</type><parameter name=""><paramtype>const <classname>any_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Empty function. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing an assignment operator makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></copy-assignment>
16 <destructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>normal_link</computeroutput>, the destructor does nothing (ie. no code is generated). If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>safe_link</computeroutput> and the object is stored in a container an assertion is raised.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
17 </class><struct name="make_any_member_hook"><template>
18       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
19     </template><description><para>Helper metafunction to define a <computeroutput><computeroutput><classname alt="boost::intrusive::any_member_hook">any_member_hook</classname></computeroutput> that</computeroutput> yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
20 </struct><class name="any_member_hook"><template>
21       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
22     </template><inherit access="public">make_any_member_hook::type&lt; O1, O2, O3 &gt;</inherit><description><para>Store this hook in a class to be inserted in an intrusive container.</para><para>The hook admits the following options: <computeroutput>void_pointer&lt;&gt;</computeroutput> and <computeroutput>link_mode&lt;&gt;</computeroutput>.</para><para><computeroutput>link_mode&lt;&gt;</computeroutput> will specify the linking mode of the hook (<computeroutput>normal_link</computeroutput> or <computeroutput>safe_link</computeroutput>).</para><para><computeroutput>void_pointer&lt;&gt;</computeroutput> is the pointer type that will be used internally in the hook and the container configured to use this hook. </para></description><method-group name="public member functions">
23 <method name="is_linked" cv="const"><type>bool</type><description><para><emphasis role="bold">Precondition</emphasis>: <classname alt="boost::intrusive::link_mode">link_mode</classname> must be <computeroutput>safe_link</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: true, if the node belongs to a container, false otherwise. This function can be used to test whether <computeroutput>container::iterator_to</computeroutput> will return a valid iterator.</para><para><emphasis role="bold">Complexity</emphasis>: Constant </para></description></method>
24 </method-group>
25 <constructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></constructor>
26 <constructor><parameter name=""><paramtype>const <classname>any_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing a copy-constructor makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></constructor>
27 <copy-assignment><type><classname>any_member_hook</classname> &amp;</type><parameter name=""><paramtype>const <classname>any_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Empty function. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing an assignment operator makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></copy-assignment>
28 <destructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>normal_link</computeroutput>, the destructor does nothing (ie. no code is generated). If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>safe_link</computeroutput> and the object is stored in a container an assertion is raised.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
29 </class><struct name="any_to_slist_hook"><template>
30       <template-type-parameter name="BasicHook"/>
31     </template><description><para>This option setter specifies that any hook should behave as an slist hook </para></description></struct><struct name="any_to_list_hook"><template>
32       <template-type-parameter name="BasicHook"/>
33     </template><description><para>This option setter specifies that any hook should behave as an list hook </para></description></struct><struct name="any_to_set_hook"><template>
34       <template-type-parameter name="BasicHook"/>
35     </template><description><para>This option setter specifies that any hook should behave as a set hook </para></description></struct><struct name="any_to_avl_set_hook"><template>
36       <template-type-parameter name="BasicHook"/>
37     </template><description><para>This option setter specifies that any hook should behave as an <classname alt="boost::intrusive::avl_set">avl_set</classname> hook </para></description></struct><struct name="any_to_bs_set_hook"><template>
38       <template-type-parameter name="BasicHook"/>
39     </template><description><para>This option setter specifies that any hook should behave as a <classname alt="boost::intrusive::bs_set">bs_set</classname> hook </para></description></struct><struct name="any_to_unordered_set_hook"><template>
40       <template-type-parameter name="BasicHook"/>
41     </template><description><para>This option setter specifies that any hook should behave as an unordered set hook </para></description></struct>
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93 </namespace>
94 </namespace>
95 </header>
96 <header name="boost/intrusive/avl_set.hpp">
97 <namespace name="boost">
98 <namespace name="intrusive">
99 <class name="avl_set"><template>
100       <template-type-parameter name="T"/>
101       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
102     </template><description><para>The class template <classname alt="boost::intrusive::avl_set">avl_set</classname> is an intrusive container, that mimics most of the interface of std::set as described in the C++ standard.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput> and <computeroutput>compare&lt;&gt;</computeroutput>. </para></description><typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
103 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
104 <typedef name="key_of_value"><type>implementation_defined::key_of_value</type></typedef>
105 <typedef name="value_traits"><type>implementation_defined::value_traits</type></typedef>
106 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
107 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
108 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
109 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
110 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
111 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
112 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
113 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
114 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
115 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
116 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
117 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
118 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
119 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
120 <typedef name="node"><type>implementation_defined::node</type></typedef>
121 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
122 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
123 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
124 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
125 <method-group name="public member functions">
126 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
127 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
128 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
129 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
130 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
131 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
132 <method name="avlegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
133 <method name="avlegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
134 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
135 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
136 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
137 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
138 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
139 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
140 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
141 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
142 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
143 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
144 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
145 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>avl_set</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two containers.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
146 <method name="clone_from"><type>void</type><template>
147           <template-type-parameter name="Cloner"/>
148           <template-type-parameter name="Disposer"/>
149         </template><parameter name="src"><paramtype>const <classname>avl_set</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. </para></description></method>
150 <method name="clone_from"><type>void</type><template>
151           <template-type-parameter name="Cloner"/>
152           <template-type-parameter name="Disposer"/>
153         </template><parameter name="src"><paramtype><classname>avl_set</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: This version can modify the source container, useful to implement move semantics. </para></description></method>
154 <method name="insert"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container if the value is not already present.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
155 <method name="insert"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert x into the container, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time (two comparisons in the worst case) if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
156 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
157 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
158 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
159           <template-type-parameter name="KeyType"/>
160           <template-type-parameter name="KeyTypeKeyCompare"/>
161         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
162 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
163           <template-type-parameter name="KeyType"/>
164           <template-type-parameter name="KeyTypeKeyCompare"/>
165         </template><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the constructing that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that key to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This can give a total constant-time complexity to the insertion: check(O(1)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
166 <method name="insert"><type>void</type><template>
167           <template-type-parameter name="Iterator"/>
168         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert each element of a range into the container.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
169 <method name="insert_commit"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue of type value_type. commit_data must have been obtained from a previous call to "insert_check". No objects should have been inserted or erased from the container between the "insert_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the container using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the newly inserted object.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
170 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
171 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
172 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
173 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
174 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
175 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
176 <method name="erase"><type>size_type</type><template>
177           <template-type-parameter name="KeyType"/>
178           <template-type-parameter name="KeyTypeKeyCompare"/>
179         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
180 <method name="erase_and_dispose"><type>iterator</type><template>
181           <template-type-parameter name="Disposer"/>
182         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
183 <method name="erase_and_dispose"><type>iterator</type><template>
184           <template-type-parameter name="Disposer"/>
185         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
186 <method name="erase_and_dispose"><type>size_type</type><template>
187           <template-type-parameter name="Disposer"/>
188         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
189 <method name="erase_and_dispose"><type>size_type</type><template>
190           <template-type-parameter name="KeyType"/>
191           <template-type-parameter name="KeyTypeKeyCompare"/>
192           <template-type-parameter name="Disposer"/>
193         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk) and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
194 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
195 <method name="clear_and_dispose"><type>void</type><template>
196           <template-type-parameter name="Disposer"/>
197         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
198 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
199 <method name="count" cv="const"><type>size_type</type><template>
200           <template-type-parameter name="KeyType"/>
201           <template-type-parameter name="KeyTypeKeyCompare"/>
202         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
203 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
204 <method name="lower_bound"><type>iterator</type><template>
205           <template-type-parameter name="KeyType"/>
206           <template-type-parameter name="KeyTypeKeyCompare"/>
207         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
208 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
209 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
210           <template-type-parameter name="KeyType"/>
211           <template-type-parameter name="KeyTypeKeyCompare"/>
212         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
213 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
214 <method name="upper_bound"><type>iterator</type><template>
215           <template-type-parameter name="KeyType"/>
216           <template-type-parameter name="KeyTypeKeyCompare"/>
217         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
218 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
219 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
220           <template-type-parameter name="KeyType"/>
221           <template-type-parameter name="KeyTypeKeyCompare"/>
222         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
223 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
224 <method name="find"><type>iterator</type><template>
225           <template-type-parameter name="KeyType"/>
226           <template-type-parameter name="KeyTypeKeyCompare"/>
227         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
228 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
229 <method name="find" cv="const"><type>const_iterator</type><template>
230           <template-type-parameter name="KeyType"/>
231           <template-type-parameter name="KeyTypeKeyCompare"/>
232         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
233 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
234 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
235           <template-type-parameter name="KeyType"/>
236           <template-type-parameter name="KeyTypeKeyCompare"/>
237         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
238 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
239 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
240           <template-type-parameter name="KeyType"/>
241           <template-type-parameter name="KeyTypeKeyCompare"/>
242         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
243 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
244 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
245           <template-type-parameter name="KeyType"/>
246           <template-type-parameter name="KeyTypeKeyCompare"/>
247         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
248 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
249 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
250           <template-type-parameter name="KeyType"/>
251           <template-type-parameter name="KeyTypeKeyCompare"/>
252         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
253 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
254 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
255 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
256 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
257 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
258 <method name="merge"><type>void</type><template>
259           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
260         </template><parameter name="source"><paramtype><classname>avl_set</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
261 <method name="merge"><type>void</type><template>
262           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
263         </template><parameter name="source"><paramtype><classname>avl_multiset</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
264 </method-group>
265 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
266 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container with given comparison and traits.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
267 <constructor><template>
268           <template-type-parameter name="Iterator"/>
269         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare object throws. Basic guarantee. </para></description></constructor>
270 <constructor><parameter name="x"><paramtype><classname>avl_set</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
271 <copy-assignment><type><classname>avl_set</classname> &amp;</type><parameter name="x"><paramtype><classname>avl_set</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
272 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
273 <method-group name="public static functions">
274 <method name="container_from_end_iterator" specifiers="static"><type><classname>avl_set</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
275 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>avl_set</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
276 <method name="container_from_iterator" specifiers="static"><type><classname>avl_set</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
277 <method name="container_from_iterator" specifiers="static"><type>const <classname>avl_set</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
278 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
279 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
280 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
281 </method-group>
282 </class><struct name="make_avl_set"><template>
283       <template-type-parameter name="T"/>
284       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
285     </template><description><para>Helper metafunction to define a <computeroutput>set</computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
286 </struct><class name="avl_multiset"><template>
287       <template-type-parameter name="T"/>
288       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
289     </template><description><para>The class template <classname alt="boost::intrusive::avl_multiset">avl_multiset</classname> is an intrusive container, that mimics most of the interface of std::_multiset as described in the C++ standard.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput> and <computeroutput>compare&lt;&gt;</computeroutput>. </para></description><typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
290 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
291 <typedef name="key_of_value"><type>implementation_defined::key_of_value</type></typedef>
292 <typedef name="value_traits"><type>implementation_defined::value_traits</type></typedef>
293 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
294 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
295 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
296 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
297 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
298 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
299 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
300 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
301 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
302 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
303 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
304 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
305 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
306 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
307 <typedef name="node"><type>implementation_defined::node</type></typedef>
308 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
309 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
310 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
311 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
312 <method-group name="public member functions">
313 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
314 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
315 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
316 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
317 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
318 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
319 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
320 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
321 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
322 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
323 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
324 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
325 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
326 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
327 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
328 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
329 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
330 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
331 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
332 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>avl_multiset</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two containers.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
333 <method name="clone_from"><type>void</type><template>
334           <template-type-parameter name="Cloner"/>
335           <template-type-parameter name="Disposer"/>
336         </template><parameter name="src"><paramtype>const <classname>avl_multiset</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. </para></description></method>
337 <method name="clone_from"><type>void</type><template>
338           <template-type-parameter name="Cloner"/>
339           <template-type-parameter name="Disposer"/>
340         </template><parameter name="src"><paramtype><classname>avl_multiset</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: This version can modify the source container, useful to implement move semantics. </para></description></method>
341 <method name="insert"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container before the upper bound.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
342 <method name="insert"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator.</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case)</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
343 <method name="insert"><type>void</type><template>
344           <template-type-parameter name="Iterator"/>
345         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Inserts a each element of a range into the container before the upper bound of the key of each element.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
346 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
347 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
348 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
349 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
350 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
351 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
352 <method name="erase"><type>size_type</type><template>
353           <template-type-parameter name="KeyType"/>
354           <template-type-parameter name="KeyTypeKeyCompare"/>
355         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
356 <method name="erase_and_dispose"><type>iterator</type><template>
357           <template-type-parameter name="Disposer"/>
358         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
359 <method name="erase_and_dispose"><type>iterator</type><template>
360           <template-type-parameter name="Disposer"/>
361         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
362 <method name="erase_and_dispose"><type>size_type</type><template>
363           <template-type-parameter name="Disposer"/>
364         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
365 <method name="erase_and_dispose"><type>size_type</type><template>
366           <template-type-parameter name="KeyType"/>
367           <template-type-parameter name="KeyTypeKeyCompare"/>
368           <template-type-parameter name="Disposer"/>
369         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk) and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
370 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
371 <method name="clear_and_dispose"><type>void</type><template>
372           <template-type-parameter name="Disposer"/>
373         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
374 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
375 <method name="count" cv="const"><type>size_type</type><template>
376           <template-type-parameter name="KeyType"/>
377           <template-type-parameter name="KeyTypeKeyCompare"/>
378         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
379 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
380 <method name="lower_bound"><type>iterator</type><template>
381           <template-type-parameter name="KeyType"/>
382           <template-type-parameter name="KeyTypeKeyCompare"/>
383         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
384 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
385 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
386           <template-type-parameter name="KeyType"/>
387           <template-type-parameter name="KeyTypeKeyCompare"/>
388         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
389 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
390 <method name="upper_bound"><type>iterator</type><template>
391           <template-type-parameter name="KeyType"/>
392           <template-type-parameter name="KeyTypeKeyCompare"/>
393         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
394 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
395 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
396           <template-type-parameter name="KeyType"/>
397           <template-type-parameter name="KeyTypeKeyCompare"/>
398         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
399 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
400 <method name="find"><type>iterator</type><template>
401           <template-type-parameter name="KeyType"/>
402           <template-type-parameter name="KeyTypeKeyCompare"/>
403         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
404 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
405 <method name="find" cv="const"><type>const_iterator</type><template>
406           <template-type-parameter name="KeyType"/>
407           <template-type-parameter name="KeyTypeKeyCompare"/>
408         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
409 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
410 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
411           <template-type-parameter name="KeyType"/>
412           <template-type-parameter name="KeyTypeKeyCompare"/>
413         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
414 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
415 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
416           <template-type-parameter name="KeyType"/>
417           <template-type-parameter name="KeyTypeKeyCompare"/>
418         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
419 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
420 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
421           <template-type-parameter name="KeyType"/>
422           <template-type-parameter name="KeyTypeKeyCompare"/>
423         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
424 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;key</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
425 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
426           <template-type-parameter name="KeyType"/>
427           <template-type-parameter name="KeyTypeKeyCompare"/>
428         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
429 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
430 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
431 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
432 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
433 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
434 <method name="merge"><type>void</type><template>
435           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
436         </template><parameter name="source"><paramtype><classname>avl_multiset</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Extracts each element in source and insert it into a using the comparison object of *this.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
437 <method name="merge"><type>void</type><template>
438           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
439         </template><parameter name="source"><paramtype><classname>avl_set</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Extracts each element in source and insert it into a using the comparison object of *this.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
440 </method-group>
441 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
442 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container with given comparison and traits.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
443 <constructor><template>
444           <template-type-parameter name="Iterator"/>
445         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare object throws. Basic guarantee. </para></description></constructor>
446 <constructor><parameter name="x"><paramtype><classname>avl_multiset</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
447 <copy-assignment><type><classname>avl_multiset</classname> &amp;</type><parameter name="x"><paramtype><classname>avl_multiset</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
448 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
449 <method-group name="public static functions">
450 <method name="container_from_end_iterator" specifiers="static"><type><classname>avl_multiset</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
451 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>avl_multiset</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
452 <method name="container_from_iterator" specifiers="static"><type><classname>avl_multiset</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
453 <method name="container_from_iterator" specifiers="static"><type>const <classname>avl_multiset</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
454 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
455 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
456 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
457 </method-group>
458 </class><struct name="make_avl_multiset"><template>
459       <template-type-parameter name="T"/>
460       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
461     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::avl_multiset">avl_multiset</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
462 </struct><function name="operator!="><type>bool</type><template>
463           <template-type-parameter name="T"/>
464           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
465         </template><parameter name="x"><paramtype>const <classname>avl_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>avl_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
466 <function name="operator&gt;"><type>bool</type><template>
467           <template-type-parameter name="T"/>
468           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
469         </template><parameter name="x"><paramtype>const <classname>avl_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>avl_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
470 <function name="operator&lt;="><type>bool</type><template>
471           <template-type-parameter name="T"/>
472           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
473         </template><parameter name="x"><paramtype>const <classname>avl_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>avl_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
474 <function name="operator&gt;="><type>bool</type><template>
475           <template-type-parameter name="T"/>
476           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
477         </template><parameter name="x"><paramtype>const <classname>avl_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>avl_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
478 <function name="swap"><type>void</type><template>
479           <template-type-parameter name="T"/>
480           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
481         </template><parameter name="x"><paramtype><classname>avl_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype><classname>avl_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
482 <function name="operator!="><type>bool</type><template>
483           <template-type-parameter name="T"/>
484           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
485         </template><parameter name="x"><paramtype>const <classname>avl_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>avl_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
486 <function name="operator&gt;"><type>bool</type><template>
487           <template-type-parameter name="T"/>
488           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
489         </template><parameter name="x"><paramtype>const <classname>avl_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>avl_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
490 <function name="operator&lt;="><type>bool</type><template>
491           <template-type-parameter name="T"/>
492           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
493         </template><parameter name="x"><paramtype>const <classname>avl_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>avl_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
494 <function name="operator&gt;="><type>bool</type><template>
495           <template-type-parameter name="T"/>
496           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
497         </template><parameter name="x"><paramtype>const <classname>avl_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>avl_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
498 <function name="swap"><type>void</type><template>
499           <template-type-parameter name="T"/>
500           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
501         </template><parameter name="x"><paramtype><classname>avl_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype><classname>avl_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544 </namespace>
545 </namespace>
546 </header>
547 <header name="boost/intrusive/avl_set_hook.hpp">
548 <namespace name="boost">
549 <namespace name="intrusive">
550 <struct name="make_avl_set_base_hook"><template>
551       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
552     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::avl_set_base_hook">avl_set_base_hook</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
553 </struct><class name="avl_set_base_hook"><template>
554       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
555     </template><inherit access="public">make_avl_set_base_hook::type&lt; O1, O2, O3, O4 &gt;</inherit><description><para>Derive a class from <classname alt="boost::intrusive::avl_set_base_hook">avl_set_base_hook</classname> in order to store objects in in an avl_set/avl_multiset. <classname alt="boost::intrusive::avl_set_base_hook">avl_set_base_hook</classname> holds the data necessary to maintain the avl_set/avl_multiset and provides an appropriate <classname alt="boost::intrusive::value_traits">value_traits</classname> class for avl_set/avl_multiset.</para><para>The hook admits the following options: <computeroutput>tag&lt;&gt;</computeroutput>, <computeroutput>void_pointer&lt;&gt;</computeroutput>, <computeroutput>link_mode&lt;&gt;</computeroutput> and <computeroutput>optimize_size&lt;&gt;</computeroutput>.</para><para><computeroutput>tag&lt;&gt;</computeroutput> defines a tag to identify the node. The same tag value can be used in different classes, but if a class is derived from more than one <computeroutput><classname alt="boost::intrusive::list_base_hook">list_base_hook</classname></computeroutput>, then each <computeroutput><classname alt="boost::intrusive::list_base_hook">list_base_hook</classname></computeroutput> needs its unique tag.</para><para><computeroutput>void_pointer&lt;&gt;</computeroutput> is the pointer type that will be used internally in the hook and the container configured to use this hook.</para><para><computeroutput>link_mode&lt;&gt;</computeroutput> will specify the linking mode of the hook (<computeroutput>normal_link</computeroutput>, <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput>).</para><para><computeroutput>optimize_size&lt;&gt;</computeroutput> will tell the hook to optimize the hook for size instead of speed. </para></description><method-group name="public member functions">
556 <method name="swap_nodes"><type>void</type><parameter name="other"><paramtype><classname>avl_set_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swapping two nodes swaps the position of the elements related to those nodes in one or two containers. That is, if the node this is part of the element e1, the node x is part of the element e2 and both elements are included in the containers s1 and s2, then after the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 at the position of e1. If one element is not in a container, then after the swap-operation the other element is not in a container. Iterators to e1 and e2 related to those nodes are invalidated.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
557 <method name="is_linked" cv="const"><type>bool</type><description><para><emphasis role="bold">Precondition</emphasis>: <classname alt="boost::intrusive::link_mode">link_mode</classname> must be <computeroutput>safe_link</computeroutput> or <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: true, if the node belongs to a container, false otherwise. This function can be used to test whether <computeroutput>set::iterator_to</computeroutput> will return a valid iterator.</para><para><emphasis role="bold">Complexity</emphasis>: Constant </para></description></method>
558 <method name="unlink"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Removes the node if it's inserted in a container. This function is only allowed if <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
559 </method-group>
560 <constructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></constructor>
561 <constructor><parameter name=""><paramtype>const <classname>avl_set_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing a copy-constructor makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></constructor>
562 <copy-assignment><type><classname>avl_set_base_hook</classname> &amp;</type><parameter name=""><paramtype>const <classname>avl_set_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Empty function. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing an assignment operator makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></copy-assignment>
563 <destructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>normal_link</computeroutput>, the destructor does nothing (ie. no code is generated). If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>safe_link</computeroutput> and the object is stored in a set an assertion is raised. If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> and <computeroutput>is_linked()</computeroutput> is true, the node is unlinked.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
564 </class><struct name="make_avl_set_member_hook"><template>
565       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
566     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::avl_set_member_hook">avl_set_member_hook</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
567 </struct><class name="avl_set_member_hook"><template>
568       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
569     </template><inherit access="public">make_avl_set_member_hook::type&lt; O1, O2, O3, O4 &gt;</inherit><description><para>Put a public data member <classname alt="boost::intrusive::avl_set_member_hook">avl_set_member_hook</classname> in order to store objects of this class in an avl_set/avl_multiset. <classname alt="boost::intrusive::avl_set_member_hook">avl_set_member_hook</classname> holds the data necessary for maintaining the avl_set/avl_multiset and provides an appropriate <classname alt="boost::intrusive::value_traits">value_traits</classname> class for avl_set/avl_multiset.</para><para>The hook admits the following options: <computeroutput>void_pointer&lt;&gt;</computeroutput>, <computeroutput>link_mode&lt;&gt;</computeroutput> and <computeroutput>optimize_size&lt;&gt;</computeroutput>.</para><para><computeroutput>void_pointer&lt;&gt;</computeroutput> is the pointer type that will be used internally in the hook and the container configured to use this hook.</para><para><computeroutput>link_mode&lt;&gt;</computeroutput> will specify the linking mode of the hook (<computeroutput>normal_link</computeroutput>, <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput>).</para><para><computeroutput>optimize_size&lt;&gt;</computeroutput> will tell the hook to optimize the hook for size instead of speed. </para></description><method-group name="public member functions">
570 <method name="swap_nodes"><type>void</type><parameter name="other"><paramtype><classname>avl_set_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swapping two nodes swaps the position of the elements related to those nodes in one or two containers. That is, if the node this is part of the element e1, the node x is part of the element e2 and both elements are included in the containers s1 and s2, then after the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 at the position of e1. If one element is not in a container, then after the swap-operation the other element is not in a container. Iterators to e1 and e2 related to those nodes are invalidated.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
571 <method name="is_linked" cv="const"><type>bool</type><description><para><emphasis role="bold">Precondition</emphasis>: <classname alt="boost::intrusive::link_mode">link_mode</classname> must be <computeroutput>safe_link</computeroutput> or <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: true, if the node belongs to a container, false otherwise. This function can be used to test whether <computeroutput>set::iterator_to</computeroutput> will return a valid iterator.</para><para><emphasis role="bold">Complexity</emphasis>: Constant </para></description></method>
572 <method name="unlink"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Removes the node if it's inserted in a container. This function is only allowed if <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
573 </method-group>
574 <constructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></constructor>
575 <constructor><parameter name=""><paramtype>const <classname>avl_set_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing a copy-constructor makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></constructor>
576 <copy-assignment><type><classname>avl_set_member_hook</classname> &amp;</type><parameter name=""><paramtype>const <classname>avl_set_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Empty function. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing an assignment operator makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></copy-assignment>
577 <destructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>normal_link</computeroutput>, the destructor does nothing (ie. no code is generated). If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>safe_link</computeroutput> and the object is stored in a set an assertion is raised. If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> and <computeroutput>is_linked()</computeroutput> is true, the node is unlinked.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
578 </class>
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630 </namespace>
631 </namespace>
632 </header>
633 <header name="boost/intrusive/avltree.hpp">
634 <namespace name="boost">
635 <namespace name="intrusive">
636 <class name="avltree"><template>
637       <template-type-parameter name="T"/>
638       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
639     </template><description><para>The class template avltree is an intrusive AVL tree container, that is used to construct intrusive <classname alt="boost::intrusive::avl_set">avl_set</classname> and <classname alt="boost::intrusive::avl_multiset">avl_multiset</classname> containers. The no-throw guarantee holds only, if the key_compare object doesn't throw.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput> and <computeroutput>compare&lt;&gt;</computeroutput>. </para></description><typedef name="value_traits"><type>ValueTraits</type></typedef>
640 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
641 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
642 <typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
643 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
644 <typedef name="key_of_value"><type>implementation_defined::key_of_value</type></typedef>
645 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
646 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
647 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
648 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
649 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
650 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
651 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
652 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
653 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
654 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
655 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
656 <typedef name="node"><type>implementation_defined::node</type></typedef>
657 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
658 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
659 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
660 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
661 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
662 <method-group name="public member functions">
663 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
664 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
665 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
666 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
667 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
668 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
669 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
670 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
671 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
672 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
673 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
674 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
675 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
676 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
677 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
678 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
679 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
680 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
681 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
682 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>avltree</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two containers.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
683 <method name="clone_from"><type>void</type><template>
684           <template-type-parameter name="Cloner"/>
685           <template-type-parameter name="Disposer"/>
686         </template><parameter name="src"><paramtype>const <classname>avltree</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. </para></description></method>
687 <method name="clone_from"><type>void</type><template>
688           <template-type-parameter name="Cloner"/>
689           <template-type-parameter name="Disposer"/>
690         </template><parameter name="src"><paramtype><classname>avltree</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: This version can modify the source container, useful to implement move semantics. </para></description></method>
691 <method name="insert_equal"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container before the upper bound.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
692 <method name="insert_equal"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator.</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case)</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
693 <method name="insert_equal"><type>void</type><template>
694           <template-type-parameter name="Iterator"/>
695         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Inserts a each element of a range into the container before the upper bound of the key of each element.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
696 <method name="insert_unique"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container if the value is not already present.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
697 <method name="insert_unique"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert x into the container, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time (two comparisons in the worst case) if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
698 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
699           <template-type-parameter name="KeyType"/>
700           <template-type-parameter name="KeyTypeKeyCompare"/>
701         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
702 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
703           <template-type-parameter name="KeyType"/>
704           <template-type-parameter name="KeyTypeKeyCompare"/>
705         </template><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the constructing that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that key to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This can give a total constant-time complexity to the insertion: check(O(1)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
706 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
707 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
708 <method name="insert_unique_commit"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue of type value_type. commit_data must have been obtained from a previous call to "insert_check". No objects should have been inserted or erased from the container between the "insert_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the container using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the newly inserted object.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
709 <method name="insert_unique"><type>void</type><template>
710           <template-type-parameter name="Iterator"/>
711         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert each element of a range into the container.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
712 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
713 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
714 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
715 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
716 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
717 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
718 <method name="erase"><type>size_type</type><template>
719           <template-type-parameter name="KeyType"/>
720           <template-type-parameter name="KeyTypeKeyCompare"/>
721         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
722 <method name="erase_and_dispose"><type>iterator</type><template>
723           <template-type-parameter name="Disposer"/>
724         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
725 <method name="erase_and_dispose"><type>iterator</type><template>
726           <template-type-parameter name="Disposer"/>
727         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
728 <method name="erase_and_dispose"><type>size_type</type><template>
729           <template-type-parameter name="Disposer"/>
730         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
731 <method name="erase_and_dispose"><type>size_type</type><template>
732           <template-type-parameter name="KeyType"/>
733           <template-type-parameter name="KeyTypeKeyCompare"/>
734           <template-type-parameter name="Disposer"/>
735         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk) and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
736 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
737 <method name="clear_and_dispose"><type>void</type><template>
738           <template-type-parameter name="Disposer"/>
739         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
740 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
741 <method name="count" cv="const"><type>size_type</type><template>
742           <template-type-parameter name="KeyType"/>
743           <template-type-parameter name="KeyTypeKeyCompare"/>
744         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
745 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
746 <method name="lower_bound"><type>iterator</type><template>
747           <template-type-parameter name="KeyType"/>
748           <template-type-parameter name="KeyTypeKeyCompare"/>
749         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
750 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
751 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
752           <template-type-parameter name="KeyType"/>
753           <template-type-parameter name="KeyTypeKeyCompare"/>
754         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
755 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
756 <method name="upper_bound"><type>iterator</type><template>
757           <template-type-parameter name="KeyType"/>
758           <template-type-parameter name="KeyTypeKeyCompare"/>
759         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
760 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
761 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
762           <template-type-parameter name="KeyType"/>
763           <template-type-parameter name="KeyTypeKeyCompare"/>
764         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
765 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
766 <method name="find"><type>iterator</type><template>
767           <template-type-parameter name="KeyType"/>
768           <template-type-parameter name="KeyTypeKeyCompare"/>
769         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
770 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
771 <method name="find" cv="const"><type>const_iterator</type><template>
772           <template-type-parameter name="KeyType"/>
773           <template-type-parameter name="KeyTypeKeyCompare"/>
774         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
775 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
776 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
777           <template-type-parameter name="KeyType"/>
778           <template-type-parameter name="KeyTypeKeyCompare"/>
779         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
780 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
781 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
782           <template-type-parameter name="KeyType"/>
783           <template-type-parameter name="KeyTypeKeyCompare"/>
784         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
785 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
786 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
787           <template-type-parameter name="KeyType"/>
788           <template-type-parameter name="KeyTypeKeyCompare"/>
789         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
790 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
791 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
792           <template-type-parameter name="KeyType"/>
793           <template-type-parameter name="KeyTypeKeyCompare"/>
794         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
795 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
796 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
797 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
798 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
799 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
800 <method name="merge_unique"><type>void</type><template>
801           <template-type-parameter name="T"/>
802           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
803         </template><parameter name=""><paramtype><classname>avltree</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
804 <method name="merge_equal"><type>void</type><template>
805           <template-type-parameter name="T"/>
806           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
807         </template><parameter name=""><paramtype><classname>avltree</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Extracts each element in source and insert it into a using the comparison object of *this.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
808 </method-group>
809 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
810 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container with given comparison and traits.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
811 <constructor><template>
812           <template-type-parameter name="Iterator"/>
813         </template><parameter name="unique"><paramtype>bool</paramtype></parameter><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare object throws. Basic guarantee. </para></description></constructor>
814 <constructor><parameter name="x"><paramtype><classname>avltree</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
815 <copy-assignment><type><classname>avltree</classname> &amp;</type><parameter name="x"><paramtype><classname>avltree</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
816 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
817 <method-group name="public static functions">
818 <method name="container_from_end_iterator" specifiers="static"><type><classname>avltree</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
819 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>avltree</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
820 <method name="container_from_iterator" specifiers="static"><type><classname>avltree</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
821 <method name="container_from_iterator" specifiers="static"><type>const <classname>avltree</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
822 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
823 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
824 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
825 </method-group>
826 </class><struct name="make_avltree"><template>
827       <template-type-parameter name="T"/>
828       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
829     </template><description><para>Helper metafunction to define a <computeroutput>avltree</computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
830 </struct>
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882 </namespace>
883 </namespace>
884 </header>
885 <header name="boost/intrusive/avltree_algorithms.hpp">
886 <namespace name="boost">
887 <namespace name="intrusive">
888 <class name="avltree_algorithms"><template>
889       <template-type-parameter name="NodeTraits"/>
890     </template><description><para><classname alt="boost::intrusive::avltree_algorithms">avltree_algorithms</classname> is configured with a NodeTraits class, which encapsulates the information about the node to be manipulated. NodeTraits must support the following interface:</para><para><emphasis role="bold">Typedefs</emphasis>:</para><para><computeroutput>node</computeroutput>: The type of the node that forms the binary search tree</para><para><computeroutput>node_ptr</computeroutput>: A pointer to a node</para><para><computeroutput>const_node_ptr</computeroutput>: A pointer to a const node</para><para><computeroutput>balance</computeroutput>: The type of the balance factor</para><para><emphasis role="bold">Static functions</emphasis>:</para><para><computeroutput>static node_ptr get_parent(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_parent(node_ptr n, node_ptr parent);</computeroutput></para><para><computeroutput>static node_ptr get_left(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_left(node_ptr n, node_ptr left);</computeroutput></para><para><computeroutput>static node_ptr get_right(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_right(node_ptr n, node_ptr right);</computeroutput></para><para><computeroutput>static balance get_balance(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_balance(node_ptr n, balance b);</computeroutput></para><para><computeroutput>static balance negative();</computeroutput></para><para><computeroutput>static balance zero();</computeroutput></para><para><computeroutput>static balance positive();</computeroutput> </para></description><typedef name="node"><type>NodeTraits::node</type></typedef>
891 <typedef name="node_traits"><type>NodeTraits</type></typedef>
892 <typedef name="node_ptr"><type>NodeTraits::node_ptr</type></typedef>
893 <typedef name="const_node_ptr"><type>NodeTraits::const_node_ptr</type></typedef>
894 <typedef name="balance"><type>NodeTraits::balance</type></typedef>
895 <typedef name="insert_commit_data"><description><para>This type is the information that will be filled by insert_unique_check </para></description><type>bstree_algo::insert_commit_data</type></typedef>
896 <method-group name="public static functions">
897 <method name="get_header" specifiers="static"><type>node_ptr</type><parameter name="n"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node of the tree or a header node.</para><para><emphasis role="bold">Effects</emphasis>: Returns the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
898 <method name="begin_node" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'header' is the header node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns the first node of the tree, the header if the tree is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
899 <method name="end_node" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'header' is the header node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
900 <method name="swap_tree" specifiers="static"><type>void</type><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the header nodes of two trees.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two trees. After the function header1 will contain links to the second tree and header2 will have links to the first tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
901 <method name="swap_nodes" specifiers="static"><type>void</type><parameter name="node1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="node2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node1 and node2 can't be header nodes of two trees.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two nodes. After the function node1 will be inserted in the position node2 before the function. node2 will be inserted in the position node1 had before the function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if node1 and node2 are not equivalent according to the ordering rules.</para><para>Experimental function </para></description></method>
902 <method name="swap_nodes" specifiers="static"><type>void</type><parameter name="node1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="node2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node1 and node2 can't be header nodes of two trees with header header1 and header2.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two nodes. After the function node1 will be inserted in the position node2 before the function. node2 will be inserted in the position node1 had before the function.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if node1 and node2 are not equivalent according to the ordering rules.</para><para>Experimental function </para></description></method>
903 <method name="replace_node" specifiers="static"><type>void</type><parameter name="node_to_be_replaced"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node_to_be_replaced must be inserted in a tree and new_node must not be inserted in a tree.</para><para><emphasis role="bold">Effects</emphasis>: Replaces node_to_be_replaced in its position in the tree with new_node. The tree does not need to be rebalanced</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if new_node is not equivalent to node_to_be_replaced according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing and comparison is needed. Experimental function </para></description></method>
904 <method name="replace_node" specifiers="static"><type>void</type><parameter name="node_to_be_replaced"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node_to_be_replaced must be inserted in a tree with header "header" and new_node must not be inserted in a tree.</para><para><emphasis role="bold">Effects</emphasis>: Replaces node_to_be_replaced in its position in the tree with new_node. The tree does not need to be rebalanced</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if new_node is not equivalent to node_to_be_replaced according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. Experimental function </para></description></method>
905 <method name="unlink" specifiers="static"><type>void</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node is a tree node but not the header.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the node and rebalances the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
906 <method name="unlink_leftmost_without_rebalance" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header is the header of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the tree, and updates the header link to the new leftmost node.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the tree and the tree can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the tree. </para></description></method>
907 <method name="unique" specifiers="static"><type>bool</type><parameter name="node"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node of the tree or a node initialized by init(...) or init_node.</para><para><emphasis role="bold">Effects</emphasis>: Returns true if the node is initialized by init() or init_node().</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
908 <method name="size" specifiers="static"><type>std::size_t</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node is a node of the tree but it's not the header.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of nodes of the subtree.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
909 <method name="next_node" specifiers="static"><type>node_ptr</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node from the tree except the header.</para><para><emphasis role="bold">Effects</emphasis>: Returns the next node of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
910 <method name="prev_node" specifiers="static"><type>node_ptr</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node from the tree except the leftmost node.</para><para><emphasis role="bold">Effects</emphasis>: Returns the previous node of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
911 <method name="init" specifiers="static"><type>void</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' must not be part of any tree.</para><para><emphasis role="bold">Effects</emphasis>: After the function unique(node) == true.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Nodes</emphasis>: If node is inserted in a tree, this function corrupts the tree. </para></description></method>
912 <method name="init_header" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node must not be part of any tree.</para><para><emphasis role="bold">Effects</emphasis>: Initializes the header to represent an empty tree. unique(header) == true.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Nodes</emphasis>: If node is inserted in a tree, this function corrupts the tree. </para></description></method>
913 <method name="erase" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header must be the header of a tree, z a node of that tree and z != header.</para><para><emphasis role="bold">Effects</emphasis>: Erases node "z" from the tree with header "header".</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
914 <method name="transfer_unique" specifiers="static"><type>bool</type><template>
915           <template-type-parameter name="NodePtrCompare"/>
916         </template><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the headers of trees tree1 and tree2 respectively, z a non-header node of tree1. NodePtrCompare is the comparison function of tree1..</para><para><emphasis role="bold">Effects</emphasis>: Transfers node "z" from tree1 to tree2 if tree1 does not contain a node that is equivalent to z.</para><para><emphasis role="bold">Returns</emphasis>: True if the node was trasferred, false otherwise.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison throws. </para></description></method>
917 <method name="transfer_equal" specifiers="static"><type>void</type><template>
918           <template-type-parameter name="NodePtrCompare"/>
919         </template><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the headers of trees tree1 and tree2 respectively, z a non-header node of tree1. NodePtrCompare is the comparison function of tree1..</para><para><emphasis role="bold">Effects</emphasis>: Transfers node "z" from tree1 to tree2.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison throws. </para></description></method>
920 <method name="clone" specifiers="static"><type>void</type><template>
921           <template-type-parameter name="Cloner"/>
922           <template-type-parameter name="Disposer"/>
923         </template><parameter name="source_header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="target_header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "cloner" must be a function object taking a node_ptr and returning a new cloned node of it. "disposer" must take a node_ptr and shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: First empties target tree calling <computeroutput>void disposer::operator()(const node_ptr &amp;)</computeroutput> for every node of the tree except the header.</para><para>Then, duplicates the entire tree pointed by "source_header" cloning each source node with <computeroutput>node_ptr Cloner::operator()(const node_ptr &amp;)</computeroutput> to obtain the nodes of the target tree. If "cloner" throws, the cloned target nodes are disposed using <computeroutput>void disposer(const node_ptr &amp;)</computeroutput>.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of element of the source tree plus the number of elements of tree target tree when calling this function.</para><para><emphasis role="bold">Throws</emphasis>: If cloner functor throws. If this happens target nodes are disposed. </para></description></method>
924 <method name="clear_and_dispose" specifiers="static"><type>void</type><template>
925           <template-type-parameter name="Disposer"/>
926         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "disposer" must be an object function taking a node_ptr parameter and shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Empties the target tree calling <computeroutput>void disposer::operator()(const node_ptr &amp;)</computeroutput> for every node of the tree except the header.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of element of the source tree plus the. number of elements of tree target tree when calling this function.</para><para><emphasis role="bold">Throws</emphasis>: If cloner functor throws. If this happens target nodes are disposed. </para></description></method>
927 <method name="lower_bound" specifiers="static"><type>node_ptr</type><template>
928           <template-type-parameter name="KeyType"/>
929           <template-type-parameter name="KeyNodePtrCompare"/>
930         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is not less than "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
931 <method name="upper_bound" specifiers="static"><type>node_ptr</type><template>
932           <template-type-parameter name="KeyType"/>
933           <template-type-parameter name="KeyNodePtrCompare"/>
934         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is greater than "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
935 <method name="find" specifiers="static"><type>node_ptr</type><template>
936           <template-type-parameter name="KeyType"/>
937           <template-type-parameter name="KeyNodePtrCompare"/>
938         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is equivalent to "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
939 <method name="equal_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
940           <template-type-parameter name="KeyType"/>
941           <template-type-parameter name="KeyNodePtrCompare"/>
942         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair of node_ptr delimiting a range containing all elements that are equivalent to "key" according to "comp" or an empty range that indicates the position where those elements would be if there are no equivalent elements.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
943 <method name="bounded_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
944           <template-type-parameter name="KeyType"/>
945           <template-type-parameter name="KeyNodePtrCompare"/>
946         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. 'lower_key' must not be greater than 'upper_key' according to 'comp'. If 'lower_key' == 'upper_key', ('left_closed' || 'right_closed') must be true.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change. </para></description></method>
947 <method name="count" specifiers="static"><type>std::size_t</type><template>
948           <template-type-parameter name="KeyType"/>
949           <template-type-parameter name="KeyNodePtrCompare"/>
950         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements with a key equivalent to "key" according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
951 <method name="insert_equal_upper_bound" specifiers="static"><type>node_ptr</type><template>
952           <template-type-parameter name="NodePtrCompare"/>
953         </template><parameter name="h"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "h" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before the upper bound according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
954 <method name="insert_equal_lower_bound" specifiers="static"><type>node_ptr</type><template>
955           <template-type-parameter name="NodePtrCompare"/>
956         </template><parameter name="h"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "h" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before the lower bound according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
957 <method name="insert_equal" specifiers="static"><type>node_ptr</type><template>
958           <template-type-parameter name="NodePtrCompare"/>
959         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="hint"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs. "hint" is node from the "header"'s tree.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case).</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if new_node is inserted immediately before "hint".</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
960 <method name="insert_before" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="pos"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "pos" must be a valid iterator or header (end) node. "pos" must be an iterator pointing to the successor to "new_node" once inserted according to the order of already inserted nodes. This function does not check "pos" and this precondition must be guaranteed by the caller.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: If "pos" is not the successor of the newly inserted "new_node" tree invariants might be broken. </para></description></method>
961 <method name="push_back" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "new_node" must be, according to the used ordering no less than the greatest inserted key.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: If "new_node" is less than the greatest inserted key tree invariants are broken. This function is slightly faster than using "insert_before". </para></description></method>
962 <method name="push_front" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "new_node" must be, according to the used ordering, no greater than the lowest inserted key.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: If "new_node" is greater than the lowest inserted key tree invariants are broken. This function is slightly faster than using "insert_before". </para></description></method>
963 <method name="insert_unique_check" specifiers="static"><type>std::pair&lt; node_ptr, bool &gt;</type><template>
964           <template-type-parameter name="KeyType"/>
965           <template-type-parameter name="KeyNodePtrCompare"/>
966         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares KeyType with a node_ptr.</para><para><emphasis role="bold">Effects</emphasis>: Checks if there is an equivalent node to "key" in the tree according to "comp" and obtains the needed information to realize a constant-time node insertion if there is no equivalent node.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing a node_ptr to the already present node and false. If there is not equivalent key can be inserted returns true in the returned pair's boolean and fills "commit_data" that is meant to be used with the "insert_commit" function to achieve a constant-time insertion function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a node is expensive and the user does not want to have two equivalent nodes in the tree: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the node and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the node and use "insert_commit" to insert the node in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_unique_commit" only if no more objects are inserted or erased from the set. </para></description></method>
967 <method name="insert_unique_check" specifiers="static"><type>std::pair&lt; node_ptr, bool &gt;</type><template>
968           <template-type-parameter name="KeyType"/>
969           <template-type-parameter name="KeyNodePtrCompare"/>
970         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="hint"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares KeyType with a node_ptr. "hint" is node from the "header"'s tree.</para><para><emphasis role="bold">Effects</emphasis>: Checks if there is an equivalent node to "key" in the tree according to "comp" using "hint" as a hint to where it should be inserted and obtains the needed information to realize a constant-time node insertion if there is no equivalent node. If "hint" is the upper_bound the function has constant time complexity (two comparisons in the worst case).</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing a node_ptr to the already present node and false. If there is not equivalent key can be inserted returns true in the returned pair's boolean and fills "commit_data" that is meant to be used with the "insert_commit" function to achieve a constant-time insertion function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic, but it is amortized constant time if new_node should be inserted immediately before "hint".</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a node is expensive and the user does not want to have two equivalent nodes in the tree: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the node and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the node and use "insert_commit" to insert the node in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_unique_commit" only if no more objects are inserted or erased from the set. </para></description></method>
971 <method name="insert_unique_commit" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_value"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "commit_data" must have been obtained from a previous call to "insert_unique_check". No objects should have been inserted or erased from the set between the "insert_unique_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node in the set using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_unique_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
972 <method name="is_header" specifiers="static"><type>bool</type><parameter name="p"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: p is a node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns true if p is the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
973 </method-group>
974 </class>
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026 </namespace>
1027 </namespace>
1028 </header>
1029 <header name="boost/intrusive/bs_set.hpp">
1030 <namespace name="boost">
1031 <namespace name="intrusive">
1032 <class name="bs_set"><template>
1033       <template-type-parameter name="T"/>
1034       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1035     </template><description><para>The class template <classname alt="boost::intrusive::bs_set">bs_set</classname> is an intrusive container, that mimics most of the interface of std::set as described in the C++ standard.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput> and <computeroutput>compare&lt;&gt;</computeroutput>. </para></description><typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
1036 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
1037 <typedef name="value_traits"><type>implementation_defined::value_traits</type></typedef>
1038 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
1039 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
1040 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
1041 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
1042 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
1043 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
1044 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
1045 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
1046 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
1047 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
1048 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
1049 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
1050 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
1051 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
1052 <typedef name="node"><type>implementation_defined::node</type></typedef>
1053 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
1054 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
1055 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
1056 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
1057 <method-group name="public member functions">
1058 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1059 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1060 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1061 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1062 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1063 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1064 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1065 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1066 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1067 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1068 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1069 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1070 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1071 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1072 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1073 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
1074 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
1075 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1076 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1077 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>bs_set</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two containers.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
1078 <method name="clone_from"><type>void</type><template>
1079           <template-type-parameter name="Cloner"/>
1080           <template-type-parameter name="Disposer"/>
1081         </template><parameter name="src"><paramtype>const <classname>bs_set</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. </para></description></method>
1082 <method name="clone_from"><type>void</type><template>
1083           <template-type-parameter name="Cloner"/>
1084           <template-type-parameter name="Disposer"/>
1085         </template><parameter name="src"><paramtype><classname>bs_set</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: This version can modify the source container, useful to implement move semantics. </para></description></method>
1086 <method name="insert"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container if the value is not already present.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
1087 <method name="insert"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert x into the container, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time (two comparisons in the worst case) if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
1088 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
1089 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
1090 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
1091           <template-type-parameter name="KeyType"/>
1092           <template-type-parameter name="KeyTypeKeyCompare"/>
1093         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
1094 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
1095           <template-type-parameter name="KeyType"/>
1096           <template-type-parameter name="KeyTypeKeyCompare"/>
1097         </template><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the constructing that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that key to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This can give a total constant-time complexity to the insertion: check(O(1)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
1098 <method name="insert"><type>void</type><template>
1099           <template-type-parameter name="Iterator"/>
1100         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert each element of a range into the container.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
1101 <method name="insert_commit"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue of type value_type. commit_data must have been obtained from a previous call to "insert_check". No objects should have been inserted or erased from the container between the "insert_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the container using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the newly inserted object.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
1102 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
1103 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
1104 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
1105 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1106 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1107 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1108 <method name="erase"><type>size_type</type><template>
1109           <template-type-parameter name="KeyType"/>
1110           <template-type-parameter name="KeyTypeKeyCompare"/>
1111         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1112 <method name="erase_and_dispose"><type>iterator</type><template>
1113           <template-type-parameter name="Disposer"/>
1114         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
1115 <method name="erase_and_dispose"><type>iterator</type><template>
1116           <template-type-parameter name="Disposer"/>
1117         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
1118 <method name="erase_and_dispose"><type>size_type</type><template>
1119           <template-type-parameter name="Disposer"/>
1120         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1121 <method name="erase_and_dispose"><type>size_type</type><template>
1122           <template-type-parameter name="KeyType"/>
1123           <template-type-parameter name="KeyTypeKeyCompare"/>
1124           <template-type-parameter name="Disposer"/>
1125         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk) and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
1126 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1127 <method name="clear_and_dispose"><type>void</type><template>
1128           <template-type-parameter name="Disposer"/>
1129         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
1130 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1131 <method name="count" cv="const"><type>size_type</type><template>
1132           <template-type-parameter name="KeyType"/>
1133           <template-type-parameter name="KeyTypeKeyCompare"/>
1134         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1135 <method name="lower_bound"><type>iterator</type><parameter name=""><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1136 <method name="lower_bound"><type>iterator</type><template>
1137           <template-type-parameter name="KeyType"/>
1138           <template-type-parameter name="KeyTypeKeyCompare"/>
1139         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1140 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1141 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
1142           <template-type-parameter name="KeyType"/>
1143           <template-type-parameter name="KeyTypeKeyCompare"/>
1144         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1145 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1146 <method name="upper_bound"><type>iterator</type><template>
1147           <template-type-parameter name="KeyType"/>
1148           <template-type-parameter name="KeyTypeKeyCompare"/>
1149         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1150 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1151 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
1152           <template-type-parameter name="KeyType"/>
1153           <template-type-parameter name="KeyTypeKeyCompare"/>
1154         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1155 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1156 <method name="find"><type>iterator</type><template>
1157           <template-type-parameter name="KeyType"/>
1158           <template-type-parameter name="KeyTypeKeyCompare"/>
1159         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1160 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1161 <method name="find" cv="const"><type>const_iterator</type><template>
1162           <template-type-parameter name="KeyType"/>
1163           <template-type-parameter name="KeyTypeKeyCompare"/>
1164         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1165 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1166 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
1167           <template-type-parameter name="KeyType"/>
1168           <template-type-parameter name="KeyTypeKeyCompare"/>
1169         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1170 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1171 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
1172           <template-type-parameter name="KeyType"/>
1173           <template-type-parameter name="KeyTypeKeyCompare"/>
1174         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1175 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
1176 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
1177           <template-type-parameter name="KeyType"/>
1178           <template-type-parameter name="KeyTypeKeyCompare"/>
1179         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
1180 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
1181 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
1182           <template-type-parameter name="KeyType"/>
1183           <template-type-parameter name="KeyTypeKeyCompare"/>
1184         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
1185 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1186 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1187 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
1188 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
1189 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
1190 <method name="merge"><type>void</type><template>
1191           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
1192         </template><parameter name="source"><paramtype><classname>bs_set</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
1193 <method name="merge"><type>void</type><template>
1194           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
1195         </template><parameter name="source"><paramtype><classname>bs_multiset</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
1196 </method-group>
1197 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
1198 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container with given comparison and traits.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
1199 <constructor><template>
1200           <template-type-parameter name="Iterator"/>
1201         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare object throws. Basic guarantee. </para></description></constructor>
1202 <constructor><parameter name="x"><paramtype><classname>bs_set</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
1203 <copy-assignment><type><classname>bs_set</classname> &amp;</type><parameter name="x"><paramtype><classname>bs_set</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
1204 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
1205 <method-group name="public static functions">
1206 <method name="container_from_end_iterator" specifiers="static"><type><classname>bs_set</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
1207 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>bs_set</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
1208 <method name="container_from_iterator" specifiers="static"><type><classname>bs_set</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
1209 <method name="container_from_iterator" specifiers="static"><type>const <classname>bs_set</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
1210 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
1211 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
1212 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
1213 </method-group>
1214 </class><struct name="make_bs_set"><template>
1215       <template-type-parameter name="T"/>
1216       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1217     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::bs_set">bs_set</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
1218 </struct><class name="bs_multiset"><template>
1219       <template-type-parameter name="T"/>
1220       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1221     </template><description><para>The class template <classname alt="boost::intrusive::bs_multiset">bs_multiset</classname> is an intrusive container, that mimics most of the interface of std::multiset as described in the C++ standard.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput> and <computeroutput>compare&lt;&gt;</computeroutput>. </para></description><typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
1222 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
1223 <typedef name="value_traits"><type>implementation_defined::value_traits</type></typedef>
1224 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
1225 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
1226 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
1227 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
1228 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
1229 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
1230 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
1231 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
1232 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
1233 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
1234 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
1235 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
1236 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
1237 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
1238 <typedef name="node"><type>implementation_defined::node</type></typedef>
1239 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
1240 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
1241 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
1242 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
1243 <method-group name="public member functions">
1244 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1245 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1246 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1247 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1248 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1249 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1250 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1251 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1252 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1253 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1254 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1255 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1256 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1257 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1258 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1259 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
1260 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
1261 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1262 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1263 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>bs_multiset</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two containers.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
1264 <method name="clone_from"><type>void</type><template>
1265           <template-type-parameter name="Cloner"/>
1266           <template-type-parameter name="Disposer"/>
1267         </template><parameter name="src"><paramtype>const <classname>bs_multiset</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. </para></description></method>
1268 <method name="clone_from"><type>void</type><template>
1269           <template-type-parameter name="Cloner"/>
1270           <template-type-parameter name="Disposer"/>
1271         </template><parameter name="src"><paramtype><classname>bs_multiset</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: This version can modify the source container, useful to implement move semantics. </para></description></method>
1272 <method name="insert"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container before the upper bound.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
1273 <method name="insert"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator.</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case)</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
1274 <method name="insert"><type>void</type><template>
1275           <template-type-parameter name="Iterator"/>
1276         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Inserts a each element of a range into the container before the upper bound of the key of each element.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
1277 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
1278 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
1279 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
1280 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1281 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1282 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1283 <method name="erase"><type>size_type</type><template>
1284           <template-type-parameter name="KeyType"/>
1285           <template-type-parameter name="KeyTypeKeyCompare"/>
1286         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1287 <method name="erase_and_dispose"><type>iterator</type><template>
1288           <template-type-parameter name="Disposer"/>
1289         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
1290 <method name="erase_and_dispose"><type>iterator</type><template>
1291           <template-type-parameter name="Disposer"/>
1292         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
1293 <method name="erase_and_dispose"><type>size_type</type><template>
1294           <template-type-parameter name="Disposer"/>
1295         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1296 <method name="erase_and_dispose"><type>size_type</type><template>
1297           <template-type-parameter name="KeyType"/>
1298           <template-type-parameter name="KeyTypeKeyCompare"/>
1299           <template-type-parameter name="Disposer"/>
1300         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk) and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
1301 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1302 <method name="clear_and_dispose"><type>void</type><template>
1303           <template-type-parameter name="Disposer"/>
1304         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
1305 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1306 <method name="count" cv="const"><type>size_type</type><template>
1307           <template-type-parameter name="KeyType"/>
1308           <template-type-parameter name="KeyTypeKeyCompare"/>
1309         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1310 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1311 <method name="lower_bound"><type>iterator</type><template>
1312           <template-type-parameter name="KeyType"/>
1313           <template-type-parameter name="KeyTypeKeyCompare"/>
1314         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1315 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1316 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
1317           <template-type-parameter name="KeyType"/>
1318           <template-type-parameter name="KeyTypeKeyCompare"/>
1319         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1320 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1321 <method name="upper_bound"><type>iterator</type><template>
1322           <template-type-parameter name="KeyType"/>
1323           <template-type-parameter name="KeyTypeKeyCompare"/>
1324         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1325 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1326 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
1327           <template-type-parameter name="KeyType"/>
1328           <template-type-parameter name="KeyTypeKeyCompare"/>
1329         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1330 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1331 <method name="find"><type>iterator</type><template>
1332           <template-type-parameter name="KeyType"/>
1333           <template-type-parameter name="KeyTypeKeyCompare"/>
1334         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1335 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1336 <method name="find" cv="const"><type>const_iterator</type><template>
1337           <template-type-parameter name="KeyType"/>
1338           <template-type-parameter name="KeyTypeKeyCompare"/>
1339         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1340 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1341 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
1342           <template-type-parameter name="KeyType"/>
1343           <template-type-parameter name="KeyTypeKeyCompare"/>
1344         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1345 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1346 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
1347           <template-type-parameter name="KeyType"/>
1348           <template-type-parameter name="KeyTypeKeyCompare"/>
1349         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1350 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
1351 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
1352           <template-type-parameter name="KeyType"/>
1353           <template-type-parameter name="KeyTypeKeyCompare"/>
1354         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
1355 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
1356 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
1357           <template-type-parameter name="KeyType"/>
1358           <template-type-parameter name="KeyTypeKeyCompare"/>
1359         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
1360 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1361 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1362 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
1363 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
1364 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
1365 <method name="merge"><type>void</type><template>
1366           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
1367         </template><parameter name="source"><paramtype><classname>bs_multiset</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Extracts each element in source and insert it into a using the comparison object of *this.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
1368 <method name="merge"><type>void</type><template>
1369           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
1370         </template><parameter name="source"><paramtype><classname>bs_set</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Extracts each element in source and insert it into a using the comparison object of *this.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
1371 </method-group>
1372 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
1373 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container with given comparison and traits.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
1374 <constructor><template>
1375           <template-type-parameter name="Iterator"/>
1376         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare object throws. Basic guarantee. </para></description></constructor>
1377 <constructor><parameter name="x"><paramtype><classname>bs_multiset</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
1378 <copy-assignment><type><classname>bs_multiset</classname> &amp;</type><parameter name="x"><paramtype><classname>bs_multiset</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
1379 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
1380 <method-group name="public static functions">
1381 <method name="container_from_end_iterator" specifiers="static"><type><classname>bs_multiset</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
1382 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>bs_multiset</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
1383 <method name="container_from_iterator" specifiers="static"><type><classname>bs_multiset</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
1384 <method name="container_from_iterator" specifiers="static"><type>const <classname>bs_multiset</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
1385 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
1386 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
1387 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
1388 </method-group>
1389 </class><struct name="make_bs_multiset"><template>
1390       <template-type-parameter name="T"/>
1391       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1392     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::bs_multiset">bs_multiset</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
1393 </struct>
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403 <function name="operator!="><type>bool</type><template>
1404           <template-type-parameter name="T"/>
1405           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1406         </template><parameter name="x"><paramtype>const <classname>bs_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>bs_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
1407 <function name="operator&gt;"><type>bool</type><template>
1408           <template-type-parameter name="T"/>
1409           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1410         </template><parameter name="x"><paramtype>const <classname>bs_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>bs_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
1411 <function name="operator&lt;="><type>bool</type><template>
1412           <template-type-parameter name="T"/>
1413           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1414         </template><parameter name="x"><paramtype>const <classname>bs_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>bs_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
1415 <function name="operator&gt;="><type>bool</type><template>
1416           <template-type-parameter name="T"/>
1417           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1418         </template><parameter name="x"><paramtype>const <classname>bs_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>bs_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
1419 <function name="swap"><type>void</type><template>
1420           <template-type-parameter name="T"/>
1421           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1422         </template><parameter name="x"><paramtype><classname>bs_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype><classname>bs_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
1423 <function name="operator!="><type>bool</type><template>
1424           <template-type-parameter name="T"/>
1425           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1426         </template><parameter name="x"><paramtype>const <classname>bs_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>bs_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
1427 <function name="operator&gt;"><type>bool</type><template>
1428           <template-type-parameter name="T"/>
1429           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1430         </template><parameter name="x"><paramtype>const <classname>bs_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>bs_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
1431 <function name="operator&lt;="><type>bool</type><template>
1432           <template-type-parameter name="T"/>
1433           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1434         </template><parameter name="x"><paramtype>const <classname>bs_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>bs_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
1435 <function name="operator&gt;="><type>bool</type><template>
1436           <template-type-parameter name="T"/>
1437           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1438         </template><parameter name="x"><paramtype>const <classname>bs_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>bs_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
1439 <function name="swap"><type>void</type><template>
1440           <template-type-parameter name="T"/>
1441           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1442         </template><parameter name="x"><paramtype><classname>bs_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype><classname>bs_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475 </namespace>
1476 </namespace>
1477 </header>
1478 <header name="boost/intrusive/bs_set_hook.hpp">
1479 <namespace name="boost">
1480 <namespace name="intrusive">
1481 <struct name="make_bs_set_base_hook"><template>
1482       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1483     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::bs_set_base_hook">bs_set_base_hook</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
1484 </struct><class name="bs_set_base_hook"><template>
1485       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1486     </template><inherit access="public">make_bs_set_base_hook::type&lt; O1, O2, O3 &gt;</inherit><description><para>Derive a class from <classname alt="boost::intrusive::bs_set_base_hook">bs_set_base_hook</classname> in order to store objects in in a bs_set/bs_multiset. <classname alt="boost::intrusive::bs_set_base_hook">bs_set_base_hook</classname> holds the data necessary to maintain the bs_set/bs_multiset and provides an appropriate <classname alt="boost::intrusive::value_traits">value_traits</classname> class for bs_set/bs_multiset.</para><para>The hook admits the following options: <computeroutput>tag&lt;&gt;</computeroutput>, <computeroutput>void_pointer&lt;&gt;</computeroutput>, <computeroutput>link_mode&lt;&gt;</computeroutput>.</para><para><computeroutput>tag&lt;&gt;</computeroutput> defines a tag to identify the node. The same tag value can be used in different classes, but if a class is derived from more than one <computeroutput><classname alt="boost::intrusive::list_base_hook">list_base_hook</classname></computeroutput>, then each <computeroutput><classname alt="boost::intrusive::list_base_hook">list_base_hook</classname></computeroutput> needs its unique tag.</para><para><computeroutput>void_pointer&lt;&gt;</computeroutput> is the pointer type that will be used internally in the hook and the container configured to use this hook.</para><para><computeroutput>link_mode&lt;&gt;</computeroutput> will specify the linking mode of the hook (<computeroutput>normal_link</computeroutput>, <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput>). </para></description><method-group name="public member functions">
1487 <method name="swap_nodes"><type>void</type><parameter name="other"><paramtype><classname>bs_set_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swapping two nodes swaps the position of the elements related to those nodes in one or two containers. That is, if the node this is part of the element e1, the node x is part of the element e2 and both elements are included in the containers s1 and s2, then after the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 at the position of e1. If one element is not in a container, then after the swap-operation the other element is not in a container. Iterators to e1 and e2 related to those nodes are invalidated.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1488 <method name="is_linked" cv="const"><type>bool</type><description><para><emphasis role="bold">Precondition</emphasis>: <classname alt="boost::intrusive::link_mode">link_mode</classname> must be <computeroutput>safe_link</computeroutput> or <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: true, if the node belongs to a container, false otherwise. This function can be used to test whether <computeroutput>set::iterator_to</computeroutput> will return a valid iterator.</para><para><emphasis role="bold">Complexity</emphasis>: Constant </para></description></method>
1489 <method name="unlink"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Removes the node if it's inserted in a container. This function is only allowed if <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1490 </method-group>
1491 <constructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></constructor>
1492 <constructor><parameter name=""><paramtype>const <classname>bs_set_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing a copy-constructor makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></constructor>
1493 <copy-assignment><type><classname>bs_set_base_hook</classname> &amp;</type><parameter name=""><paramtype>const <classname>bs_set_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Empty function. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing an assignment operator makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></copy-assignment>
1494 <destructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>normal_link</computeroutput>, the destructor does nothing (ie. no code is generated). If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>safe_link</computeroutput> and the object is stored in a set an assertion is raised. If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> and <computeroutput>is_linked()</computeroutput> is true, the node is unlinked.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
1495 </class><struct name="make_bs_set_member_hook"><template>
1496       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1497     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::bs_set_member_hook">bs_set_member_hook</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
1498 </struct><class name="bs_set_member_hook"><template>
1499       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1500     </template><inherit access="public">make_bs_set_member_hook::type&lt; O1, O2, O3 &gt;</inherit><description><para>Put a public data member <classname alt="boost::intrusive::bs_set_member_hook">bs_set_member_hook</classname> in order to store objects of this class in a bs_set/bs_multiset. <classname alt="boost::intrusive::bs_set_member_hook">bs_set_member_hook</classname> holds the data necessary for maintaining the bs_set/bs_multiset and provides an appropriate <classname alt="boost::intrusive::value_traits">value_traits</classname> class for bs_set/bs_multiset.</para><para>The hook admits the following options: <computeroutput>void_pointer&lt;&gt;</computeroutput>, <computeroutput>link_mode&lt;&gt;</computeroutput>.</para><para><computeroutput>void_pointer&lt;&gt;</computeroutput> is the pointer type that will be used internally in the hook and the container configured to use this hook.</para><para><computeroutput>link_mode&lt;&gt;</computeroutput> will specify the linking mode of the hook (<computeroutput>normal_link</computeroutput>, <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput>). </para></description><method-group name="public member functions">
1501 <method name="swap_nodes"><type>void</type><parameter name="other"><paramtype><classname>bs_set_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swapping two nodes swaps the position of the elements related to those nodes in one or two containers. That is, if the node this is part of the element e1, the node x is part of the element e2 and both elements are included in the containers s1 and s2, then after the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 at the position of e1. If one element is not in a container, then after the swap-operation the other element is not in a container. Iterators to e1 and e2 related to those nodes are invalidated.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1502 <method name="is_linked" cv="const"><type>bool</type><description><para><emphasis role="bold">Precondition</emphasis>: <classname alt="boost::intrusive::link_mode">link_mode</classname> must be <computeroutput>safe_link</computeroutput> or <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: true, if the node belongs to a container, false otherwise. This function can be used to test whether <computeroutput>set::iterator_to</computeroutput> will return a valid iterator.</para><para><emphasis role="bold">Complexity</emphasis>: Constant </para></description></method>
1503 <method name="unlink"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Removes the node if it's inserted in a container. This function is only allowed if <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1504 </method-group>
1505 <constructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></constructor>
1506 <constructor><parameter name=""><paramtype>const <classname>bs_set_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing a copy-constructor makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></constructor>
1507 <copy-assignment><type><classname>bs_set_member_hook</classname> &amp;</type><parameter name=""><paramtype>const <classname>bs_set_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Empty function. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing an assignment operator makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></copy-assignment>
1508 <destructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>normal_link</computeroutput>, the destructor does nothing (ie. no code is generated). If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>safe_link</computeroutput> and the object is stored in a set an assertion is raised. If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> and <computeroutput>is_linked()</computeroutput> is true, the node is unlinked.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
1509 </class>
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561 </namespace>
1562 </namespace>
1563 </header>
1564 <header name="boost/intrusive/bstree.hpp">
1565 <namespace name="boost">
1566 <namespace name="intrusive">
1567 <class name="bstree"><template>
1568       <template-type-parameter name="T"/>
1569       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1570     </template><inherit access="public">bstbase&lt; ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, ConstantTimeSize, SizeType, AlgoType, HeaderHolder &gt;</inherit><description><para>The class template bstree is an unbalanced intrusive binary search tree container. The no-throw guarantee holds only, if the key_compare object doesn't throw.</para><para>The complexity guarantees only hold if the tree is balanced, logarithmic complexity would increase to linear if the tree is totally unbalanced.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput> and <computeroutput>compare&lt;&gt;</computeroutput>. </para></description><typedef name="value_traits"><type>implementation_defined</type></typedef>
1571 <typedef name="pointer"><type>implementation_defined</type></typedef>
1572 <typedef name="const_pointer"><type>implementation_defined</type></typedef>
1573 <typedef name="value_type"><type>implementation_defined</type></typedef>
1574 <typedef name="key_type"><type>implementation_defined</type></typedef>
1575 <typedef name="key_of_value"><type>implementation_defined</type></typedef>
1576 <typedef name="reference"><type>implementation_defined</type></typedef>
1577 <typedef name="const_reference"><type>implementation_defined</type></typedef>
1578 <typedef name="difference_type"><type>implementation_defined</type></typedef>
1579 <typedef name="size_type"><type>implementation_defined</type></typedef>
1580 <typedef name="value_compare"><type>implementation_defined</type></typedef>
1581 <typedef name="key_compare"><type>implementation_defined</type></typedef>
1582 <typedef name="iterator"><type>implementation_defined</type></typedef>
1583 <typedef name="const_iterator"><type>implementation_defined</type></typedef>
1584 <typedef name="reverse_iterator"><type>implementation_defined</type></typedef>
1585 <typedef name="const_reverse_iterator"><type>implementation_defined</type></typedef>
1586 <typedef name="node_traits"><type>implementation_defined</type></typedef>
1587 <typedef name="node"><type>implementation_defined</type></typedef>
1588 <typedef name="node_ptr"><type>implementation_defined</type></typedef>
1589 <typedef name="const_node_ptr"><type>implementation_defined</type></typedef>
1590 <typedef name="node_algorithms"><type>implementation_defined</type></typedef>
1591 <typedef name="insert_commit_data"><type>node_algorithms::insert_commit_data</type></typedef>
1592 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
1593 <data-member name="stateful_value_traits" specifiers="static"><type>const bool</type></data-member>
1594 <method-group name="public member functions">
1595 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1596 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1597 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1598 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1599 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1600 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1601 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1602 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1603 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1604 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1605 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1606 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1607 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1608 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1609 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1610 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
1611 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
1612 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1613 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1614 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>bstree</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two containers.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
1615 <method name="clone_from"><type>void</type><template>
1616           <template-type-parameter name="Cloner"/>
1617           <template-type-parameter name="Disposer"/>
1618         </template><parameter name="src"><paramtype>const <classname>bstree</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. </para></description></method>
1619 <method name="clone_from"><type>void</type><template>
1620           <template-type-parameter name="Cloner"/>
1621           <template-type-parameter name="Disposer"/>
1622         </template><parameter name="src"><paramtype><classname>bstree</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: This version can modify the source container, useful to implement move semantics. </para></description></method>
1623 <method name="insert_equal"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container before the upper bound.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
1624 <method name="insert_equal"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator.</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case)</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
1625 <method name="insert_equal"><type>void</type><template>
1626           <template-type-parameter name="Iterator"/>
1627         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Inserts a each element of a range into the container before the upper bound of the key of each element.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
1628 <method name="insert_unique"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container if the value is not already present.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
1629 <method name="insert_unique"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert x into the container, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time (two comparisons in the worst case) if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
1630 <method name="insert_unique"><type>void</type><template>
1631           <template-type-parameter name="Iterator"/>
1632         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert each element of a range into the container.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
1633 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
1634 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
1635 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
1636           <template-type-parameter name="KeyType"/>
1637           <template-type-parameter name="KeyTypeKeyCompare"/>
1638         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
1639 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
1640           <template-type-parameter name="KeyType"/>
1641           <template-type-parameter name="KeyTypeKeyCompare"/>
1642         </template><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the constructing that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that key to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This can give a total constant-time complexity to the insertion: check(O(1)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
1643 <method name="insert_unique_commit"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue of type value_type. commit_data must have been obtained from a previous call to "insert_check". No objects should have been inserted or erased from the container between the "insert_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the container using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the newly inserted object.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
1644 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
1645 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
1646 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
1647 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1648 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1649 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1650 <method name="erase"><type>size_type</type><template>
1651           <template-type-parameter name="KeyType"/>
1652           <template-type-parameter name="KeyTypeKeyCompare"/>
1653         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1654 <method name="erase_and_dispose"><type>iterator</type><template>
1655           <template-type-parameter name="Disposer"/>
1656         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
1657 <method name="erase_and_dispose"><type>size_type</type><template>
1658           <template-type-parameter name="Disposer"/>
1659         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1660 <method name="erase_and_dispose"><type>iterator</type><template>
1661           <template-type-parameter name="Disposer"/>
1662         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
1663 <method name="erase_and_dispose"><type>size_type</type><template>
1664           <template-type-parameter name="KeyType"/>
1665           <template-type-parameter name="KeyTypeKeyCompare"/>
1666           <template-type-parameter name="Disposer"/>
1667         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk) and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
1668 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
1669 <method name="clear_and_dispose"><type>void</type><template>
1670           <template-type-parameter name="Disposer"/>
1671         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
1672 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1673 <method name="count" cv="const"><type>size_type</type><template>
1674           <template-type-parameter name="KeyType"/>
1675           <template-type-parameter name="KeyTypeKeyCompare"/>
1676         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1677 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1678 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1679 <method name="lower_bound"><type>iterator</type><template>
1680           <template-type-parameter name="KeyType"/>
1681           <template-type-parameter name="KeyTypeKeyCompare"/>
1682         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1683 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
1684           <template-type-parameter name="KeyType"/>
1685           <template-type-parameter name="KeyTypeKeyCompare"/>
1686         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1687 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1688 <method name="upper_bound"><type>iterator</type><template>
1689           <template-type-parameter name="KeyType"/>
1690           <template-type-parameter name="KeyTypeKeyCompare"/>
1691         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1692 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1693 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
1694           <template-type-parameter name="KeyType"/>
1695           <template-type-parameter name="KeyTypeKeyCompare"/>
1696         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1697 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1698 <method name="find"><type>iterator</type><template>
1699           <template-type-parameter name="KeyType"/>
1700           <template-type-parameter name="KeyTypeKeyCompare"/>
1701         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1702 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1703 <method name="find" cv="const"><type>const_iterator</type><template>
1704           <template-type-parameter name="KeyType"/>
1705           <template-type-parameter name="KeyTypeKeyCompare"/>
1706         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1707 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1708 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
1709           <template-type-parameter name="KeyType"/>
1710           <template-type-parameter name="KeyTypeKeyCompare"/>
1711         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1712 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
1713 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
1714           <template-type-parameter name="KeyType"/>
1715           <template-type-parameter name="KeyTypeKeyCompare"/>
1716         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
1717 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_value"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
1718 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
1719           <template-type-parameter name="KeyType"/>
1720           <template-type-parameter name="KeyTypeKeyCompare"/>
1721         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
1722 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
1723 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
1724           <template-type-parameter name="KeyType"/>
1725           <template-type-parameter name="KeyTypeKeyCompare"/>
1726         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
1727 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1728 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1729 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
1730 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
1731 <method name="rebalance"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Rebalances the tree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear. </para></description></method>
1732 <method name="rebalance_subtree"><type>iterator</type><parameter name="root"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: old_root is a node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Rebalances the subtree rooted at old_root.</para><para><emphasis role="bold">Returns</emphasis>: The new root of the subtree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the elements in the subtree. </para></description></method>
1733 <method name="merge_unique"><type>void</type><template>
1734           <template-type-parameter name="T"/>
1735           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
1736         </template><parameter name=""><paramtype><classname>bstree</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
1737 <method name="while"><type/><parameter name=""><paramtype>it!</paramtype><default>itend</default></parameter></method>
1738 <method name="merge_equal"><type>void</type><template>
1739           <template-type-parameter name="T"/>
1740           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
1741         </template><parameter name=""><paramtype><classname>bstree</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Extracts each element in source and insert it into a using the comparison object of *this.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
1742 <method name="while"><type/><parameter name=""><paramtype>it!</paramtype><default>itend</default></parameter></method>
1743 <method name="check" cv="const"><type>void</type><template>
1744           <template-type-parameter name="ExtraChecker"/>
1745         </template><parameter name="extra_checker"><paramtype>ExtraChecker</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Asserts the integrity of the container with additional checks provided by the user.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time.</para><para><emphasis role="bold">Note</emphasis>: The method might not have effect when asserts are turned off (e.g., with NDEBUG). Experimental function, interface might change in future versions. </para></description></method>
1746 <method name="check" cv="const"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Asserts the integrity of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time.</para><para><emphasis role="bold">Note</emphasis>: The method has no effect when asserts are turned off (e.g., with NDEBUG). Experimental function, interface might change in future versions. </para></description></method>
1747 </method-group>
1748 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
1749 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container with given comparison and traits.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
1750 <constructor><template>
1751           <template-type-parameter name="Iterator"/>
1752         </template><parameter name="unique"><paramtype>bool</paramtype></parameter><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare object throws. Basic guarantee. </para></description></constructor>
1753 <constructor><parameter name="x"><paramtype><classname>bstree</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
1754 <copy-assignment><type><classname>bstree</classname> &amp;</type><parameter name="x"><paramtype><classname>bstree</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
1755 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
1756 <method-group name="public static functions">
1757 <method name="container_from_end_iterator" specifiers="static"><type><classname>bstree</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
1758 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>bstree</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end const_iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
1759 <method name="container_from_iterator" specifiers="static"><type><classname>bstree</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
1760 <method name="container_from_iterator" specifiers="static"><type>const <classname>bstree</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid end const_iterator of container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
1761 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
1762 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
1763 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
1764 <method name="remove_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
1765 </method-group>
1766 </class><struct name="make_bstree"><template>
1767       <template-type-parameter name="T"/>
1768       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
1769     </template><description><para>Helper metafunction to define a <computeroutput>bstree</computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
1770 </struct>
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822 </namespace>
1823 </namespace>
1824 </header>
1825 <header name="boost/intrusive/bstree_algorithms.hpp">
1826 <namespace name="boost">
1827 <namespace name="intrusive">
1828 <class name="bstree_algorithms"><template>
1829       <template-type-parameter name="NodeTraits"/>
1830     </template><inherit access="public">bstree_algorithms_base&lt; NodeTraits &gt;</inherit><description><para>This is an implementation of a binary search tree. A node in the search tree has references to its children and its parent. This is to allow traversal of the whole tree from a given node making the implementation of iterator a pointer to a node. At the top of the tree a node is used specially. This node's parent pointer is pointing to the root of the tree. Its left pointer points to the leftmost node in the tree and the right pointer to the rightmost one. This node is used to represent the end-iterator.                                      +---------+
1831 header------------------------------&gt;|         |
1832                                      |         |
1833             +----------(left)--------|         |--------(right)---------+
1834             |                        +---------+                        |
1835             |                             |                             |
1836             |                             | (parent)                    |
1837             |                             |                             |
1838             |                             |                             |
1839             |                        +---------+                        |
1840  root of tree ..|......................&gt; | | | | | D | | | | | | | +----<mdash/>+------<mdash/>+----<mdash/>+ | <informaltable><tgroup cols="3"><tbody><row>
1841 <entry><emphasis role="bold"/></entry><entry><emphasis role="bold"/></entry><entry><emphasis role="bold"/></entry></row>
1842 <row>
1843 <entry/><entry/><entry/></row>
1844 <row>
1845 <entry/><entry/><entry/></row>
1846 <row>
1847 <entry/><entry/><entry/></row>
1848 </tbody></tgroup></informaltable>
1849 | +------<mdash/>+ +------<mdash/>+ | | | | | | | | | B | | F | | | | | | | | | +–+------<mdash/>+–+ +–+------<mdash/>+–+ | <informaltable><tgroup cols="5"><tbody><row>
1850 <entry><emphasis role="bold"/></entry><entry><emphasis role="bold"/></entry><entry><emphasis role="bold"/></entry><entry><emphasis role="bold"/></entry><entry><emphasis role="bold"/></entry></row>
1851 <row>
1852 <entry/><entry/><entry/><entry/><entry/></row>
1853 </tbody></tgroup></informaltable>
1854 | +<mdash/>+--<mdash/>+ +--<mdash/>+<mdash/>+ +<mdash/>+--<mdash/>+ +--<mdash/>+<mdash/>+ | +–&gt;| | | | | | | |&lt;–+ | A | | C | | E | | G | | | | | | | | | +------<mdash/>+ +------<mdash/>+ +------<mdash/>+ +------<mdash/>+</para><para><classname alt="boost::intrusive::bstree_algorithms">bstree_algorithms</classname> is configured with a NodeTraits class, which encapsulates the information about the node to be manipulated. NodeTraits must support the following interface:</para><para><emphasis role="bold">Typedefs</emphasis>:</para><para><computeroutput>node</computeroutput>: The type of the node that forms the binary search tree</para><para><computeroutput>node_ptr</computeroutput>: A pointer to a node</para><para><computeroutput>const_node_ptr</computeroutput>: A pointer to a const node</para><para><emphasis role="bold">Static functions</emphasis>:</para><para><computeroutput>static node_ptr get_parent(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_parent(node_ptr n, node_ptr parent);</computeroutput></para><para><computeroutput>static node_ptr get_left(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_left(node_ptr n, node_ptr left);</computeroutput></para><para><computeroutput>static node_ptr get_right(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_right(node_ptr n, node_ptr right);</computeroutput> </para></description><typedef name="node"><type>NodeTraits::node</type></typedef>
1855 <typedef name="node_traits"><type>NodeTraits</type></typedef>
1856 <typedef name="node_ptr"><type>NodeTraits::node_ptr</type></typedef>
1857 <typedef name="const_node_ptr"><type>NodeTraits::const_node_ptr</type></typedef>
1858 <typedef name="insert_commit_data"><type>insert_commit_data_t&lt; node_ptr &gt;</type></typedef>
1859 <typedef name="data_for_rebalance"><type>data_for_rebalance_t&lt; node_ptr &gt;</type></typedef>
1860 <method-group name="public static functions">
1861 <method name="begin_node" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'header' is the header node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns the first node of the tree, the header if the tree is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1862 <method name="end_node" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'header' is the header node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1863 <method name="root_node" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'header' is the header node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns the root of the tree if any, header otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1864 <method name="unique" specifiers="static"><type>bool</type><parameter name="node"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node of the tree or a node initialized by init(...) or init_node.</para><para><emphasis role="bold">Effects</emphasis>: Returns true if the node is initialized by init() or init_node().</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1865 <method name="get_header" specifiers="static"><type>node_ptr</type><parameter name="node"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node of the tree or a header node.</para><para><emphasis role="bold">Effects</emphasis>: Returns the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1866 <method name="swap_nodes" specifiers="static"><type>void</type><parameter name="node1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="node2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node1 and node2 can't be header nodes of two trees.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two nodes. After the function node1 will be inserted in the position node2 before the function. node2 will be inserted in the position node1 had before the function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if node1 and node2 are not equivalent according to the ordering rules.</para><para>Experimental function </para></description></method>
1867 <method name="swap_nodes" specifiers="static"><type>void</type><parameter name="node1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="node2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node1 and node2 can't be header nodes of two trees with header header1 and header2.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two nodes. After the function node1 will be inserted in the position node2 before the function. node2 will be inserted in the position node1 had before the function.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if node1 and node2 are not equivalent according to the ordering rules.</para><para>Experimental function </para></description></method>
1868 <method name="replace_node" specifiers="static"><type>void</type><parameter name="node_to_be_replaced"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node_to_be_replaced must be inserted in a tree and new_node must not be inserted in a tree.</para><para><emphasis role="bold">Effects</emphasis>: Replaces node_to_be_replaced in its position in the tree with new_node. The tree does not need to be rebalanced</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if new_node is not equivalent to node_to_be_replaced according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing and comparison is needed. Experimental function </para></description></method>
1869 <method name="replace_node" specifiers="static"><type>void</type><parameter name="node_to_be_replaced"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node_to_be_replaced must be inserted in a tree with header "header" and new_node must not be inserted in a tree.</para><para><emphasis role="bold">Effects</emphasis>: Replaces node_to_be_replaced in its position in the tree with new_node. The tree does not need to be rebalanced</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if new_node is not equivalent to node_to_be_replaced according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. Experimental function </para></description></method>
1870 <method name="next_node" specifiers="static"><type>node_ptr</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node from the tree except the header.</para><para><emphasis role="bold">Effects</emphasis>: Returns the next node of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1871 <method name="prev_node" specifiers="static"><type>node_ptr</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node from the tree except the leftmost node.</para><para><emphasis role="bold">Effects</emphasis>: Returns the previous node of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1872 <method name="minimum" specifiers="static"><type>node_ptr</type><parameter name="node"><paramtype>node_ptr</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node of a tree but not the header.</para><para><emphasis role="bold">Effects</emphasis>: Returns the minimum node of the subtree starting at p.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the size of the subtree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1873 <method name="maximum" specifiers="static"><type>node_ptr</type><parameter name="node"><paramtype>node_ptr</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node of a tree but not the header.</para><para><emphasis role="bold">Effects</emphasis>: Returns the maximum node of the subtree starting at p.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the size of the subtree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1874 <method name="init" specifiers="static"><type>void</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' must not be part of any tree.</para><para><emphasis role="bold">Effects</emphasis>: After the function unique(node) == true.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Nodes</emphasis>: If node is inserted in a tree, this function corrupts the tree. </para></description></method>
1875 <method name="inited" specifiers="static"><type>bool</type><parameter name="node"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns true if node is in the same state as if called init(node)</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1876 <method name="init_header" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node must not be part of any tree.</para><para><emphasis role="bold">Effects</emphasis>: Initializes the header to represent an empty tree. unique(header) == true.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Nodes</emphasis>: If node is inserted in a tree, this function corrupts the tree. </para></description></method>
1877 <method name="clear_and_dispose" specifiers="static"><type>void</type><template>
1878           <template-type-parameter name="Disposer"/>
1879         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "disposer" must be an object function taking a node_ptr parameter and shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Empties the target tree calling <computeroutput>void disposer::operator()(const node_ptr &amp;)</computeroutput> for every node of the tree except the header.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of element of the source tree plus the. number of elements of tree target tree when calling this function.</para><para><emphasis role="bold">Throws</emphasis>: If cloner functor throws. If this happens target nodes are disposed. </para></description></method>
1880 <method name="unlink_leftmost_without_rebalance" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header is the header of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the tree, and updates the header link to the new leftmost node.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the tree and the tree can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the tree. </para></description></method>
1881 <method name="size" specifiers="static"><type>std::size_t</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node is a node of the tree but it's not the header.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of nodes of the subtree.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1882 <method name="swap_tree" specifiers="static"><type>void</type><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the header nodes of two trees.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two trees. After the function header1 will contain links to the second tree and header2 will have links to the first tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1883 <method name="is_header" specifiers="static"><type>bool</type><parameter name="p"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: p is a node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns true if p is the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1884 <method name="find" specifiers="static"><type>node_ptr</type><template>
1885           <template-type-parameter name="KeyType"/>
1886           <template-type-parameter name="KeyNodePtrCompare"/>
1887         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is equivalent to "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
1888 <method name="bounded_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
1889           <template-type-parameter name="KeyType"/>
1890           <template-type-parameter name="KeyNodePtrCompare"/>
1891         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. 'lower_key' must not be greater than 'upper_key' according to 'comp'. If 'lower_key' == 'upper_key', ('left_closed' || 'right_closed') must be true.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change. </para></description></method>
1892 <method name="count" specifiers="static"><type>std::size_t</type><template>
1893           <template-type-parameter name="KeyType"/>
1894           <template-type-parameter name="KeyNodePtrCompare"/>
1895         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements with a key equivalent to "key" according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
1896 <method name="equal_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
1897           <template-type-parameter name="KeyType"/>
1898           <template-type-parameter name="KeyNodePtrCompare"/>
1899         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair of node_ptr delimiting a range containing all elements that are equivalent to "key" according to "comp" or an empty range that indicates the position where those elements would be if there are no equivalent elements.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
1900 <method name="lower_bound_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
1901           <template-type-parameter name="KeyType"/>
1902           <template-type-parameter name="KeyNodePtrCompare"/>
1903         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair of node_ptr delimiting a range containing the first element that is equivalent to "key" according to "comp" or an empty range that indicates the position where that element would be if there are no equivalent elements.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
1904 <method name="lower_bound" specifiers="static"><type>node_ptr</type><template>
1905           <template-type-parameter name="KeyType"/>
1906           <template-type-parameter name="KeyNodePtrCompare"/>
1907         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is not less than "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
1908 <method name="upper_bound" specifiers="static"><type>node_ptr</type><template>
1909           <template-type-parameter name="KeyType"/>
1910           <template-type-parameter name="KeyNodePtrCompare"/>
1911         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is greater than "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
1912 <method name="insert_unique_commit" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_value"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "commit_data" must have been obtained from a previous call to "insert_unique_check". No objects should have been inserted or erased from the set between the "insert_unique_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node in the set using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_unique_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
1913 <method name="insert_unique_check" specifiers="static"><type>std::pair&lt; node_ptr, bool &gt;</type><template>
1914           <template-type-parameter name="KeyType"/>
1915           <template-type-parameter name="KeyNodePtrCompare"/>
1916         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares KeyType with a node_ptr.</para><para><emphasis role="bold">Effects</emphasis>: Checks if there is an equivalent node to "key" in the tree according to "comp" and obtains the needed information to realize a constant-time node insertion if there is no equivalent node.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing a node_ptr to the already present node and false. If there is not equivalent key can be inserted returns true in the returned pair's boolean and fills "commit_data" that is meant to be used with the "insert_commit" function to achieve a constant-time insertion function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a node is expensive and the user does not want to have two equivalent nodes in the tree: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the node and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the node and use "insert_commit" to insert the node in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_unique_commit" only if no more objects are inserted or erased from the set. </para></description></method>
1917 <method name="insert_unique_check" specifiers="static"><type>std::pair&lt; node_ptr, bool &gt;</type><template>
1918           <template-type-parameter name="KeyType"/>
1919           <template-type-parameter name="KeyNodePtrCompare"/>
1920         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="hint"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares KeyType with a node_ptr. "hint" is node from the "header"'s tree.</para><para><emphasis role="bold">Effects</emphasis>: Checks if there is an equivalent node to "key" in the tree according to "comp" using "hint" as a hint to where it should be inserted and obtains the needed information to realize a constant-time node insertion if there is no equivalent node. If "hint" is the upper_bound the function has constant time complexity (two comparisons in the worst case).</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing a node_ptr to the already present node and false. If there is not equivalent key can be inserted returns true in the returned pair's boolean and fills "commit_data" that is meant to be used with the "insert_commit" function to achieve a constant-time insertion function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic, but it is amortized constant time if new_node should be inserted immediately before "hint".</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a node is expensive and the user does not want to have two equivalent nodes in the tree: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the node and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the node and use "insert_commit" to insert the node in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_unique_commit" only if no more objects are inserted or erased from the set. </para></description></method>
1921 <method name="insert_equal" specifiers="static"><type>node_ptr</type><template>
1922           <template-type-parameter name="NodePtrCompare"/>
1923         </template><parameter name="h"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="hint"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs. "hint" is node from the "header"'s tree.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case).</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if new_node is inserted immediately before "hint".</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
1924 <method name="insert_equal_upper_bound" specifiers="static"><type>node_ptr</type><template>
1925           <template-type-parameter name="NodePtrCompare"/>
1926         </template><parameter name="h"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "h" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before the upper bound according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
1927 <method name="insert_equal_lower_bound" specifiers="static"><type>node_ptr</type><template>
1928           <template-type-parameter name="NodePtrCompare"/>
1929         </template><parameter name="h"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "h" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before the lower bound according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
1930 <method name="insert_before" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="pos"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "pos" must be a valid iterator or header (end) node. "pos" must be an iterator pointing to the successor to "new_node" once inserted according to the order of already inserted nodes. This function does not check "pos" and this precondition must be guaranteed by the caller.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: If "pos" is not the successor of the newly inserted "new_node" tree invariants might be broken. </para></description></method>
1931 <method name="push_back" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "new_node" must be, according to the used ordering no less than the greatest inserted key.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: If "new_node" is less than the greatest inserted key tree invariants are broken. This function is slightly faster than using "insert_before". </para></description></method>
1932 <method name="push_front" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "new_node" must be, according to the used ordering, no greater than the lowest inserted key.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: If "new_node" is greater than the lowest inserted key tree invariants are broken. This function is slightly faster than using "insert_before". </para></description></method>
1933 <method name="depth" specifiers="static"><type>std::size_t</type><parameter name="node"><paramtype>const_node_ptr</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' can't be a header node.</para><para><emphasis role="bold">Effects</emphasis>: Calculates the depth of a node: the depth of a node is the length (number of edges) of the path from the root to that node. (The root node is at depth 0.)</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of nodes in the tree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1934 <method name="clone" specifiers="static"><type>void</type><template>
1935           <template-type-parameter name="Cloner"/>
1936           <template-type-parameter name="Disposer"/>
1937         </template><parameter name="source_header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="target_header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "cloner" must be a function object taking a node_ptr and returning a new cloned node of it. "disposer" must take a node_ptr and shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: First empties target tree calling <computeroutput>void disposer::operator()(const node_ptr &amp;)</computeroutput> for every node of the tree except the header.</para><para>Then, duplicates the entire tree pointed by "source_header" cloning each source node with <computeroutput>node_ptr Cloner::operator()(const node_ptr &amp;)</computeroutput> to obtain the nodes of the target tree. If "cloner" throws, the cloned target nodes are disposed using <computeroutput>void disposer(const node_ptr &amp;)</computeroutput>.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of element of the source tree plus the number of elements of tree target tree when calling this function.</para><para><emphasis role="bold">Throws</emphasis>: If cloner functor throws. If this happens target nodes are disposed. </para></description></method>
1938 <method name="erase" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header must be the header of a tree, z a node of that tree and z != header.</para><para><emphasis role="bold">Effects</emphasis>: Erases node "z" from the tree with header "header".</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1939 <method name="transfer_unique" specifiers="static"><type>bool</type><template>
1940           <template-type-parameter name="NodePtrCompare"/>
1941         </template><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the headers of trees tree1 and tree2 respectively, z a non-header node of tree1. NodePtrCompare is the comparison function of tree1..</para><para><emphasis role="bold">Effects</emphasis>: Transfers node "z" from tree1 to tree2 if tree1 does not contain a node that is equivalent to z.</para><para><emphasis role="bold">Returns</emphasis>: True if the node was trasferred, false otherwise.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison throws. </para></description></method>
1942 <method name="transfer_equal" specifiers="static"><type>void</type><template>
1943           <template-type-parameter name="NodePtrCompare"/>
1944         </template><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the headers of trees tree1 and tree2 respectively, z a non-header node of tree1. NodePtrCompare is the comparison function of tree1..</para><para><emphasis role="bold">Effects</emphasis>: Transfers node "z" from tree1 to tree2.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison throws. </para></description></method>
1945 <method name="unlink" specifiers="static"><type>void</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node is a tree node but not the header.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the node and rebalances the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1946 <method name="rebalance" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header must be the header of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Rebalances the tree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear. </para></description></method>
1947 <method name="rebalance_subtree" specifiers="static"><type>node_ptr</type><parameter name="old_root"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: old_root is a node of a tree. It shall not be null.</para><para><emphasis role="bold">Effects</emphasis>: Rebalances the subtree rooted at old_root.</para><para><emphasis role="bold">Returns</emphasis>: The new root of the subtree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear. </para></description></method>
1948 <method name="check" specifiers="static"><type>void</type><template>
1949           <template-type-parameter name="Checker"/>
1950         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="checker"><paramtype>Checker</paramtype></parameter><parameter name="checker_return"><paramtype>typename Checker::return_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Asserts the integrity of the container with additional checks provided by the user.</para><para><emphasis role="bold">Requires</emphasis>: header must be the header of a tree.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time.</para><para><emphasis role="bold">Note</emphasis>: The method might not have effect when asserts are turned off (e.g., with NDEBUG). Experimental function, interface might change in future versions. </para></description></method>
1951 </method-group>
1952 <method-group name="protected static functions">
1953 <method name="transfer_unique" specifiers="static"><type>bool</type><template>
1954           <template-type-parameter name="NodePtrCompare"/>
1955         </template><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="info"><paramtype>data_for_rebalance &amp;</paramtype></parameter></method>
1956 <method name="transfer_equal" specifiers="static"><type>void</type><template>
1957           <template-type-parameter name="NodePtrCompare"/>
1958         </template><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="info"><paramtype>data_for_rebalance &amp;</paramtype></parameter></method>
1959 <method name="erase" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="info"><paramtype>data_for_rebalance &amp;</paramtype></parameter></method>
1960 <method name="subtree_size" specifiers="static"><type>std::size_t</type><parameter name="subtree"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node is a node of the tree but it's not the header.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of nodes of the subtree.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1961 <method name="is_left_child" specifiers="static"><type>bool</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: p is a node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns true if p is a left child.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1962 <method name="is_right_child" specifiers="static"><type>bool</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: p is a node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns true if p is a right child.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1963 <method name="insert_before_check" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="pos"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter></method>
1964 <method name="push_back_check" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter></method>
1965 <method name="push_front_check" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter></method>
1966 <method name="insert_equal_check" specifiers="static"><type>void</type><template>
1967           <template-type-parameter name="NodePtrCompare"/>
1968         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="hint"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter></method>
1969 <method name="insert_equal_upper_bound_check" specifiers="static"><type>void</type><template>
1970           <template-type-parameter name="NodePtrCompare"/>
1971         </template><parameter name="h"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><parameter name="pdepth"><paramtype>std::size_t *</paramtype><default>0</default></parameter></method>
1972 <method name="insert_equal_lower_bound_check" specifiers="static"><type>void</type><template>
1973           <template-type-parameter name="NodePtrCompare"/>
1974         </template><parameter name="h"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><parameter name="pdepth"><paramtype>std::size_t *</paramtype><default>0</default></parameter></method>
1975 <method name="insert_commit" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter></method>
1976 <method name="set_child" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_child"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_parent"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="link_left"><paramtype>const bool</paramtype></parameter></method>
1977 <method name="rotate_left_no_parent_fix" specifiers="static"><type>void</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="p_right"><paramtype>const node_ptr &amp;</paramtype></parameter></method>
1978 <method name="rotate_left" specifiers="static"><type>void</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="p_right"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="p_parent"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter></method>
1979 <method name="rotate_right_no_parent_fix" specifiers="static"><type>void</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="p_left"><paramtype>const node_ptr &amp;</paramtype></parameter></method>
1980 <method name="rotate_right" specifiers="static"><type>void</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="p_left"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="p_parent"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter></method>
1981 </method-group>
1982 <method-group name="private static functions">
1983 <method name="subtree_to_vine" specifiers="static"><type>void</type><parameter name="vine_tail"><paramtype>node_ptr</paramtype></parameter><parameter name="size"><paramtype>std::size_t &amp;</paramtype></parameter></method>
1984 <method name="compress_subtree" specifiers="static"><type>void</type><parameter name="scanner"><paramtype>node_ptr</paramtype></parameter><parameter name="count"><paramtype>std::size_t</paramtype></parameter></method>
1985 <method name="vine_to_subtree" specifiers="static"><type>void</type><parameter name="super_root"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="count"><paramtype>std::size_t</paramtype></parameter></method>
1986 <method name="get_root" specifiers="static"><type>node_ptr</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "n" must be a node inserted in a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns a pointer to the header node of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
1987 <method name="clone_subtree" specifiers="static"><type>node_ptr</type><template>
1988           <template-type-parameter name="Cloner"/>
1989           <template-type-parameter name="Disposer"/>
1990         </template><parameter name="source_parent"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="target_parent"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><parameter name="leftmost_out"><paramtype>node_ptr &amp;</paramtype></parameter><parameter name="rightmost_out"><paramtype>node_ptr &amp;</paramtype></parameter></method>
1991 <method name="dispose_subtree" specifiers="static"><type>void</type><template>
1992           <template-type-parameter name="Disposer"/>
1993         </template><parameter name="x"><paramtype>node_ptr</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter></method>
1994 <method name="lower_bound_loop" specifiers="static"><type>node_ptr</type><template>
1995           <template-type-parameter name="KeyType"/>
1996           <template-type-parameter name="KeyNodePtrCompare"/>
1997         </template><parameter name="x"><paramtype>node_ptr</paramtype></parameter><parameter name="y"><paramtype>node_ptr</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter></method>
1998 <method name="upper_bound_loop" specifiers="static"><type>node_ptr</type><template>
1999           <template-type-parameter name="KeyType"/>
2000           <template-type-parameter name="KeyNodePtrCompare"/>
2001         </template><parameter name="x"><paramtype>node_ptr</paramtype></parameter><parameter name="y"><paramtype>node_ptr</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter></method>
2002 <method name="check_subtree" specifiers="static"><type>void</type><template>
2003           <template-type-parameter name="Checker"/>
2004         </template><parameter name="node"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="checker"><paramtype>Checker</paramtype></parameter><parameter name="check_return"><paramtype>typename Checker::return_type &amp;</paramtype></parameter></method>
2005 </method-group>
2006 </class>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058 </namespace>
2059 </namespace>
2060 </header>
2061 <header name="boost/intrusive/circular_list_algorithms.hpp">
2062 <namespace name="boost">
2063 <namespace name="intrusive">
2064 <class name="circular_list_algorithms"><template>
2065       <template-type-parameter name="NodeTraits"/>
2066     </template><description><para><classname alt="boost::intrusive::circular_list_algorithms">circular_list_algorithms</classname> provides basic algorithms to manipulate nodes forming a circular doubly linked list. An empty circular list is formed by a node whose pointers point to itself.</para><para><classname alt="boost::intrusive::circular_list_algorithms">circular_list_algorithms</classname> is configured with a NodeTraits class, which encapsulates the information about the node to be manipulated. NodeTraits must support the following interface:</para><para><emphasis role="bold">Typedefs</emphasis>:</para><para><computeroutput>node</computeroutput>: The type of the node that forms the circular list</para><para><computeroutput>node_ptr</computeroutput>: A pointer to a node</para><para><computeroutput>const_node_ptr</computeroutput>: A pointer to a const node</para><para><emphasis role="bold">Static functions</emphasis>:</para><para><computeroutput>static node_ptr get_previous(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_previous(node_ptr n, node_ptr prev);</computeroutput></para><para><computeroutput>static node_ptr get_next(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_next(node_ptr n, node_ptr next);</computeroutput> </para></description><struct name="stable_partition_info"><data-member name="num_1st_partition"><type>std::size_t</type></data-member>
2067 <data-member name="num_2nd_partition"><type>std::size_t</type></data-member>
2068 <data-member name="beg_2st_partition"><type>node_ptr</type></data-member>
2069 </struct><typedef name="node"><type>NodeTraits::node</type></typedef>
2070 <typedef name="node_ptr"><type>NodeTraits::node_ptr</type></typedef>
2071 <typedef name="const_node_ptr"><type>NodeTraits::const_node_ptr</type></typedef>
2072 <typedef name="node_traits"><type>NodeTraits</type></typedef>
2073 <method-group name="public static functions">
2074 <method name="init" specifiers="static"><type>void</type><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an non-used list element, so that inited(this_node) == true</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2075 <method name="inited" specifiers="static"><type>bool</type><parameter name="this_node"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns true is "this_node" is in a non-used state as if it was initialized by the "init" function.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2076 <method name="init_header" specifiers="static"><type>void</type><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty list, making this_node the only node of the circular list: <computeroutput>NodeTraits::get_next(this_node) == NodeTraits::get_previous(this_node) == this_node</computeroutput>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2077 <method name="unique" specifiers="static"><type>bool</type><parameter name="this_node"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: this_node must be in a circular list or be an empty circular list.</para><para><emphasis role="bold">Effects</emphasis>: Returns true is "this_node" is the only node of a circular list: <computeroutput>return NodeTraits::get_next(this_node) == this_node</computeroutput></para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2078 <method name="count" specifiers="static"><type>std::size_t</type><parameter name="this_node"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: this_node must be in a circular list or be an empty circular list.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of nodes in a circular list. If the circular list is empty, returns 1.</para><para><emphasis role="bold">Complexity</emphasis>: Linear</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2079 <method name="unlink" specifiers="static"><type>node_ptr</type><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: this_node must be in a circular list or be an empty circular list.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the node from the circular list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2080 <method name="unlink" specifiers="static"><type>void</type><parameter name="b"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="e"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: b and e must be nodes of the same circular list or an empty range.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the node [b, e) from the circular list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2081 <method name="link_before" specifiers="static"><type>void</type><parameter name="nxt_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: nxt_node must be a node of a circular list.</para><para><emphasis role="bold">Effects</emphasis>: Links this_node before nxt_node in the circular list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2082 <method name="link_after" specifiers="static"><type>void</type><parameter name="prev_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: prev_node must be a node of a circular list.</para><para><emphasis role="bold">Effects</emphasis>: Links this_node after prev_node in the circular list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2083 <method name="swap_nodes" specifiers="static"><type>void</type><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="other_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: this_node and other_node must be nodes inserted in circular lists or be empty circular lists.</para><para><emphasis role="bold">Effects</emphasis>: Swaps the position of the nodes: this_node is inserted in other_nodes position in the second circular list and the other_node is inserted in this_node's position in the first circular list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2084 <method name="transfer" specifiers="static"><type>void</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="b"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="e"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: b and e must be nodes of the same circular list or an empty range. and p must be a node of a different circular list or may not be an iterator in <emphasis role="bold">Effects</emphasis>: Removes the nodes from [b, e) range from their circular list and inserts them before p in p's circular list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2085 <method name="transfer" specifiers="static"><type>void</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="i"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: i must a node of a circular list and p must be a node of a different circular list.</para><para><emphasis role="bold">Effects</emphasis>: Removes the node i from its circular list and inserts it before p in p's circular list. If p == i or p == NodeTraits::get_next(i), this function is a null operation.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2086 <method name="reverse" specifiers="static"><type>void</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Reverses the order of elements in the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: This function is linear time. </para></description></method>
2087 <method name="move_backwards" specifiers="static"><type>void</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="n"><paramtype>std::size_t</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Moves the node p n positions towards the end of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of moved positions. </para></description></method>
2088 <method name="move_forward" specifiers="static"><type>void</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="n"><paramtype>std::size_t</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Moves the node p n positions towards the beginning of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of moved positions. </para></description></method>
2089 <method name="distance" specifiers="static"><type>std::size_t</type><parameter name="f"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="l"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: f and l must be in a circular list.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of nodes in the range [f, l).</para><para><emphasis role="bold">Complexity</emphasis>: Linear</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2090 <method name="stable_partition" specifiers="static"><type>void</type><template>
2091           <template-type-parameter name="Pred"/>
2092         </template><parameter name="beg"><paramtype>node_ptr</paramtype></parameter><parameter name="end"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="pred"><paramtype>Pred</paramtype></parameter><parameter name="info"><paramtype>stable_partition_info &amp;</paramtype></parameter></method>
2093 </method-group>
2094 <method-group name="private static functions">
2095 <method name="swap_prev" specifiers="static"><type>void</type><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="other_node"><paramtype>const node_ptr &amp;</paramtype></parameter></method>
2096 <method name="swap_next" specifiers="static"><type>void</type><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="other_node"><paramtype>const node_ptr &amp;</paramtype></parameter></method>
2097 </method-group>
2098 </class>
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150 </namespace>
2151 </namespace>
2152 </header>
2153 <header name="boost/intrusive/circular_slist_algorithms.hpp">
2154 <namespace name="boost">
2155 <namespace name="intrusive">
2156 <class name="circular_slist_algorithms"><template>
2157       <template-type-parameter name="NodeTraits"/>
2158     </template><description><para><classname alt="boost::intrusive::circular_slist_algorithms">circular_slist_algorithms</classname> provides basic algorithms to manipulate nodes forming a circular singly linked list. An empty circular list is formed by a node whose pointer to the next node points to itself.</para><para><classname alt="boost::intrusive::circular_slist_algorithms">circular_slist_algorithms</classname> is configured with a NodeTraits class, which encapsulates the information about the node to be manipulated. NodeTraits must support the following interface:</para><para><emphasis role="bold">Typedefs</emphasis>:</para><para><computeroutput>node</computeroutput>: The type of the node that forms the circular list</para><para><computeroutput>node_ptr</computeroutput>: A pointer to a node</para><para><computeroutput>const_node_ptr</computeroutput>: A pointer to a const node</para><para><emphasis role="bold">Static functions</emphasis>:</para><para><computeroutput>static node_ptr get_next(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_next(node_ptr n, node_ptr next);</computeroutput> </para></description><typedef name="node"><type>NodeTraits::node</type></typedef>
2159 <typedef name="node_ptr"><type>NodeTraits::node_ptr</type></typedef>
2160 <typedef name="const_node_ptr"><type>NodeTraits::const_node_ptr</type></typedef>
2161 <typedef name="node_traits"><type>NodeTraits</type></typedef>
2162 <method-group name="public static functions">
2163 <method name="init" specifiers="static"><type>void</type><parameter name="this_node"><paramtype>node_ptr</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an non-used list element, putting the next pointer to null: <computeroutput>NodeTraits::get_next(this_node) == node_ptr()</computeroutput></para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2164 <method name="unique" specifiers="static"><type>bool</type><parameter name="this_node"><paramtype>const_node_ptr</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: this_node must be in a circular list or be an empty circular list.</para><para><emphasis role="bold">Effects</emphasis>: Returns true is "this_node" is the only node of a circular list: or it's a not inserted node: <computeroutput>return node_ptr() == NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node</computeroutput></para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2165 <method name="inited" specifiers="static"><type>bool</type><parameter name="this_node"><paramtype>const_node_ptr</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns true is "this_node" has the same state as if it was inited using "init(node_ptr)"</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2166 <method name="unlink_after" specifiers="static"><type>void</type><parameter name="prev_node"><paramtype>node_ptr</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: prev_node must be in a circular list or be an empty circular list.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the next node of prev_node from the circular list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2167 <method name="unlink_after" specifiers="static"><type>void</type><parameter name="prev_node"><paramtype>node_ptr</paramtype></parameter><parameter name="last_node"><paramtype>node_ptr</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: prev_node and last_node must be in a circular list or be an empty circular list.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the range (prev_node, last_node) from the circular list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2168 <method name="link_after" specifiers="static"><type>void</type><parameter name="prev_node"><paramtype>node_ptr</paramtype></parameter><parameter name="this_node"><paramtype>node_ptr</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: prev_node must be a node of a circular list.</para><para><emphasis role="bold">Effects</emphasis>: Links this_node after prev_node in the circular list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2169 <method name="transfer_after" specifiers="static"><type>void</type><parameter name="p"><paramtype>node_ptr</paramtype></parameter><parameter name="b"><paramtype>node_ptr</paramtype></parameter><parameter name="e"><paramtype>node_ptr</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: b and e must be nodes of the same circular list or an empty range. and p must be a node of a different circular list.</para><para><emphasis role="bold">Effects</emphasis>: Removes the nodes from (b, e] range from their circular list and inserts them after p in p's circular list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2170 <method name="init_header" specifiers="static"><type>void</type><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty list, making this_node the only node of the circular list: <computeroutput>NodeTraits::get_next(this_node) == this_node</computeroutput>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2171 <method name="get_previous_node" specifiers="static"><type>node_ptr</type><parameter name="prev_init_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: this_node and prev_init_node must be in the same circular list.</para><para><emphasis role="bold">Effects</emphasis>: Returns the previous node of this_node in the circular list starting. the search from prev_init_node. The first node checked for equality is NodeTraits::get_next(prev_init_node).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements between prev_init_node and this_node.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2172 <method name="get_previous_node" specifiers="static"><type>node_ptr</type><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: this_node must be in a circular list or be an empty circular list.</para><para><emphasis role="bold">Effects</emphasis>: Returns the previous node of this_node in the circular list.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements in the circular list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2173 <method name="get_previous_previous_node" specifiers="static"><type>node_ptr</type><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: this_node must be in a circular list or be an empty circular list.</para><para><emphasis role="bold">Effects</emphasis>: Returns the previous node of the previous node of this_node in the circular list.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements in the circular list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2174 <method name="get_previous_previous_node" specifiers="static"><type>node_ptr</type><parameter name="p"><paramtype>node_ptr</paramtype></parameter><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: this_node and p must be in the same circular list.</para><para><emphasis role="bold">Effects</emphasis>: Returns the previous node of the previous node of this_node in the circular list starting. the search from p. The first node checked for equality is NodeTraits::get_next((NodeTraits::get_next(p)).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements in the circular list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2175 <method name="count" specifiers="static"><type>std::size_t</type><parameter name="this_node"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: this_node must be in a circular list or be an empty circular list.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of nodes in a circular list. If the circular list is empty, returns 1.</para><para><emphasis role="bold">Complexity</emphasis>: Linear</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2176 <method name="unlink" specifiers="static"><type>void</type><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: this_node must be in a circular list, be an empty circular list or be inited.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the node from the circular list.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements in the circular list</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2177 <method name="link_before" specifiers="static"><type>void</type><parameter name="nxt_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: nxt_node must be a node of a circular list.</para><para><emphasis role="bold">Effects</emphasis>: Links this_node before nxt_node in the circular list.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements in the circular list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2178 <method name="swap_nodes" specifiers="static"><type>void</type><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="other_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: this_node and other_node must be nodes inserted in circular lists or be empty circular lists.</para><para><emphasis role="bold">Effects</emphasis>: Swaps the position of the nodes: this_node is inserted in other_nodes position in the second circular list and the other_node is inserted in this_node's position in the first circular list.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to number of elements of both lists</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2179 <method name="reverse" specifiers="static"><type>void</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Reverses the order of elements in the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: This function is linear to the contained elements. </para></description></method>
2180 <method name="move_backwards" specifiers="static"><type>node_ptr</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="n"><paramtype>std::size_t</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Moves the node p n positions towards the end of the list.</para><para><emphasis role="bold">Returns</emphasis>: The previous node of p after the function if there has been any movement, Null if n leads to no movement.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements plus the number moved positions. </para></description></method>
2181 <method name="move_forward" specifiers="static"><type>node_ptr</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="n"><paramtype>std::size_t</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Moves the node p n positions towards the beginning of the list.</para><para><emphasis role="bold">Returns</emphasis>: The previous node of p after the function if there has been any movement, Null if n leads equals to no movement.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements plus the number moved positions. </para></description></method>
2182 </method-group>
2183 </class>
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235 </namespace>
2236 </namespace>
2237 </header>
2238 <header name="boost/intrusive/derivation_value_traits.hpp">
2239 <namespace name="boost">
2240 <namespace name="intrusive">
2241 <struct name="derivation_value_traits"><template>
2242       <template-type-parameter name="T"/>
2243       <template-type-parameter name="NodeTraits"/>
2244       <template-nontype-parameter name="LinkMode"><type>link_mode_type</type><default>safe_link</default></template-nontype-parameter>
2245     </template><description><para>This value traits template is used to create value traits from user defined node traits where value_traits::value_type will derive from node_traits::node </para></description><typedef name="node_traits"><type>NodeTraits</type></typedef>
2246 <typedef name="value_type"><type>T</type></typedef>
2247 <typedef name="node"><type>node_traits::node</type></typedef>
2248 <typedef name="node_ptr"><type>node_traits::node_ptr</type></typedef>
2249 <typedef name="const_node_ptr"><type>node_traits::const_node_ptr</type></typedef>
2250 <typedef name="pointer"><type><classname>pointer_traits</classname>&lt; node_ptr &gt;::template rebind_pointer&lt; value_type &gt;::type</type></typedef>
2251 <typedef name="const_pointer"><type><classname>pointer_traits</classname>&lt; node_ptr &gt;::template rebind_pointer&lt; const value_type &gt;::type</type></typedef>
2252 <typedef name="reference"><type><classname>boost::intrusive::pointer_traits</classname>&lt; pointer &gt;::reference</type></typedef>
2253 <typedef name="const_reference"><type><classname>boost::intrusive::pointer_traits</classname>&lt; const_pointer &gt;::reference</type></typedef>
2254 <data-member name="link_mode" specifiers="static"><type>const link_mode_type</type></data-member>
2255 <method-group name="public static functions">
2256 <method name="to_node_ptr" specifiers="static"><type>node_ptr</type><parameter name="value"><paramtype>reference</paramtype></parameter></method>
2257 <method name="to_node_ptr" specifiers="static"><type>const_node_ptr</type><parameter name="value"><paramtype>const_reference</paramtype></parameter></method>
2258 <method name="to_value_ptr" specifiers="static"><type>pointer</type><parameter name="n"><paramtype>const node_ptr &amp;</paramtype></parameter></method>
2259 <method name="to_value_ptr" specifiers="static"><type>const_pointer</type><parameter name="n"><paramtype>const const_node_ptr &amp;</paramtype></parameter></method>
2260 </method-group>
2261 </struct>
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313 </namespace>
2314 </namespace>
2315 </header>
2316 <header name="boost/intrusive/hashtable.hpp">
2317 <namespace name="boost">
2318 <namespace name="intrusive">
2319 <class name="hashtable"><template>
2320       <template-type-parameter name="T"/>
2321       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
2322     </template><inherit access="private">hashtable_size_traits_wrapper&lt; hashdata_internal&lt; ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags &amp;(hash_bool_flags::incremental_pos|hash_bool_flags::cache_begin_pos) &gt;, SizeType,(BoolFlags &amp;hash_bool_flags::constant_time_size_pos)!=0 &gt;</inherit><description><para>The class template hashtable is an intrusive hash table container, that is used to construct intrusive <classname alt="boost::intrusive::unordered_set">unordered_set</classname> and <classname alt="boost::intrusive::unordered_multiset">unordered_multiset</classname> containers. The no-throw guarantee holds only, if the VoidOrKeyEqual object and Hasher don't throw.</para><para>hashtable is a semi-intrusive container: each object to be stored in the container must contain a proper hook, but the container also needs additional auxiliary memory to work: hashtable needs a pointer to an array of type <computeroutput>bucket_type</computeroutput> to be passed in the constructor. This bucket array must have at least the same lifetime as the container. This makes the use of hashtable more complicated than purely intrusive containers. <computeroutput>bucket_type</computeroutput> is default-constructible, copyable and assignable</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput>, <computeroutput>hash&lt;&gt;</computeroutput> and <computeroutput>equal&lt;&gt;</computeroutput> <computeroutput>bucket_traits&lt;&gt;</computeroutput>, power_2_buckets&lt;&gt;, cache_begin&lt;&gt; and incremental&lt;&gt;.</para><para>hashtable only provides forward iterators but it provides 4 iterator types: iterator and const_iterator to navigate through the whole container and local_iterator and const_local_iterator to navigate through the values stored in a single bucket. Local iterators are faster and smaller.</para><para>It's not recommended to use non constant-time size hashtables because several key functions, like "empty()", become non-constant time functions. Non constant_time size hashtables are mainly provided to support auto-unlink hooks.</para><para>hashtables, does not make automatic rehashings nor offers functions related to a load factor. Rehashing can be explicitly requested and the user must provide a new bucket array that will be used from that moment.</para><para>Since no automatic rehashing is done, iterators are never invalidated when inserting or erasing elements. Iterators are only invalidated when rehashing. </para></description><typedef name="value_traits"><type>ValueTraits</type></typedef>
2323 <typedef name="pointer"><type>value_traits::pointer</type></typedef>
2324 <typedef name="const_pointer"><type>value_traits::const_pointer</type></typedef>
2325 <typedef name="value_type"><type>value_traits::value_type</type></typedef>
2326 <typedef name="key_type"><type>hash_types_base::key_type</type></typedef>
2327 <typedef name="key_of_value"><type>hash_types_base::key_of_value</type></typedef>
2328 <typedef name="reference"><type><classname>pointer_traits</classname>&lt; pointer &gt;::reference</type></typedef>
2329 <typedef name="const_reference"><type><classname>pointer_traits</classname>&lt; const_pointer &gt;::reference</type></typedef>
2330 <typedef name="difference_type"><type><classname>pointer_traits</classname>&lt; pointer &gt;::difference_type</type></typedef>
2331 <typedef name="size_type"><type>SizeType</type></typedef>
2332 <typedef name="key_equal"><type>internal_type::key_equal</type></typedef>
2333 <typedef name="hasher"><type>internal_type::hasher</type></typedef>
2334 <typedef name="bucket_type"><type><emphasis>unspecified</emphasis></type></typedef>
2335 <typedef name="bucket_ptr"><type>internal_type::bucket_ptr</type></typedef>
2336 <typedef name="siterator"><type>slist::iterator</type></typedef>
2337 <typedef name="const_siterator"><type>slist::const_iterator</type></typedef>
2338 <typedef name="iterator"><type>internal_type::iterator</type></typedef>
2339 <typedef name="const_iterator"><type>internal_type::const_iterator</type></typedef>
2340 <typedef name="local_iterator"><type>internal_type::local_iterator</type></typedef>
2341 <typedef name="const_local_iterator"><type>internal_type::const_local_iterator</type></typedef>
2342 <typedef name="node_traits"><type>value_traits::node_traits</type></typedef>
2343 <typedef name="node"><type>node_traits::node</type></typedef>
2344 <typedef name="node_ptr"><type><classname>pointer_traits</classname>&lt; pointer &gt;::template rebind_pointer&lt; node &gt;::type</type></typedef>
2345 <typedef name="const_node_ptr"><type><classname>pointer_traits</classname>&lt; pointer &gt;::template rebind_pointer&lt; const node &gt;::type</type></typedef>
2346 <typedef name="node_reference"><type><classname>pointer_traits</classname>&lt; node_ptr &gt;::reference</type></typedef>
2347 <typedef name="const_node_reference"><type><classname>pointer_traits</classname>&lt; const_node_ptr &gt;::reference</type></typedef>
2348 <typedef name="node_algorithms"><type>slist::node_algorithms</type></typedef>
2349 <typedef name="insert_commit_data"><type><emphasis>unspecified</emphasis></type></typedef>
2350 <data-member name="stateful_value_traits" specifiers="static"><type>const bool</type></data-member>
2351 <data-member name="store_hash" specifiers="static"><type>const bool</type></data-member>
2352 <data-member name="unique_keys" specifiers="static"><type>const bool</type></data-member>
2353 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
2354 <data-member name="cache_begin" specifiers="static"><type>const bool</type></data-member>
2355 <data-member name="compare_hash" specifiers="static"><type>const bool</type></data-member>
2356 <data-member name="incremental" specifiers="static"><type>const bool</type></data-member>
2357 <data-member name="power_2_buckets" specifiers="static"><type>const bool</type></data-member>
2358 <data-member name="optimize_multikey" specifiers="static"><type>const bool</type></data-member>
2359 <method-group name="public member functions">
2360 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time. Worst case (empty <classname alt="boost::intrusive::unordered_set">unordered_set</classname>): O(this-&gt;bucket_count())</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2361 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time. Worst case (empty <classname alt="boost::intrusive::unordered_set">unordered_set</classname>): O(this-&gt;bucket_count())</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2362 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time. Worst case (empty <classname alt="boost::intrusive::unordered_set">unordered_set</classname>): O(this-&gt;bucket_count())</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2363 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2364 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2365 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2366 <method name="hash_function" cv="const"><type>hasher</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the hasher object used by the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If hasher copy-constructor throws. </para></description></method>
2367 <method name="key_eq" cv="const"><type>key_equal</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_equal object used by the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_equal copy-constructor throws. </para></description></method>
2368 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: if constant-time size and <classname alt="boost::intrusive::cache_begin">cache_begin</classname> options are disabled, average constant time (worst case, with empty() == true: O(this-&gt;bucket_count()). Otherwise constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2369 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if <classname alt="boost::intrusive::constant_time_size">constant_time_size</classname> is false. Constant-time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2370 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>hashtable</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: the hasher and the equality function unqualified swap call should not throw.</para><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two unordered_sets. Swaps also the contained bucket array and equality and hasher functors.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the swap() call for the comparison or hash functors found using ADL throw. Basic guarantee. </para></description></method>
2371 <method name="clone_from"><type>void</type><template>
2372           <template-type-parameter name="Cloner"/>
2373           <template-type-parameter name="Disposer"/>
2374         </template><parameter name="src"><paramtype>const <classname>hashtable</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw Cloner should yield to nodes that compare equal and produce the same hash than the original node.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. The hash function and the equality predicate are copied from the source.</para><para>If <classname alt="boost::intrusive::store_hash">store_hash</classname> option is true, this method does not use the hash function.</para><para>If any operation throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner or hasher throw or hash or equality predicate copying throws. Basic guarantee. </para></description></method>
2375 <method name="clone_from"><type>void</type><template>
2376           <template-type-parameter name="Cloner"/>
2377           <template-type-parameter name="Disposer"/>
2378         </template><parameter name="src"><paramtype><classname>hashtable</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw Cloner should yield to nodes that compare equal and produce the same hash than the original node.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. The hash function and the equality predicate are copied from the source.</para><para>If <classname alt="boost::intrusive::store_hash">store_hash</classname> option is true, this method does not use the hash function.</para><para>If any operation throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner or hasher throw or hash or equality predicate copying throws. Basic guarantee. </para></description></method>
2379 <method name="insert_equal"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value into the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the inserted value.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
2380 <method name="insert_equal"><type>void</type><template>
2381           <template-type-parameter name="Iterator"/>
2382         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Equivalent to this-&gt;insert_equal(t) for each element in [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(N), where N is distance(b, e). Worst case O(N*this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
2383 <method name="insert_unique"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Tries to inserts value into the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Returns</emphasis>: If the value is not already present inserts it and returns a pair containing the iterator to the new value and true. If there is an equivalent value returns a pair containing an iterator to the already present value and false.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
2384 <method name="insert_unique"><type>void</type><template>
2385           <template-type-parameter name="Iterator"/>
2386         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Equivalent to this-&gt;insert_unique(t) for each element in [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(N), where N is distance(b, e). Worst case O(N*this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
2387 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
2388           <template-type-parameter name="KeyType"/>
2389           <template-type-parameter name="KeyHasher"/>
2390           <template-type-parameter name="KeyEqual"/>
2391         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal_func throw. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the hash or the equality is much cheaper to construct than the value_type and this function offers the possibility to use that the part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time.</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para>After a successful rehashing insert_commit_data remains valid. </para></description></method>
2392 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hasher or key_compare throw. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the hash or the equality is much cheaper to construct than the value_type and this function offers the possibility to use that the part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time.</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para>After a successful rehashing insert_commit_data remains valid. </para></description></method>
2393 <method name="insert_unique_commit"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue of type value_type. commit_data must have been obtained from a previous call to "insert_check". No objects should have been inserted or erased from the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> between the "insert_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the newly inserted object.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls.</para><para>After a successful rehashing insert_commit_data remains valid. </para></description></method>
2394 <method name="erase"><type>void</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased element. No destructors are called. </para></description></method>
2395 <method name="erase"><type>void</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(distance(b, e)), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
2396 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
2397 <method name="erase"><type>size_type</type><template>
2398           <template-type-parameter name="KeyType"/>
2399           <template-type-parameter name="KeyHasher"/>
2400           <template-type-parameter name="KeyEqual"/>
2401         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements that have the same hash and compare equal with the given key.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal_func throw. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
2402 <method name="erase_and_dispose"><type>void</type><template>
2403           <template-type-parameter name="Disposer"/>
2404         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
2405 <method name="erase_and_dispose"><type>void</type><template>
2406           <template-type-parameter name="Disposer"/>
2407         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(distance(b, e)), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
2408 <method name="erase_and_dispose"><type>size_type</type><template>
2409           <template-type-parameter name="Disposer"/>
2410         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
2411 <method name="erase_and_dispose"><type>size_type</type><template>
2412           <template-type-parameter name="KeyType"/>
2413           <template-type-parameter name="KeyHasher"/>
2414           <template-type-parameter name="KeyEqual"/>
2415           <template-type-parameter name="Disposer"/>
2416         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "equal_func". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal_func throw. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
2417 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
2418 <method name="clear_and_dispose"><type>void</type><template>
2419           <template-type-parameter name="Disposer"/>
2420         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
2421 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. </para></description></method>
2422 <method name="count" cv="const"><type>size_type</type><template>
2423           <template-type-parameter name="KeyType"/>
2424           <template-type-parameter name="KeyHasher"/>
2425           <template-type-parameter name="KeyEqual"/>
2426         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal throw. </para></description></method>
2427 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element is equal to "value" or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. </para></description></method>
2428 <method name="find"><type>iterator</type><template>
2429           <template-type-parameter name="KeyType"/>
2430           <template-type-parameter name="KeyHasher"/>
2431           <template-type-parameter name="KeyEqual"/>
2432         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is "key" according to the given hash and equality functor or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal_func throw.</para><para><emphasis role="bold">Note</emphasis>: This function is used when constructing a value_type is expensive and the value_type can be compared with a cheaper key type. Usually this key is part of the value_type. </para></description></method>
2433 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a const_iterator to the first element whose key is "key" or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. </para></description></method>
2434 <method name="find" cv="const"><type>const_iterator</type><template>
2435           <template-type-parameter name="KeyType"/>
2436           <template-type-parameter name="KeyHasher"/>
2437           <template-type-parameter name="KeyEqual"/>
2438         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is "key" according to the given hasher and equality functor or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal_func throw.</para><para><emphasis role="bold">Note</emphasis>: This function is used when constructing a value_type is expensive and the value_type can be compared with a cheaper key type. Usually this key is part of the value_type. </para></description></method>
2439 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns a range containing all elements with values equivalent to value. Returns std::make_pair(this-&gt;end(), this-&gt;end()) if no such elements exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. </para></description></method>
2440 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
2441           <template-type-parameter name="KeyType"/>
2442           <template-type-parameter name="KeyHasher"/>
2443           <template-type-parameter name="KeyEqual"/>
2444         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Returns a range containing all elements with equivalent keys. Returns std::make_pair(this-&gt;end(), this-&gt;end()) if no such elements exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(key, hash_func, equal_func)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or the equal_func throw.</para><para><emphasis role="bold">Note</emphasis>: This function is used when constructing a value_type is expensive and the value_type can be compared with a cheaper key type. Usually this key is part of the value_type. </para></description></method>
2445 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns a range containing all elements with values equivalent to value. Returns std::make_pair(this-&gt;end(), this-&gt;end()) if no such elements exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. </para></description></method>
2446 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
2447           <template-type-parameter name="KeyType"/>
2448           <template-type-parameter name="KeyHasher"/>
2449           <template-type-parameter name="KeyEqual"/>
2450         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Returns a range containing all elements with equivalent keys. Returns std::make_pair(this-&gt;end(), this-&gt;end()) if no such elements exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(key, hash_func, equal_func)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the hasher or equal_func throw.</para><para><emphasis role="bold">Note</emphasis>: This function is used when constructing a value_type is expensive and the value_type can be compared with a cheaper key type. Usually this key is part of the value_type. </para></description></method>
2451 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the internal hash function throws. </para></description></method>
2452 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the internal hash function throws. </para></description></method>
2453 <method name="local_iterator_to"><type>local_iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid local_iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2454 <method name="local_iterator_to" cv="const"><type>const_local_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_local_iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2455 <method name="bucket_count" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of buckets passed in the constructor or the last rehash function.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2456 <method name="bucket_size" cv="const"><type>size_type</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements in the nth bucket.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2457 <method name="bucket" cv="const"><type>size_type</type><parameter name="k"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the index of the bucket in which elements with keys equivalent to k would be found, if any such element existed.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the hash functor throws.</para><para><emphasis role="bold">Note</emphasis>: the return value is in the range [0, this-&gt;bucket_count()). </para></description></method>
2458 <method name="bucket" cv="const"><type>size_type</type><template>
2459           <template-type-parameter name="KeyType"/>
2460           <template-type-parameter name="KeyHasher"/>
2461         </template><parameter name="k"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para><emphasis role="bold">Effects</emphasis>: Returns the index of the bucket in which elements with keys equivalent to k would be found, if any such element existed.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If hash_func throws.</para><para><emphasis role="bold">Note</emphasis>: the return value is in the range [0, this-&gt;bucket_count()). </para></description></method>
2462 <method name="bucket_pointer" cv="const"><type>bucket_ptr</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the bucket array pointer passed in the constructor or the last rehash function.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2463 <method name="begin"><type>local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a local_iterator pointing to the beginning of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
2464 <method name="begin" cv="const"><type>const_local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a const_local_iterator pointing to the beginning of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
2465 <method name="cbegin" cv="const"><type>const_local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a const_local_iterator pointing to the beginning of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
2466 <method name="end"><type>local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a local_iterator pointing to the end of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
2467 <method name="end" cv="const"><type>const_local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a const_local_iterator pointing to the end of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
2468 <method name="cend" cv="const"><type>const_local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a const_local_iterator pointing to the end of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
2469 <method name="rehash"><type>void</type><parameter name="new_bucket_traits"><paramtype>const <classname>bucket_traits</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: new_bucket_traits can hold a pointer to a new bucket array or the same as the old bucket array with a different length. new_size is the length of the the array pointed by new_buckets. If new_bucket_traits.bucket_begin() == this-&gt;bucket_pointer() new_bucket_traits.bucket_count() can be bigger or smaller than this-&gt;bucket_count(). 'new_bucket_traits' copy constructor should not throw.</para><para><emphasis role="bold">Effects</emphasis>: If <computeroutput>new_bucket_traits.bucket_begin() == this-&gt;bucket_pointer()</computeroutput> is false, unlinks values from the old bucket and inserts then in the new one according to the hash value of values.</para><para>If <computeroutput>new_bucket_traits.bucket_begin() == this-&gt;bucket_pointer()</computeroutput> is true, the implementations avoids moving values as much as possible.</para><para>Bucket traits hold by *this is assigned from new_bucket_traits. If the container is configured as incremental&lt;&gt;, the split bucket is set to the new bucket_count().</para><para>If <classname alt="boost::intrusive::store_hash">store_hash</classname> option is true, this method does not use the hash function. If false, the implementation tries to minimize calls to the hash function (e.g. once for equivalent values if optimize_multikey&lt;true&gt; is true).</para><para>If rehash is successful updates the internal <classname alt="boost::intrusive::bucket_traits">bucket_traits</classname> with new_bucket_traits.</para><para><emphasis role="bold">Complexity</emphasis>: Average case linear in this-&gt;size(), worst case quadratic.</para><para><emphasis role="bold">Throws</emphasis>: If the hasher functor throws. Basic guarantee. </para></description></method>
2470 <method name="full_rehash"><type>void</type><description><para><emphasis role="bold">Note</emphasis>: This function is used when keys from inserted elements are changed (e.g. a language change when key is a string) but uniqueness and hash properties are preserved so a fast full rehash recovers invariants for *this without extracting and reinserting all elements again.</para><para><emphasis role="bold">Requires</emphasis>: Calls produced to the hash function should not alter the value uniqueness properties of already inserted elements. If hasher(key1) == hasher(key2) was true when elements were inserted, it shall be true during calls produced in the execution of this function.</para><para>key_equal is not called inside this function so it is assumed that key_equal(value1, value2) should produce the same results as before for inserted elements.</para><para><emphasis role="bold">Effects</emphasis>: Reprocesses all values hold by *this, recalculating their hash values and redistributing them though the buckets.</para><para>If <classname alt="boost::intrusive::store_hash">store_hash</classname> option is true, this method uses the hash function and updates the stored hash value.</para><para><emphasis role="bold">Complexity</emphasis>: Average case linear in this-&gt;size(), worst case quadratic.</para><para><emphasis role="bold">Throws</emphasis>: If the hasher functor throws. Basic guarantee. </para></description></method>
2471 <method name="incremental_rehash"><type>bool</type><parameter name="grow"><paramtype>bool</paramtype><default>true</default></parameter><description><para><emphasis role="bold">Requires</emphasis>:</para><para><emphasis role="bold">Effects</emphasis>:</para><para><emphasis role="bold">Complexity</emphasis>:</para><para><emphasis role="bold">Throws</emphasis>:</para><para><emphasis role="bold">Note</emphasis>: this method is only available if incremental&lt;true&gt; option is activated. </para></description><description><para>grow </para></description></method>
2472 <method name="incremental_rehash"><type>bool</type><parameter name="new_bucket_traits"><paramtype>const <classname>bucket_traits</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If new_bucket_traits.bucket_count() is not this-&gt;bucket_count()/2 or this-&gt;bucket_count()*2, or this-&gt;split_bucket() != new_bucket_traits.bucket_count() returns false and does nothing.</para><para>Otherwise, copy assigns new_bucket_traits to the internal <classname alt="boost::intrusive::bucket_traits">bucket_traits</classname> and transfers all the objects from old buckets to the new ones.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to size().</para><para><emphasis role="bold">Throws</emphasis>: Nothing</para><para><emphasis role="bold">Note</emphasis>: this method is only available if incremental&lt;true&gt; option is activated. </para></description></method>
2473 <method name="split_count" cv="const"><type>size_type</type><description><para><emphasis role="bold">Requires</emphasis>: incremental&lt;&gt; option must be set</para><para><emphasis role="bold">Effects</emphasis>: returns the current split count</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing </para></description></method>
2474 </method-group>
2475 <constructor specifiers="explicit"><parameter name="b_traits"><paramtype>const <classname>bucket_traits</classname> &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>const hasher &amp;</paramtype><default>hasher()</default></parameter><parameter name="equal_func"><paramtype>const key_equal &amp;</paramtype><default>key_equal()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: buckets must not be being used by any other resource.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty <classname alt="boost::intrusive::unordered_set">unordered_set</classname>, storing a reference to the bucket array and copies of the key_hasher and equal_func functors.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor or invocation of hash_func or equal_func throws.</para><para><emphasis role="bold">Notes</emphasis>: buckets array must be disposed only after *this is disposed. </para></description></constructor>
2476 <constructor><template>
2477           <template-type-parameter name="Iterator"/>
2478         </template><parameter name="unique"><paramtype>bool</paramtype></parameter><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="b_traits"><paramtype>const <classname>bucket_traits</classname> &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>const hasher &amp;</paramtype><default>hasher()</default></parameter><parameter name="equal_func"><paramtype>const key_equal &amp;</paramtype><default>key_equal()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: buckets must not be being used by any other resource and dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: If N is distance(b, e): Average case is O(N) (with a good hash function and with buckets_len &gt;= N),worst case O(N^2).</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor or invocation of hasher or key_equal throws.</para><para><emphasis role="bold">Notes</emphasis>: buckets array must be disposed only after *this is disposed. </para></description></constructor>
2479 <constructor><parameter name="x"><paramtype><classname>hashtable</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
2480 <copy-assignment><type><classname>hashtable</classname> &amp;</type><parameter name="x"><paramtype><classname>hashtable</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
2481 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> are not deleted (i.e. no destructors are called).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements in the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>, if it's a safe-mode or auto-unlink value. Otherwise constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
2482 <method-group name="public static functions">
2483 <method name="s_local_iterator_to" specifiers="static"><type>local_iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid local_iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
2484 <method name="s_local_iterator_to" specifiers="static"><type>const_local_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_local_iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
2485 <method name="suggested_upper_bucket_count" specifiers="static"><type>size_type</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the nearest new bucket count optimized for the container that is bigger or equal than n. This suggestion can be used to create bucket arrays with a size that will usually improve container's performance. If such value does not exist, the higher possible value is returned.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2486 <method name="suggested_lower_bucket_count" specifiers="static"><type>size_type</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the nearest new bucket count optimized for the container that is smaller or equal than n. This suggestion can be used to create bucket arrays with a size that will usually improve container's performance. If such value does not exist, the lowest possible value is returned.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2487 </method-group>
2488 </class><struct name="make_hashtable"><template>
2489       <template-type-parameter name="T"/>
2490       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
2491     </template><description><para>Helper metafunction to define a <computeroutput>hashtable</computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
2492 </struct>
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544 </namespace>
2545 </namespace>
2546 </header>
2547 <header name="boost/intrusive/intrusive_fwd.hpp">
2548 <para>This header file forward declares most Intrusive classes.</para><para>It forward declares the following containers and hooks:<itemizedlist>
2549 <listitem><para><classname alt="boost::intrusive::slist">boost::intrusive::slist</classname> / <classname alt="boost::intrusive::slist_base_hook">boost::intrusive::slist_base_hook</classname> / <classname alt="boost::intrusive::slist_member_hook">boost::intrusive::slist_member_hook</classname></para></listitem><listitem><para><classname alt="boost::intrusive::list">boost::intrusive::list</classname> / <classname alt="boost::intrusive::list_base_hook">boost::intrusive::list_base_hook</classname> / <classname alt="boost::intrusive::list_member_hook">boost::intrusive::list_member_hook</classname></para></listitem><listitem><para><classname alt="boost::intrusive::bstree">boost::intrusive::bstree</classname> / <classname alt="boost::intrusive::bs_set">boost::intrusive::bs_set</classname> / <classname alt="boost::intrusive::bs_multiset">boost::intrusive::bs_multiset</classname> / <classname alt="boost::intrusive::bs_set_base_hook">boost::intrusive::bs_set_base_hook</classname> / <classname alt="boost::intrusive::bs_set_member_hook">boost::intrusive::bs_set_member_hook</classname></para></listitem><listitem><para><classname alt="boost::intrusive::rbtree">boost::intrusive::rbtree</classname> / <classname alt="boost::intrusive::set">boost::intrusive::set</classname> / <classname alt="boost::intrusive::multiset">boost::intrusive::multiset</classname> / <classname alt="boost::intrusive::set_base_hook">boost::intrusive::set_base_hook</classname> / <classname alt="boost::intrusive::set_member_hook">boost::intrusive::set_member_hook</classname></para></listitem><listitem><para><classname alt="boost::intrusive::avltree">boost::intrusive::avltree</classname> / <classname alt="boost::intrusive::avl_set">boost::intrusive::avl_set</classname> / <classname alt="boost::intrusive::avl_multiset">boost::intrusive::avl_multiset</classname> / <classname alt="boost::intrusive::avl_set_base_hook">boost::intrusive::avl_set_base_hook</classname> / <classname alt="boost::intrusive::avl_set_member_hook">boost::intrusive::avl_set_member_hook</classname></para></listitem><listitem><para><classname alt="boost::intrusive::splaytree">boost::intrusive::splaytree</classname> / <classname alt="boost::intrusive::splay_set">boost::intrusive::splay_set</classname> / <classname alt="boost::intrusive::splay_multiset">boost::intrusive::splay_multiset</classname></para></listitem><listitem><para><classname alt="boost::intrusive::sgtree">boost::intrusive::sgtree</classname> / <classname alt="boost::intrusive::sg_set">boost::intrusive::sg_set</classname> / <classname alt="boost::intrusive::sg_multiset">boost::intrusive::sg_multiset</classname></para></listitem><listitem><para><classname alt="boost::intrusive::treap">boost::intrusive::treap</classname> / <classname alt="boost::intrusive::treap_set">boost::intrusive::treap_set</classname> / <classname alt="boost::intrusive::treap_multiset">boost::intrusive::treap_multiset</classname></para></listitem><listitem><para><classname alt="boost::intrusive::hashtable">boost::intrusive::hashtable</classname> / <classname alt="boost::intrusive::unordered_set">boost::intrusive::unordered_set</classname> / <classname alt="boost::intrusive::unordered_multiset">boost::intrusive::unordered_multiset</classname> / <classname alt="boost::intrusive::unordered_set_base_hook">boost::intrusive::unordered_set_base_hook</classname> / <classname alt="boost::intrusive::unordered_set_member_hook">boost::intrusive::unordered_set_member_hook</classname> /</para></listitem><listitem><para><classname alt="boost::intrusive::any_base_hook">boost::intrusive::any_base_hook</classname> / <classname alt="boost::intrusive::any_member_hook">boost::intrusive::any_member_hook</classname></para></listitem></itemizedlist>
2550 </para><para>It forward declares the following container or hook options:<itemizedlist>
2551 <listitem><para><classname alt="boost::intrusive::constant_time_size">boost::intrusive::constant_time_size</classname> / <classname alt="boost::intrusive::size_type">boost::intrusive::size_type</classname> / <classname alt="boost::intrusive::compare">boost::intrusive::compare</classname> / <classname alt="boost::intrusive::equal">boost::intrusive::equal</classname></para></listitem><listitem><para><classname alt="boost::intrusive::floating_point">boost::intrusive::floating_point</classname> / <classname alt="boost::intrusive::priority">boost::intrusive::priority</classname> / <classname alt="boost::intrusive::hash">boost::intrusive::hash</classname></para></listitem><listitem><para><classname alt="boost::intrusive::value_traits">boost::intrusive::value_traits</classname> / <classname alt="boost::intrusive::member_hook">boost::intrusive::member_hook</classname> / <classname alt="boost::intrusive::function_hook">boost::intrusive::function_hook</classname> / <classname alt="boost::intrusive::base_hook">boost::intrusive::base_hook</classname></para></listitem><listitem><para><classname alt="boost::intrusive::void_pointer">boost::intrusive::void_pointer</classname> / <classname alt="boost::intrusive::tag">boost::intrusive::tag</classname> / <classname alt="boost::intrusive::link_mode">boost::intrusive::link_mode</classname></para></listitem><listitem><para><classname alt="boost::intrusive::optimize_size">boost::intrusive::optimize_size</classname> / <classname alt="boost::intrusive::linear">boost::intrusive::linear</classname> / <classname alt="boost::intrusive::cache_last">boost::intrusive::cache_last</classname></para></listitem><listitem><para><classname alt="boost::intrusive::bucket_traits">boost::intrusive::bucket_traits</classname> / <classname alt="boost::intrusive::store_hash">boost::intrusive::store_hash</classname> / <classname alt="boost::intrusive::optimize_multikey">boost::intrusive::optimize_multikey</classname></para></listitem><listitem><para><classname alt="boost::intrusive::power_2_buckets">boost::intrusive::power_2_buckets</classname> / <classname alt="boost::intrusive::cache_begin">boost::intrusive::cache_begin</classname> / <classname alt="boost::intrusive::compare_hash">boost::intrusive::compare_hash</classname> / <classname alt="boost::intrusive::incremental">boost::intrusive::incremental</classname></para></listitem></itemizedlist>
2552 </para><para>It forward declares the following value traits utilities:<itemizedlist>
2553 <listitem><para><classname alt="boost::intrusive::value_traits">boost::intrusive::value_traits</classname> / <classname alt="boost::intrusive::derivation_value_traits">boost::intrusive::derivation_value_traits</classname> / <classname alt="boost::intrusive::trivial_value_traits">boost::intrusive::trivial_value_traits</classname></para></listitem></itemizedlist>
2554 </para><para>Finally it forward declares the following general purpose utilities:<itemizedlist>
2555 <listitem><para><classname alt="boost::intrusive::pointer_plus_bits">boost::intrusive::pointer_plus_bits</classname> / boost::intrusive::priority_compare. </para></listitem></itemizedlist>
2556 </para></header>
2557 <header name="boost/intrusive/linear_slist_algorithms.hpp">
2558 <namespace name="boost">
2559 <namespace name="intrusive">
2560 <class name="linear_slist_algorithms"><template>
2561       <template-type-parameter name="NodeTraits"/>
2562     </template><description><para><classname alt="boost::intrusive::linear_slist_algorithms">linear_slist_algorithms</classname> provides basic algorithms to manipulate nodes forming a linear singly linked list.</para><para><classname alt="boost::intrusive::linear_slist_algorithms">linear_slist_algorithms</classname> is configured with a NodeTraits class, which encapsulates the information about the node to be manipulated. NodeTraits must support the following interface:</para><para><emphasis role="bold">Typedefs</emphasis>:</para><para><computeroutput>node</computeroutput>: The type of the node that forms the linear list</para><para><computeroutput>node_ptr</computeroutput>: A pointer to a node</para><para><computeroutput>const_node_ptr</computeroutput>: A pointer to a const node</para><para><emphasis role="bold">Static functions</emphasis>:</para><para><computeroutput>static node_ptr get_next(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_next(node_ptr n, node_ptr next);</computeroutput> </para></description><typedef name="node"><type>NodeTraits::node</type></typedef>
2563 <typedef name="node_ptr"><type>NodeTraits::node_ptr</type></typedef>
2564 <typedef name="const_node_ptr"><type>NodeTraits::const_node_ptr</type></typedef>
2565 <typedef name="node_traits"><type>NodeTraits</type></typedef>
2566 <method-group name="public static functions">
2567 <method name="init" specifiers="static"><type>void</type><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an non-used list element, putting the next pointer to null: <computeroutput>NodeTraits::get_next(this_node) == node_ptr()</computeroutput></para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2568 <method name="unique" specifiers="static"><type>bool</type><parameter name="this_node"><paramtype>const_node_ptr</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: this_node must be in a circular list or be an empty circular list.</para><para><emphasis role="bold">Effects</emphasis>: Returns true is "this_node" is the only node of a circular list: or it's a not inserted node: <computeroutput>return node_ptr() == NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node</computeroutput></para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2569 <method name="inited" specifiers="static"><type>bool</type><parameter name="this_node"><paramtype>const_node_ptr</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns true is "this_node" has the same state as if it was inited using "init(node_ptr)"</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2570 <method name="unlink_after" specifiers="static"><type>void</type><parameter name="prev_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: prev_node must be in a circular list or be an empty circular list.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the next node of prev_node from the circular list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2571 <method name="unlink_after" specifiers="static"><type>void</type><parameter name="prev_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="last_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: prev_node and last_node must be in a circular list or be an empty circular list.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the range (prev_node, last_node) from the linear list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2572 <method name="link_after" specifiers="static"><type>void</type><parameter name="prev_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: prev_node must be a node of a linear list.</para><para><emphasis role="bold">Effects</emphasis>: Links this_node after prev_node in the linear list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2573 <method name="transfer_after" specifiers="static"><type>void</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="b"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="e"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: b and e must be nodes of the same linear list or an empty range. and p must be a node of a different linear list.</para><para><emphasis role="bold">Effects</emphasis>: Removes the nodes from (b, e] range from their linear list and inserts them after p in p's linear list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2574 <method name="init_header" specifiers="static"><type>void</type><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty list, making this_node the only node of the circular list: <computeroutput>NodeTraits::get_next(this_node) == this_node</computeroutput>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2575 <method name="get_previous_node" specifiers="static"><type>node_ptr</type><parameter name="prev_init_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: this_node and prev_init_node must be in the same linear list.</para><para><emphasis role="bold">Effects</emphasis>: Returns the previous node of this_node in the linear list starting. the search from prev_init_node. The first node checked for equality is NodeTraits::get_next(prev_init_node).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements between prev_init_node and this_node.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2576 <method name="count" specifiers="static"><type>std::size_t</type><parameter name="this_node"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: this_node must be in a linear list or be an empty linear list.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of nodes in a linear list. If the linear list is empty, returns 1.</para><para><emphasis role="bold">Complexity</emphasis>: Linear</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2577 <method name="swap_trailing_nodes" specifiers="static"><type>void</type><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="other_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: this_node and other_node must be nodes inserted in linear lists or be empty linear lists.</para><para><emphasis role="bold">Effects</emphasis>: Moves all the nodes previously chained after this_node after other_node and vice-versa.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2578 <method name="reverse" specifiers="static"><type>node_ptr</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Reverses the order of elements in the list.</para><para><emphasis role="bold">Returns</emphasis>: The new first node of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: This function is linear to the contained elements. </para></description></method>
2579 <method name="move_first_n_backwards" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="n"><paramtype>std::size_t</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Moves the first n nodes starting at p to the end of the list.</para><para><emphasis role="bold">Returns</emphasis>: A pair containing the new first and last node of the list or if there has been any movement, a null pair if n leads to no movement.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements plus the number moved positions. </para></description></method>
2580 <method name="move_first_n_forward" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><parameter name="p"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="n"><paramtype>std::size_t</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Moves the first n nodes starting at p to the beginning of the list.</para><para><emphasis role="bold">Returns</emphasis>: A pair containing the new first and last node of the list or if there has been any movement, a null pair if n leads to no movement.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements plus the number moved positions. </para></description></method>
2581 </method-group>
2582 </class>
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634 </namespace>
2635 </namespace>
2636 </header>
2637 <header name="boost/intrusive/link_mode.hpp">
2638 <namespace name="boost">
2639 <namespace name="intrusive">
2640 <enum name="link_mode_type"><enumvalue name="normal_link"><description><para>If this linking policy is specified in a <classname alt="boost::intrusive::value_traits">value_traits</classname> class as the <classname alt="boost::intrusive::link_mode">link_mode</classname>, containers configured with such <classname alt="boost::intrusive::value_traits">value_traits</classname> won't set the hooks of the erased values to a default state. Containers also won't check that the hooks of the new values are default initialized. </para></description></enumvalue><enumvalue name="safe_link"><description><para>If this linking policy is specified in a <classname alt="boost::intrusive::value_traits">value_traits</classname> class as the <classname alt="boost::intrusive::link_mode">link_mode</classname>, containers configured with such <classname alt="boost::intrusive::value_traits">value_traits</classname> will set the hooks of the erased values to a default state. Containers also will check that the hooks of the new values are default initialized. </para></description></enumvalue><enumvalue name="auto_unlink"><description><para>Same as "safe_link" but the user type is an auto-unlink type, so the containers with constant-time size features won't be compatible with <classname alt="boost::intrusive::value_traits">value_traits</classname> configured with this policy. Containers also know that the a value can be silently erased from the container without using any function provided by the containers. </para></description></enumvalue><description><para>This enumeration defines the type of <classname alt="boost::intrusive::value_traits">value_traits</classname> that can be defined for Boost.Intrusive containers </para></description></enum>
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693 </namespace>
2694 </namespace>
2695 </header>
2696 <header name="boost/intrusive/list.hpp">
2697 <namespace name="boost">
2698 <namespace name="intrusive">
2699 <class name="list"><template>
2700       <template-type-parameter name="T"/>
2701       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
2702     </template><description><para>The class template list is an intrusive container that mimics most of the interface of std::list as described in the C++ standard.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput> and <computeroutput>size_type&lt;&gt;</computeroutput>. </para></description><typedef name="value_traits"><type>ValueTraits</type></typedef>
2703 <typedef name="pointer"><type>value_traits::pointer</type></typedef>
2704 <typedef name="const_pointer"><type>value_traits::const_pointer</type></typedef>
2705 <typedef name="value_type"><type><classname>pointer_traits</classname>&lt; pointer &gt;::element_type</type></typedef>
2706 <typedef name="reference"><type><classname>pointer_traits</classname>&lt; pointer &gt;::reference</type></typedef>
2707 <typedef name="const_reference"><type><classname>pointer_traits</classname>&lt; const_pointer &gt;::reference</type></typedef>
2708 <typedef name="difference_type"><type><classname>pointer_traits</classname>&lt; pointer &gt;::difference_type</type></typedef>
2709 <typedef name="size_type"><type>SizeType</type></typedef>
2710 <typedef name="iterator"><type>list_iterator&lt; value_traits, false &gt;</type></typedef>
2711 <typedef name="const_iterator"><type>list_iterator&lt; value_traits, true &gt;</type></typedef>
2712 <typedef name="reverse_iterator"><type>boost::intrusive::reverse_iterator&lt; iterator &gt;</type></typedef>
2713 <typedef name="const_reverse_iterator"><type>boost::intrusive::reverse_iterator&lt; const_iterator &gt;</type></typedef>
2714 <typedef name="node_traits"><type>value_traits::node_traits</type></typedef>
2715 <typedef name="node"><type>node_traits::node</type></typedef>
2716 <typedef name="node_ptr"><type>node_traits::node_ptr</type></typedef>
2717 <typedef name="const_node_ptr"><type>node_traits::const_node_ptr</type></typedef>
2718 <typedef name="node_algorithms"><type><classname>circular_list_algorithms</classname>&lt; node_traits &gt;</type></typedef>
2719 <typedef name="header_holder_type"><type><emphasis>unspecified</emphasis></type></typedef>
2720 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
2721 <data-member name="stateful_value_traits" specifiers="static"><type>const bool</type></data-member>
2722 <data-member name="has_container_from_iterator" specifiers="static"><type>const bool</type></data-member>
2723 <method-group name="public member functions">
2724 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue.</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the back of the list. No copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
2725 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue.</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the front of the list. No copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
2726 <method name="pop_back"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases the last element of the list. No destructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased element. </para></description></method>
2727 <method name="pop_back_and_dispose"><type>void</type><template>
2728           <template-type-parameter name="Disposer"/>
2729         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the last element of the list. No destructors are called. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased element. </para></description></method>
2730 <method name="pop_front"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases the first element of the list. No destructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased element. </para></description></method>
2731 <method name="pop_front_and_dispose"><type>void</type><template>
2732           <template-type-parameter name="Disposer"/>
2733         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the first element of the list. No destructors are called. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased element. </para></description></method>
2734 <method name="front"><type>reference</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reference to the first element of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2735 <method name="front" cv="const"><type>const_reference</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reference to the first element of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2736 <method name="back"><type>reference</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reference to the last element of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2737 <method name="back" cv="const"><type>const_reference</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reference to the last element of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2738 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element contained in the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2739 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator to the first element contained in the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2740 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator to the first element contained in the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2741 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the end of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2742 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator to the end of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2743 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a constant iterator to the end of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2744 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2745 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2746 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2747 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2748 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2749 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2750 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of the elements contained in the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements contained in the list. if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
2751 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the list contains no elements.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
2752 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>list</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the elements of x and *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
2753 <method name="shift_backwards"><type>void</type><parameter name="n"><paramtype>size_type</paramtype><default>1</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Moves backwards all the elements, so that the first element becomes the second, the second becomes the third... the last element becomes the first one.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of shifts.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
2754 <method name="shift_forward"><type>void</type><parameter name="n"><paramtype>size_type</paramtype><default>1</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Moves forward all the elements, so that the second element becomes the first, the third becomes the second... the first element becomes the last one.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of shifts.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
2755 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed by i of the list. No destructors are called.</para><para><emphasis role="bold">Returns</emphasis>: the first element remaining beyond the removed element, or end() if no such element exists.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased element. </para></description></method>
2756 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: b and e must be valid iterators to elements in *this.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element range pointed by b and e No destructors are called.</para><para><emphasis role="bold">Returns</emphasis>: the first element remaining beyond the removed elements, or end() if no such element exists.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of erased elements if it's a safe-mode or auto-unlink value, or constant-time size is enabled. Constant-time otherwise.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. </para></description></method>
2757 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: b and e must be valid iterators to elements in *this. n must be distance(b, e).</para><para><emphasis role="bold">Effects</emphasis>: Erases the element range pointed by b and e No destructors are called.</para><para><emphasis role="bold">Returns</emphasis>: the first element remaining beyond the removed elements, or end() if no such element exists.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of erased elements if it's a safe-mode or auto-unlink value is enabled. Constant-time otherwise.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. </para></description></method>
2758 <method name="erase_and_dispose"><type>iterator</type><template>
2759           <template-type-parameter name="Disposer"/>
2760         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed by i of the list. No destructors are called. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Returns</emphasis>: the first element remaining beyond the removed element, or end() if no such element exists.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased element. </para></description></method>
2761 <method name="erase_and_dispose"><type>iterator</type><template>
2762           <template-type-parameter name="Disposer"/>
2763         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element range pointed by b and e No destructors are called. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: the first element remaining beyond the removed elements, or end() if no such element exists.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements erased.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
2764 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements of the container. No destructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements of the list. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. </para></description></method>
2765 <method name="clear_and_dispose"><type>void</type><template>
2766           <template-type-parameter name="Disposer"/>
2767         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements of the container. No destructors are called. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements of the list.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
2768 <method name="clone_from"><type>void</type><template>
2769           <template-type-parameter name="Cloner"/>
2770           <template-type-parameter name="Disposer"/>
2771         </template><parameter name="src"><paramtype>const <classname>list</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws. Basic guarantee. </para></description></method>
2772 <method name="clone_from"><type>void</type><template>
2773           <template-type-parameter name="Cloner"/>
2774           <template-type-parameter name="Disposer"/>
2775         </template><parameter name="src"><paramtype><classname>list</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws. Basic guarantee. </para></description></method>
2776 <method name="insert"><type>iterator</type><parameter name="p"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and p must be a valid iterator of *this.</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value before the position pointed by p.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the inserted element.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time. No copy constructors are called.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
2777 <method name="insert"><type>void</type><template>
2778           <template-type-parameter name="Iterator"/>
2779         </template><parameter name="p"><paramtype>const_iterator</paramtype></parameter><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type and p must be a valid iterator of *this.</para><para><emphasis role="bold">Effects</emphasis>: Inserts the range pointed by b and e before the position p. No copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements inserted.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
2780 <method name="assign"><type>void</type><template>
2781           <template-type-parameter name="Iterator"/>
2782         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Clears the list and inserts the range pointed by b and e. No destructors or copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements inserted plus linear to the elements contained in the list if it's a safe-mode or auto-unlink value. Linear to the number of elements inserted in the list otherwise.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. </para></description></method>
2783 <method name="dispose_and_assign"><type>void</type><template>
2784           <template-type-parameter name="Iterator"/>
2785           <template-type-parameter name="Disposer"/>
2786         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Clears the list and inserts the range pointed by b and e. No destructors or copy constructors are called. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements inserted plus linear to the elements contained in the list.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. </para></description></method>
2787 <method name="splice"><type>void</type><parameter name="p"><paramtype>const_iterator</paramtype></parameter><parameter name="x"><paramtype><classname>list</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: p must be a valid iterator of *this.</para><para><emphasis role="bold">Effects</emphasis>: Transfers all the elements of list x to this list, before the the element pointed by p. No destructors or copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Iterators of values obtained from list x now point to elements of this list. Iterators of this list and all the references are not invalidated. </para></description></method>
2788 <method name="splice"><type>void</type><parameter name="p"><paramtype>const_iterator</paramtype></parameter><parameter name="x"><paramtype><classname>list</classname> &amp;</paramtype></parameter><parameter name="new_ele"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: p must be a valid iterator of *this. new_ele must point to an element contained in list x.</para><para><emphasis role="bold">Effects</emphasis>: Transfers the value pointed by new_ele, from list x to this list, before the element pointed by p. No destructors or copy constructors are called. If p == new_ele or p == ++new_ele, this function is a null operation.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Iterators of values obtained from list x now point to elements of this list. Iterators of this list and all the references are not invalidated. </para></description></method>
2789 <method name="splice"><type>void</type><parameter name="p"><paramtype>const_iterator</paramtype></parameter><parameter name="x"><paramtype><classname>list</classname> &amp;</paramtype></parameter><parameter name="f"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: p must be a valid iterator of *this. f and e must point to elements contained in list x.</para><para><emphasis role="bold">Effects</emphasis>: Transfers the range pointed by f and e from list x to this list, before the element pointed by p. No destructors or copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements transferred if constant-time size option is enabled. Constant-time otherwise.</para><para><emphasis role="bold">Note</emphasis>: Iterators of values obtained from list x now point to elements of this list. Iterators of this list and all the references are not invalidated. </para></description></method>
2790 <method name="splice"><type>void</type><parameter name="p"><paramtype>const_iterator</paramtype></parameter><parameter name="x"><paramtype><classname>list</classname> &amp;</paramtype></parameter><parameter name="f"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: p must be a valid iterator of *this. f and e must point to elements contained in list x. n == distance(f, e)</para><para><emphasis role="bold">Effects</emphasis>: Transfers the range pointed by f and e from list x to this list, before the element pointed by p. No destructors or copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Iterators of values obtained from list x now point to elements of this list. Iterators of this list and all the references are not invalidated. </para></description></method>
2791 <method name="sort"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: This function sorts the list *this according to std::less&lt;value_type&gt;. The sort is stable, that is, the relative order of equivalent elements is preserved.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or std::less&lt;value_type&gt; throws. Basic guarantee.</para><para><emphasis role="bold">Notes</emphasis>: Iterators and references are not invalidated.</para><para><emphasis role="bold">Complexity</emphasis>: The number of comparisons is approximately N log N, where N is the list's size. </para></description></method>
2792 <method name="sort"><type>void</type><template>
2793           <template-type-parameter name="Predicate"/>
2794         </template><parameter name="p"><paramtype>Predicate</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: p must be a comparison function that induces a strict weak ordering</para><para><emphasis role="bold">Effects</emphasis>: This function sorts the list *this according to p. The sort is stable, that is, the relative order of equivalent elements is preserved.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the predicate throws. Basic guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This won't throw if list_base_hook&lt;&gt; or <classname alt="boost::intrusive::list_member_hook">list_member_hook</classname> are used. Iterators and references are not invalidated.</para><para><emphasis role="bold">Complexity</emphasis>: The number of comparisons is approximately N log N, where N is the list's size. </para></description></method>
2795 <method name="merge"><type>void</type><parameter name="x"><paramtype><classname>list</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: This function removes all of x's elements and inserts them in order into *this according to std::less&lt;value_type&gt;. The merge is stable; that is, if an element from *this is equivalent to one from x, then the element from *this will precede the one from x.</para><para><emphasis role="bold">Throws</emphasis>: If std::less&lt;value_type&gt; throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: This function is linear time: it performs at most size() + x.size() - 1 comparisons.</para><para><emphasis role="bold">Note</emphasis>: Iterators and references are not invalidated </para></description></method>
2796 <method name="merge"><type>void</type><template>
2797           <template-type-parameter name="Predicate"/>
2798         </template><parameter name="x"><paramtype><classname>list</classname> &amp;</paramtype></parameter><parameter name="p"><paramtype>Predicate</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: p must be a comparison function that induces a strict weak ordering and both *this and x must be sorted according to that ordering The lists x and *this must be distinct.</para><para><emphasis role="bold">Effects</emphasis>: This function removes all of x's elements and inserts them in order into *this. The merge is stable; that is, if an element from *this is equivalent to one from x, then the element from *this will precede the one from x.</para><para><emphasis role="bold">Throws</emphasis>: If the predicate throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: This function is linear time: it performs at most size() + x.size() - 1 comparisons.</para><para><emphasis role="bold">Note</emphasis>: Iterators and references are not invalidated. </para></description></method>
2799 <method name="reverse"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Reverses the order of elements in the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: This function is linear time.</para><para><emphasis role="bold">Note</emphasis>: Iterators and references are not invalidated </para></description></method>
2800 <method name="remove"><type>void</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Removes all the elements that compare equal to value. No destructors are called.</para><para><emphasis role="bold">Throws</emphasis>: If std::equal_to&lt;value_type&gt; throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time. It performs exactly size() comparisons for equality.</para><para><emphasis role="bold">Note</emphasis>: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. </para></description></method>
2801 <method name="remove_and_dispose"><type>void</type><template>
2802           <template-type-parameter name="Disposer"/>
2803         </template><parameter name="value"><paramtype>const_reference</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Removes all the elements that compare equal to value. Disposer::operator()(pointer) is called for every removed element.</para><para><emphasis role="bold">Throws</emphasis>: If std::equal_to&lt;value_type&gt; throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time. It performs exactly size() comparisons for equality.</para><para><emphasis role="bold">Note</emphasis>: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. </para></description></method>
2804 <method name="remove_if"><type>void</type><template>
2805           <template-type-parameter name="Pred"/>
2806         </template><parameter name="pred"><paramtype>Pred</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Removes all the elements for which a specified predicate is satisfied. No destructors are called.</para><para><emphasis role="bold">Throws</emphasis>: If pred throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time. It performs exactly size() calls to the predicate.</para><para><emphasis role="bold">Note</emphasis>: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. </para></description></method>
2807 <method name="remove_and_dispose_if"><type>void</type><template>
2808           <template-type-parameter name="Pred"/>
2809           <template-type-parameter name="Disposer"/>
2810         </template><parameter name="pred"><paramtype>Pred</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Removes all the elements for which a specified predicate is satisfied. Disposer::operator()(pointer) is called for every removed element.</para><para><emphasis role="bold">Throws</emphasis>: If pred throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time. It performs exactly size() comparisons for equality.</para><para><emphasis role="bold">Note</emphasis>: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. </para></description></method>
2811 <method name="unique"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Removes adjacent duplicate elements or adjacent elements that are equal from the list. No destructors are called.</para><para><emphasis role="bold">Throws</emphasis>: If std::equal_to&lt;value_type throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time (size()-1 comparisons calls to pred()).</para><para><emphasis role="bold">Note</emphasis>: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. </para></description></method>
2812 <method name="unique"><type>void</type><template>
2813           <template-type-parameter name="BinaryPredicate"/>
2814         </template><parameter name="pred"><paramtype>BinaryPredicate</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Removes adjacent duplicate elements or adjacent elements that satisfy some binary predicate from the list. No destructors are called.</para><para><emphasis role="bold">Throws</emphasis>: If pred throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time (size()-1 comparisons equality comparisons).</para><para><emphasis role="bold">Note</emphasis>: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. </para></description></method>
2815 <method name="unique_and_dispose"><type>void</type><template>
2816           <template-type-parameter name="Disposer"/>
2817         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Removes adjacent duplicate elements or adjacent elements that are equal from the list. Disposer::operator()(pointer) is called for every removed element.</para><para><emphasis role="bold">Throws</emphasis>: If std::equal_to&lt;value_type throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time (size()-1) comparisons equality comparisons.</para><para><emphasis role="bold">Note</emphasis>: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. </para></description></method>
2818 <method name="unique_and_dispose"><type>void</type><template>
2819           <template-type-parameter name="BinaryPredicate"/>
2820           <template-type-parameter name="Disposer"/>
2821         </template><parameter name="pred"><paramtype>BinaryPredicate</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Removes adjacent duplicate elements or adjacent elements that satisfy some binary predicate from the list. Disposer::operator()(pointer) is called for every removed element.</para><para><emphasis role="bold">Throws</emphasis>: If pred throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time (size()-1) comparisons equality comparisons.</para><para><emphasis role="bold">Note</emphasis>: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. </para></description></method>
2822 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be a reference to a value inserted in a list.</para><para><emphasis role="bold">Effects</emphasis>: This function returns a const_iterator pointing to the element</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: Iterators and references are not invalidated. </para></description></method>
2823 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be a const reference to a value inserted in a list.</para><para><emphasis role="bold">Effects</emphasis>: This function returns an iterator pointing to the element.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: Iterators and references are not invalidated. </para></description></method>
2824 <method name="check" cv="const"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Asserts the integrity of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time.</para><para><emphasis role="bold">Note</emphasis>: The method has no effect when asserts are turned off (e.g., with NDEBUG). Experimental function, interface might change in future versions. </para></description></method>
2825 </method-group>
2826 <constructor><description><para><emphasis role="bold">Effects</emphasis>: constructs an empty list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks). </para></description></constructor>
2827 <constructor specifiers="explicit"><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: constructs an empty list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks). </para></description></constructor>
2828 <constructor><template>
2829           <template-type-parameter name="Iterator"/>
2830         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Constructs a list equal to the range [first,last).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in distance(b, e). No copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks). </para></description></constructor>
2831 <constructor><parameter name="x"><paramtype><classname>list</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
2832 <copy-assignment><type><classname>list</classname> &amp;</type><parameter name="x"><paramtype><classname>list</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
2833 <destructor><description><para><emphasis role="bold">Effects</emphasis>: If it's not a safe-mode or an auto-unlink value_type the destructor does nothing (ie. no code is generated). Otherwise it detaches all elements from this. In this case the objects in the list are not deleted (i.e. no destructors are called), but the hooks according to the ValueTraits template parameter are set to their default value.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements in the list, if it's a safe-mode or auto-unlink value . Otherwise constant. </para></description></destructor>
2834 <method-group name="public static functions">
2835 <method name="container_from_end_iterator" specifiers="static"><type><classname>list</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of list.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the list associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2836 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>list</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end const_iterator of list.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the list associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
2837 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be a reference to a value inserted in a list.</para><para><emphasis role="bold">Effects</emphasis>: This function returns a const_iterator pointing to the element</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: Iterators and references are not invalidated. This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
2838 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be a const reference to a value inserted in a list.</para><para><emphasis role="bold">Effects</emphasis>: This function returns an iterator pointing to the element.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: Iterators and references are not invalidated. This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
2839 </method-group>
2840 </class><struct name="make_list"><template>
2841       <template-type-parameter name="T"/>
2842       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
2843     </template><description><para>Helper metafunction to define a <computeroutput>list</computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
2844 </struct>
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896 </namespace>
2897 </namespace>
2898 </header>
2899 <header name="boost/intrusive/list_hook.hpp">
2900 <namespace name="boost">
2901 <namespace name="intrusive">
2902 <struct name="make_list_base_hook"><template>
2903       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
2904     </template><description><para>Helper metafunction to define a <computeroutput><computeroutput><classname alt="boost::intrusive::list_base_hook">list_base_hook</classname></computeroutput> that</computeroutput> yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
2905 </struct><class name="list_base_hook"><template>
2906       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
2907     </template><inherit access="public">make_list_base_hook::type&lt; O1, O2, O3 &gt;</inherit><description><para>Derive a class from this hook in order to store objects of that class in an list.</para><para>The hook admits the following options: <computeroutput>tag&lt;&gt;</computeroutput>, <computeroutput>void_pointer&lt;&gt;</computeroutput> and <computeroutput>link_mode&lt;&gt;</computeroutput>.</para><para><computeroutput>tag&lt;&gt;</computeroutput> defines a tag to identify the node. The same tag value can be used in different classes, but if a class is derived from more than one <computeroutput><classname alt="boost::intrusive::list_base_hook">list_base_hook</classname></computeroutput>, then each <computeroutput><classname alt="boost::intrusive::list_base_hook">list_base_hook</classname></computeroutput> needs its unique tag.</para><para><computeroutput>link_mode&lt;&gt;</computeroutput> will specify the linking mode of the hook (<computeroutput>normal_link</computeroutput>, <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput>).</para><para><computeroutput>void_pointer&lt;&gt;</computeroutput> is the pointer type that will be used internally in the hook and the container configured to use this hook. </para></description><method-group name="public member functions">
2908 <method name="swap_nodes"><type>void</type><parameter name="other"><paramtype><classname>list_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swapping two nodes swaps the position of the elements related to those nodes in one or two containers. That is, if the node this is part of the element e1, the node x is part of the element e2 and both elements are included in the containers s1 and s2, then after the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 at the position of e1. If one element is not in a container, then after the swap-operation the other element is not in a container. Iterators to e1 and e2 related to those nodes are invalidated.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2909 <method name="is_linked" cv="const"><type>bool</type><description><para><emphasis role="bold">Precondition</emphasis>: <classname alt="boost::intrusive::link_mode">link_mode</classname> must be <computeroutput>safe_link</computeroutput> or <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: true, if the node belongs to a container, false otherwise. This function can be used to test whether <computeroutput>list::iterator_to</computeroutput> will return a valid iterator.</para><para><emphasis role="bold">Complexity</emphasis>: Constant </para></description></method>
2910 <method name="unlink"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Removes the node if it's inserted in a container. This function is only allowed if <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2911 </method-group>
2912 <constructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></constructor>
2913 <constructor><parameter name=""><paramtype>const <classname>list_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing a copy-constructor makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></constructor>
2914 <copy-assignment><type><classname>list_base_hook</classname> &amp;</type><parameter name=""><paramtype>const <classname>list_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Empty function. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing an assignment operator makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></copy-assignment>
2915 <destructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>normal_link</computeroutput>, the destructor does nothing (ie. no code is generated). If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>safe_link</computeroutput> and the object is stored in an list an assertion is raised. If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> and <computeroutput>is_linked()</computeroutput> is true, the node is unlinked.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
2916 </class><struct name="make_list_member_hook"><template>
2917       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
2918     </template><description><para>Helper metafunction to define a <computeroutput><computeroutput><classname alt="boost::intrusive::list_member_hook">list_member_hook</classname></computeroutput> that</computeroutput> yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
2919 </struct><class name="list_member_hook"><template>
2920       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
2921     </template><inherit access="public">make_list_member_hook::type&lt; O1, O2, O3 &gt;</inherit><description><para>Store this hook in a class to be inserted in an list.</para><para>The hook admits the following options: <computeroutput>void_pointer&lt;&gt;</computeroutput> and <computeroutput>link_mode&lt;&gt;</computeroutput>.</para><para><computeroutput>link_mode&lt;&gt;</computeroutput> will specify the linking mode of the hook (<computeroutput>normal_link</computeroutput>, <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput>).</para><para><computeroutput>void_pointer&lt;&gt;</computeroutput> is the pointer type that will be used internally in the hook and the container configured to use this hook. </para></description><method-group name="public member functions">
2922 <method name="swap_nodes"><type>void</type><parameter name="other"><paramtype><classname>list_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swapping two nodes swaps the position of the elements related to those nodes in one or two containers. That is, if the node this is part of the element e1, the node x is part of the element e2 and both elements are included in the containers s1 and s2, then after the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 at the position of e1. If one element is not in a container, then after the swap-operation the other element is not in a container. Iterators to e1 and e2 related to those nodes are invalidated.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2923 <method name="is_linked" cv="const"><type>bool</type><description><para><emphasis role="bold">Precondition</emphasis>: <classname alt="boost::intrusive::link_mode">link_mode</classname> must be <computeroutput>safe_link</computeroutput> or <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: true, if the node belongs to a container, false otherwise. This function can be used to test whether <computeroutput>list::iterator_to</computeroutput> will return a valid iterator.</para><para><emphasis role="bold">Complexity</emphasis>: Constant </para></description></method>
2924 <method name="unlink"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Removes the node if it's inserted in a container. This function is only allowed if <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
2925 </method-group>
2926 <constructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></constructor>
2927 <constructor><parameter name=""><paramtype>const <classname>list_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing a copy-constructor makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></constructor>
2928 <copy-assignment><type><classname>list_member_hook</classname> &amp;</type><parameter name=""><paramtype>const <classname>list_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Empty function. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing an assignment operator makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></copy-assignment>
2929 <destructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>normal_link</computeroutput>, the destructor does nothing (ie. no code is generated). If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>safe_link</computeroutput> and the object is stored in an list an assertion is raised. If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> and <computeroutput>is_linked()</computeroutput> is true, the node is unlinked.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
2930 </class>
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982 </namespace>
2983 </namespace>
2984 </header>
2985 <header name="boost/intrusive/member_value_traits.hpp">
2986 <namespace name="boost">
2987 <namespace name="intrusive">
2988 <struct name="member_value_traits"><template>
2989       <template-type-parameter name="T"/>
2990       <template-type-parameter name="NodeTraits"/>
2991       <template-nontype-parameter name="PtrToMember"><type>typename NodeTraits::node T::*</type></template-nontype-parameter>
2992       <template-nontype-parameter name="LinkMode"><type>link_mode_type</type><default>safe_link</default></template-nontype-parameter>
2993     </template><description><para>This value traits template is used to create value traits from user defined node traits where value_traits::value_type will store a node_traits::node </para></description><typedef name="node_traits"><type>NodeTraits</type></typedef>
2994 <typedef name="value_type"><type>T</type></typedef>
2995 <typedef name="node"><type>node_traits::node</type></typedef>
2996 <typedef name="node_ptr"><type>node_traits::node_ptr</type></typedef>
2997 <typedef name="const_node_ptr"><type>node_traits::const_node_ptr</type></typedef>
2998 <typedef name="node_ptr_traits"><type><classname>pointer_traits</classname>&lt; node_ptr &gt;</type></typedef>
2999 <typedef name="pointer"><type><classname>pointer_traits</classname>&lt; node_ptr &gt;::template rebind_pointer&lt; T &gt;::type</type></typedef>
3000 <typedef name="const_pointer"><type><classname>pointer_traits</classname>&lt; node_ptr &gt;::template rebind_pointer&lt; const T &gt;::type</type></typedef>
3001 <typedef name="reference"><type>value_type &amp;</type></typedef>
3002 <typedef name="const_reference"><type>const value_type &amp;</type></typedef>
3003 <data-member name="link_mode" specifiers="static"><type>const link_mode_type</type></data-member>
3004 <method-group name="public static functions">
3005 <method name="to_node_ptr" specifiers="static"><type>node_ptr</type><parameter name="value"><paramtype>reference</paramtype></parameter></method>
3006 <method name="to_node_ptr" specifiers="static"><type>const_node_ptr</type><parameter name="value"><paramtype>const_reference</paramtype></parameter></method>
3007 <method name="to_value_ptr" specifiers="static"><type>pointer</type><parameter name="n"><paramtype>const node_ptr &amp;</paramtype></parameter></method>
3008 <method name="to_value_ptr" specifiers="static"><type>const_pointer</type><parameter name="n"><paramtype>const const_node_ptr &amp;</paramtype></parameter></method>
3009 </method-group>
3010 </struct>
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062 </namespace>
3063 </namespace>
3064 </header>
3065 <header name="boost/intrusive/options.hpp">
3066 <namespace name="boost">
3067 <namespace name="intrusive">
3068 <struct name="constant_time_size"><template>
3069       <template-nontype-parameter name="Enabled"><type>bool</type></template-nontype-parameter>
3070     </template><description><para>This option setter specifies if the intrusive container stores its size as a member to obtain constant-time size() member. </para></description></struct><struct name="header_holder_type"><template>
3071       <template-type-parameter name="HeaderHolder"/>
3072     </template><purpose>This option setter specifies a container header holder type. </purpose></struct><struct name="size_type"><template>
3073       <template-type-parameter name="SizeType"/>
3074     </template><description><para>This option setter specifies the type that the container will use to store its size. </para></description></struct><struct name="compare"><template>
3075       <template-type-parameter name="Compare"/>
3076     </template><description><para>This option setter specifies the strict weak ordering comparison functor for the value type </para></description></struct><struct name="key_of_value"><template>
3077       <template-type-parameter name="KeyOfValue"/>
3078     </template><description><para>This option setter specifies a function object that specifies the type of the key of an associative container and an operator to obtain it from a value type.</para><para>This function object must the define a <computeroutput>type</computeroutput> member typedef and a member with signature <computeroutput>type [const&amp;] operator()(const value_type &amp;) const</computeroutput> that will return the key from a value_type of an associative container </para></description></struct><struct name="floating_point"><template>
3079       <template-nontype-parameter name="Enabled"><type>bool</type></template-nontype-parameter>
3080     </template><description><para>This option setter for scapegoat containers specifies if the intrusive scapegoat container should use a non-variable alpha value that does not need floating-point operations.</para><para>If activated, the fixed alpha value is 1/sqrt(2). This option also saves some space in the container since the alpha value and some additional data does not need to be stored in the container.</para><para>If the user only needs an alpha value near 1/sqrt(2), this option also improves performance since avoids logarithm and division operations when rebalancing the tree. </para></description></struct><struct name="equal"><template>
3081       <template-type-parameter name="Equal"/>
3082     </template><description><para>This option setter specifies the equality functor for the value type </para></description></struct><struct name="priority"><template>
3083       <template-type-parameter name="Priority"/>
3084     </template><description><para>This option setter specifies the priority comparison functor for the value type </para></description></struct><struct name="hash"><template>
3085       <template-type-parameter name="Hash"/>
3086     </template><description><para>This option setter specifies the hash functor for the value type </para></description></struct><struct name="value_traits"><template>
3087       <template-type-parameter name="ValueTraits"/>
3088     </template><description><para>This option setter specifies the relationship between the type to be managed by the container (the value type) and the node to be used in the node algorithms. It also specifies the linking policy. </para></description></struct><struct name="member_hook"><template>
3089       <template-type-parameter name="Parent"/>
3090       <template-type-parameter name="MemberHook"/>
3091       <template-nontype-parameter name="PtrToMember"><type>MemberHook Parent::*</type></template-nontype-parameter>
3092     </template><description><para>This option setter specifies the member hook the container must use. </para></description></struct><struct name="function_hook"><template>
3093       <template-type-parameter name="Functor"/>
3094     </template><description><para>This option setter specifies the function object that will be used to convert between values to be inserted in a container and the hook to be used for that purpose. </para></description></struct><struct name="base_hook"><template>
3095       <template-type-parameter name="BaseHook"/>
3096     </template><description><para>This option setter specifies that the container must use the specified base hook </para></description></struct><struct name="void_pointer"><template>
3097       <template-type-parameter name="VoidPointer"/>
3098     </template><description><para>This option setter specifies the type of a void pointer. This will instruct the hook to use this type of pointer instead of the default one </para></description></struct><struct name="tag"><template>
3099       <template-type-parameter name="Tag"/>
3100     </template><description><para>This option setter specifies the type of the tag of a base hook. A type cannot have two base hooks of the same type, so a tag can be used to differentiate two base hooks with otherwise same type </para></description></struct><struct name="link_mode"><template>
3101       <template-nontype-parameter name="LinkType"><type>link_mode_type</type></template-nontype-parameter>
3102     </template><description><para>This option setter specifies the link mode (normal_link, safe_link or auto_unlink) </para></description></struct><struct name="optimize_size"><template>
3103       <template-nontype-parameter name="Enabled"><type>bool</type></template-nontype-parameter>
3104     </template><description><para>This option setter specifies if the hook should be optimized for size instead of for speed. </para></description></struct><struct name="linear"><template>
3105       <template-nontype-parameter name="Enabled"><type>bool</type></template-nontype-parameter>
3106     </template><description><para>This option setter specifies if the slist container should use a linear implementation instead of a circular one. </para></description></struct><struct name="cache_last"><template>
3107       <template-nontype-parameter name="Enabled"><type>bool</type></template-nontype-parameter>
3108     </template><description><para>If true, slist also stores a pointer to the last element of the singly linked list. This allows O(1) swap and splice_after(iterator, slist &amp;) for circular slists and makes possible new functions like push_back(reference) and back(). </para></description></struct><struct name="bucket_traits"><template>
3109       <template-type-parameter name="BucketTraits"/>
3110     </template><description><para>This option setter specifies the bucket traits class for unordered associative containers. When this option is specified, instead of using the default bucket traits, a user defined holder will be defined </para></description></struct><struct name="store_hash"><template>
3111       <template-nontype-parameter name="Enabled"><type>bool</type></template-nontype-parameter>
3112     </template><description><para>This option setter specifies if the unordered hook should offer room to store the hash value. Storing the hash in the hook will speed up rehashing processes in applications where rehashing is frequent, rehashing might throw or the value is heavy to hash. </para></description></struct><struct name="optimize_multikey"><template>
3113       <template-nontype-parameter name="Enabled"><type>bool</type></template-nontype-parameter>
3114     </template><description><para>This option setter specifies if the unordered hook should offer room to store another link to another node with the same key. Storing this link will speed up lookups and insertions on <classname alt="boost::intrusive::unordered_multiset">unordered_multiset</classname> containers with a great number of elements with the same key. </para></description></struct><struct name="power_2_buckets"><template>
3115       <template-nontype-parameter name="Enabled"><type>bool</type></template-nontype-parameter>
3116     </template><description><para>This option setter specifies if the bucket array will be always power of two. This allows using masks instead of the default modulo operation to determine the bucket number from the hash value, leading to better performance. In debug mode, if power of two buckets mode is activated, the bucket length will be checked with assertions. </para></description></struct><struct name="cache_begin"><template>
3117       <template-nontype-parameter name="Enabled"><type>bool</type></template-nontype-parameter>
3118     </template><description><para>This option setter specifies if the container will cache a pointer to the first non-empty bucket so that begin() is always constant-time. This is specially helpful when we can have containers with a few elements but with big bucket arrays (that is, hashtables with low load factors). </para></description></struct><struct name="compare_hash"><template>
3119       <template-nontype-parameter name="Enabled"><type>bool</type></template-nontype-parameter>
3120     </template><description><para>This option setter specifies if the container will compare the hash value before comparing objects. This option can't be specified if store_hash&lt;&gt; is not true. This is specially helpful when we have containers with a high load factor. and the comparison function is much more expensive that comparing already stored hash values. </para></description></struct><struct name="incremental"><template>
3121       <template-nontype-parameter name="Enabled"><type>bool</type></template-nontype-parameter>
3122     </template><description><para>This option setter specifies if the hash container will use incremental hashing. With incremental hashing the cost of hash table expansion is spread out across each hash table insertion operation, as opposed to be incurred all at once. Therefore linear hashing is well suited for interactive applications or real-time appplications where the worst-case insertion time of non-incremental hash containers (rehashing the whole bucket array) is not admisible. </para></description></struct>
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174 </namespace>
3175 </namespace>
3176 </header>
3177 <header name="boost/intrusive/pack_options.hpp">
3178 <namespace name="boost">
3179 <namespace name="intrusive">
3180 <struct name="pack_options"><template>
3181       <template-type-parameter name="DefaultOptions"/>
3182       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
3183     </template><description><para>This class is a utility that takes:<itemizedlist>
3184 <listitem><para>a default options class defining initial static constant and typedefs</para></listitem><listitem><para>several options defined with BOOST_INTRUSIVE_OPTION_CONSTANT and BOOST_INTRUSIVE_OPTION_TYPE</para></listitem></itemizedlist>
3185 </para><para>and packs them together in a new type that defines all options as member typedefs or static constant values. Given options of form:</para><para><programlisting language="c++">BOOST_INTRUSIVE_OPTION_TYPE(my_pointer, VoidPointer, VoidPointer, my_pointer_type)
3186 BOOST_INTRUSIVE_OPTION_CONSTANT(incremental, bool, Enabled, is_incremental)
3187 </programlisting></para><para>the following expression</para><para><programlisting language="c++">struct default_options
3188 {
3189   typedef long      int_type;
3190   static const int  int_constant = -1;
3191 };
3192
3193 pack_options&lt; default_options, my_pointer&lt;void*&gt;, incremental&lt;true&gt; &gt;::type
3194 </programlisting></para><para>will create a type that will contain the following typedefs/constants</para><para><programlisting language="c++">struct unspecified_type
3195 {
3196    //Default options
3197    typedef long      int_type;
3198    static const int  int_constant  = -1;
3199
3200    //Packed options (will ovewrite any default option)
3201    typedef void*     my_pointer_type;
3202    static const bool is_incremental = true;
3203 };
3204 </programlisting></para><para>If an option is specified in the default options argument and later redefined as an option, the last definition will prevail. </para></description><typedef name="type"><type>unspecified_type</type></typedef>
3205 </struct>
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257 </namespace>
3258 </namespace>
3259 <macro name="BOOST_INTRUSIVE_OPTION_TYPE" kind="functionlike"><macro-parameter name="OPTION_NAME"/><macro-parameter name="TYPE"/><macro-parameter name="TYPEDEF_EXPR"/><macro-parameter name="TYPEDEF_NAME"/><description><para>Defines an option class of name OPTION_NAME that can be used to specify a type of type TYPE...</para><para><programlisting language="c++">struct OPTION_NAME&lt;class TYPE&gt;
3260 {  unspecified_content  };
3261 </programlisting></para><para>...that after being combined with <computeroutput><classname alt="boost::intrusive::pack_options">boost::intrusive::pack_options</classname></computeroutput>, will typedef TYPE as a typedef of name TYPEDEF_NAME. Example:</para><para><programlisting language="c++">//[includes and namespaces omitted for brevity]
3262
3263 //This macro will create the following class:
3264 //    template&lt;class VoidPointer&gt;
3265 //    struct my_pointer
3266 //    { unspecified_content };
3267 BOOST_INTRUSIVE_OPTION_TYPE(my_pointer, VoidPointer, boost::remove_pointer&lt;VoidPointer&gt;::type, my_pointer_type)
3268
3269 struct empty_default{};
3270
3271 typedef pack_options&lt; empty_default, typename my_pointer&lt;void*&gt; &gt;::type::my_pointer_type type;
3272
3273 BOOST_STATIC_ASSERT(( boost::is_same&lt;type, void&gt;::value ));
3274 </programlisting> </para></description></macro>
3275 <macro name="BOOST_INTRUSIVE_OPTION_CONSTANT" kind="functionlike"><macro-parameter name="OPTION_NAME"/><macro-parameter name="TYPE"/><macro-parameter name="VALUE"/><macro-parameter name="CONSTANT_NAME"/><description><para>Defines an option class of name OPTION_NAME that can be used to specify a constant of type TYPE with value VALUE...</para><para><programlisting language="c++">struct OPTION_NAME&lt;TYPE VALUE&gt;
3276 {  unspecified_content  };
3277 </programlisting></para><para>...that after being combined with <computeroutput><classname alt="boost::intrusive::pack_options">boost::intrusive::pack_options</classname></computeroutput>, will contain a CONSTANT_NAME static constant of value VALUE. Example:</para><para><programlisting language="c++">//[includes and namespaces omitted for brevity]
3278
3279 //This macro will create the following class:
3280 //    template&lt;bool Enabled&gt;
3281 //    struct incremental
3282 //    { unspecified_content };
3283 BOOST_INTRUSIVE_OPTION_CONSTANT(incremental, bool, Enabled, is_incremental)
3284
3285 struct empty_default{};
3286
3287 const bool is_incremental = pack_options&lt; empty_default, incremental&lt;true&gt; &gt;::type::is_incremental;
3288
3289 BOOST_STATIC_ASSERT(( is_incremental == true ));
3290 </programlisting> </para></description></macro>
3291 </header>
3292 <header name="boost/intrusive/parent_from_member.hpp">
3293 <namespace name="boost">
3294 <namespace name="intrusive">
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315 <function name="get_parent_from_member"><type>Parent *</type><template>
3316           <template-type-parameter name="Parent"/>
3317           <template-type-parameter name="Member"/>
3318         </template><parameter name="member"><paramtype>Member *</paramtype></parameter><parameter name="ptr_to_member"><paramtype>const Member Parent::*</paramtype></parameter><description><para>Given a pointer to a member and its corresponding pointer to data member, this function returns the pointer of the parent containing that member. Note: this function does not work with pointer to members that rely on virtual inheritance. </para></description></function>
3319 <function name="get_parent_from_member"><type>const Parent *</type><template>
3320           <template-type-parameter name="Parent"/>
3321           <template-type-parameter name="Member"/>
3322         </template><parameter name="member"><paramtype>const Member *</paramtype></parameter><parameter name="ptr_to_member"><paramtype>const Member Parent::*</paramtype></parameter><description><para>Given a const pointer to a member and its corresponding const pointer to data member, this function returns the const pointer of the parent containing that member. Note: this function does not work with pointer to members that rely on virtual inheritance. </para></description></function>
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353 </namespace>
3354 </namespace>
3355 </header>
3356 <header name="boost/intrusive/pointer_plus_bits.hpp">
3357 <namespace name="boost">
3358 <namespace name="intrusive">
3359 <struct name="max_pointer_plus_bits"><template>
3360       <template-type-parameter name="VoidPointer"/>
3361       <template-nontype-parameter name="Alignment"><type>std::size_t</type></template-nontype-parameter>
3362     </template><description><para>This trait class is used to know if a pointer can embed extra bits of information if it's going to be used to point to objects with an alignment of "Alignment" bytes. </para></description><data-member name="value" specifiers="static"><type>const std::size_t</type></data-member>
3363 </struct><struct-specialization name="max_pointer_plus_bits"><template>
3364       <template-nontype-parameter name="Alignment"><type>std::size_t</type></template-nontype-parameter>
3365     </template><specialization><template-arg>void *</template-arg><template-arg>Alignment</template-arg></specialization><description><para>This is a specialization for raw pointers. Raw pointers can embed extra bits in the lower bits if the alignment is multiple of 2pow(NumBits). </para></description><data-member name="value" specifiers="static"><type>const std::size_t</type></data-member>
3366 </struct-specialization><struct name="pointer_plus_bits"><template>
3367       <template-type-parameter name="Pointer"/>
3368       <template-nontype-parameter name="NumBits"><type>std::size_t</type></template-nontype-parameter>
3369     </template><description><para>This is class that is supposed to have static methods to embed extra bits of information in a pointer. This is a declaration and there is no default implementation, because operations to embed the bits change with every pointer type.</para><para>An implementation that detects that a pointer type whose has_pointer_plus_bits&lt;&gt;::value is non-zero can make use of these operations to embed the bits in the pointer. </para></description></struct><struct-specialization name="pointer_plus_bits"><template>
3370       <template-type-parameter name="T"/>
3371       <template-nontype-parameter name="NumBits"><type>std::size_t</type></template-nontype-parameter>
3372     </template><specialization><template-arg>T *</template-arg><template-arg>NumBits</template-arg></specialization><description><para>This is the specialization to embed extra bits of information in a raw pointer. The extra bits are stored in the lower bits of the pointer. </para></description><typedef name="pointer"><type>T *</type></typedef>
3373 <data-member name="Mask" specifiers="static"><type>const uintptr_t</type></data-member>
3374 <method-group name="public static functions">
3375 <method name="get_pointer" specifiers="static"><type>pointer</type><parameter name="n"><paramtype>pointer</paramtype></parameter></method>
3376 <method name="set_pointer" specifiers="static"><type>void</type><parameter name="n"><paramtype>pointer &amp;</paramtype></parameter><parameter name="p"><paramtype>pointer</paramtype></parameter></method>
3377 <method name="get_bits" specifiers="static"><type>std::size_t</type><parameter name="n"><paramtype>pointer</paramtype></parameter></method>
3378 <method name="set_bits" specifiers="static"><type>void</type><parameter name="n"><paramtype>pointer &amp;</paramtype></parameter><parameter name="c"><paramtype>std::size_t</paramtype></parameter></method>
3379 </method-group>
3380 </struct-specialization>
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432 </namespace>
3433 </namespace>
3434 </header>
3435 <header name="boost/intrusive/pointer_rebind.hpp">
3436 <namespace name="boost">
3437 <namespace name="intrusive">
3438 <struct name="pointer_has_rebind"><template>
3439       <template-type-parameter name="Ptr"/>
3440       <template-type-parameter name="U"/>
3441     </template><struct name="any"><template>
3442       <template-type-parameter name="V"/>
3443     </template><method-group name="public member functions">
3444 </method-group>
3445 <constructor><parameter name=""><paramtype>const V &amp;</paramtype></parameter></constructor>
3446 </struct><data-member name="value" specifiers="static"><type>const bool</type></data-member>
3447 <method-group name="public static functions">
3448 <method name="test" specifiers="static"><type>char</type><template>
3449           <template-type-parameter name="X"/>
3450         </template><parameter name=""><paramtype>int</paramtype></parameter><parameter name=""><paramtype>typename X::template rebind&lt; U &gt; *</paramtype></parameter></method>
3451 <method name="test" specifiers="static"><type>int</type><template>
3452           <template-type-parameter name="X"/>
3453         </template><parameter name=""><paramtype>any&lt; int &gt;</paramtype></parameter><parameter name=""><paramtype>void *</paramtype></parameter></method>
3454 </method-group>
3455 </struct><struct name="pointer_has_rebind_other"><template>
3456       <template-type-parameter name="Ptr"/>
3457       <template-type-parameter name="U"/>
3458     </template><struct name="any"><template>
3459       <template-type-parameter name="V"/>
3460     </template><method-group name="public member functions">
3461 </method-group>
3462 <constructor><parameter name=""><paramtype>const V &amp;</paramtype></parameter></constructor>
3463 </struct><data-member name="value" specifiers="static"><type>const bool</type></data-member>
3464 <method-group name="public static functions">
3465 <method name="test" specifiers="static"><type>char</type><template>
3466           <template-type-parameter name="X"/>
3467         </template><parameter name=""><paramtype>int</paramtype></parameter><parameter name=""><paramtype>typename X::template rebind&lt; U &gt;::other *</paramtype></parameter></method>
3468 <method name="test" specifiers="static"><type>int</type><template>
3469           <template-type-parameter name="X"/>
3470         </template><parameter name=""><paramtype>any&lt; int &gt;</paramtype></parameter><parameter name=""><paramtype>void *</paramtype></parameter></method>
3471 </method-group>
3472 </struct><struct name="pointer_rebind_mode"><template>
3473       <template-type-parameter name="Ptr"/>
3474       <template-type-parameter name="U"/>
3475     </template><data-member name="rebind" specifiers="static"><type>const unsigned int</type></data-member>
3476 <data-member name="rebind_other" specifiers="static"><type>const unsigned int</type></data-member>
3477 <data-member name="mode" specifiers="static"><type>const unsigned int</type></data-member>
3478 </struct><struct name="pointer_rebinder"><template>
3479       <template-type-parameter name="Ptr"/>
3480       <template-type-parameter name="U"/>
3481       <template-nontype-parameter name="RebindMode"><type>unsigned int</type></template-nontype-parameter>
3482     </template></struct><struct-specialization name="pointer_rebinder"><template>
3483       <template-type-parameter name="Ptr"/>
3484       <template-type-parameter name="U"/>
3485     </template><specialization><template-arg>Ptr</template-arg><template-arg>U</template-arg><template-arg>2u</template-arg></specialization><typedef name="type"><type>Ptr::template rebind&lt; U &gt;::other</type></typedef>
3486 </struct-specialization><struct-specialization name="pointer_rebinder"><template>
3487       <template-type-parameter name="Ptr"/>
3488       <template-type-parameter name="U"/>
3489     </template><specialization><template-arg>Ptr</template-arg><template-arg>U</template-arg><template-arg>1u</template-arg></specialization><typedef name="type"><type>Ptr::template rebind&lt; U &gt;</type></typedef>
3490 </struct-specialization><struct-specialization name="pointer_rebinder"><template>
3491       <template-nontype-parameter name="Ptr"><type>template&lt; class, class...&gt; class</type></template-nontype-parameter>
3492       <template-type-parameter name="A"/>
3493       <template-nontype-parameter name="An"><type>class...</type></template-nontype-parameter>
3494       <template-type-parameter name="U"/>
3495     </template><specialization><template-arg>Ptr&lt; A</template-arg><template-arg>An...&gt;</template-arg><template-arg>U</template-arg><template-arg>0u</template-arg></specialization><typedef name="type"><type>Ptr&lt; U, An...&gt;</type></typedef>
3496 </struct-specialization><struct-specialization name="pointer_rebinder"><template>
3497       <template-nontype-parameter name="Ptr"><type>template&lt; class &gt; class</type></template-nontype-parameter>
3498       <template-type-parameter name="A"/>
3499       <template-type-parameter name="U"/>
3500     </template><specialization><template-arg>Ptr&lt; A &gt;</template-arg><template-arg>U</template-arg><template-arg>0u</template-arg></specialization><typedef name="type"><type>Ptr&lt; U &gt;</type></typedef>
3501 </struct-specialization><struct name="pointer_rebind"><template>
3502       <template-type-parameter name="Ptr"/>
3503       <template-type-parameter name="U"/>
3504     </template><inherit access="public">boost::intrusive::pointer_rebinder&lt; Ptr, U, pointer_rebind_mode&lt; Ptr, U &gt;::mode &gt;</inherit><purpose>defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) </purpose></struct><struct-specialization name="pointer_rebind"><template>
3505       <template-type-parameter name="T"/>
3506       <template-type-parameter name="U"/>
3507     </template><specialization><template-arg>T *</template-arg><template-arg>U</template-arg></specialization><typedef name="type"><type>U *</type></typedef>
3508 </struct-specialization>
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560 </namespace>
3561 </namespace>
3562 </header>
3563 <header name="boost/intrusive/pointer_traits.hpp">
3564 <namespace name="boost">
3565 <namespace name="intrusive">
3566 <struct name="pointer_traits"><template>
3567       <template-type-parameter name="Ptr"/>
3568     </template><description><para><classname alt="boost::intrusive::pointer_traits">pointer_traits</classname> is the implementation of C++11 std::pointer_traits class with some extensions like castings.</para><para><classname alt="boost::intrusive::pointer_traits">pointer_traits</classname> supplies a uniform interface to certain attributes of pointer-like types.</para><para><emphasis role="bold">Note</emphasis>: When defining a custom family of pointers or references to be used with BI library, make sure the public static conversion functions accessed through the <computeroutput><classname alt="boost::intrusive::pointer_traits">pointer_traits</classname></computeroutput> interface (<computeroutput>*_cast_from</computeroutput> and <computeroutput>pointer_to</computeroutput>) can properly convert between const and nonconst referred member types <emphasis role="bold">without the use of implicit constructor calls</emphasis>. It is suggested these conversions be implemented as function templates, where the template argument is the type of the object being converted from. </para></description><typedef name="pointer"><description><para>The pointer type queried by this <classname alt="boost::intrusive::pointer_traits">pointer_traits</classname> instantiation </para></description><type>Ptr</type></typedef>
3569 <typedef name="element_type"><description><para>Ptr::element_type if such a type exists; otherwise, T if Ptr is a class template instantiation of the form SomePointer&lt;T, Args&gt;, where Args is zero or more type arguments ; otherwise , the specialization is ill-formed. </para></description><type>unspecified_type</type></typedef>
3570 <typedef name="difference_type"><description><para>Ptr::difference_type if such a type exists; otherwise, std::ptrdiff_t. </para></description><type>unspecified_type</type></typedef>
3571 <typedef name="rebind"><description><para>Ptr::rebind&lt;U&gt; if such a type exists; otherwise, SomePointer&lt;U, Args&gt; if Ptr is a class template instantiation of the form SomePointer&lt;T, Args&gt;, where Args is zero or more type arguments ; otherwise, the instantiation of rebind is ill-formed.</para><programlisting>typename rebind_pointer&lt;U&gt;::type</programlisting></description><type>unspecified</type></typedef>
3572 <typedef name="reference"><description><para>Ptr::reference if such a type exists (non-standard extension); otherwise, element_type &amp; </para></description><type>unspecified_type</type></typedef>
3573 <method-group name="public static functions">
3574 <method name="pointer_to" specifiers="static"><type>pointer</type><parameter name="r"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Remark</emphasis>: If element_type is (possibly cv-qualified) void, r type is unspecified; otherwise, it is element_type &amp;.</para><para><emphasis role="bold">Returns</emphasis>: A dereferenceable pointer to r obtained by calling Ptr::pointer_to(reference). Non-standard extension: If such function does not exist, returns pointer(addressof(r));</para><para><emphasis role="bold">Note</emphasis>: For non-conforming compilers only the existence of a member function called <computeroutput>pointer_to</computeroutput> is checked. </para></description></method>
3575 <method name="static_cast_from" specifiers="static"><type>pointer</type><template>
3576           <template-type-parameter name="UPtr"/>
3577         </template><parameter name="uptr"><paramtype>const UPtr &amp;</paramtype></parameter><description><para><emphasis role="bold">Remark</emphasis>: Non-standard extension.</para><para><emphasis role="bold">Returns</emphasis>: A dereferenceable pointer to r obtained by calling the static template function Ptr::static_cast_from(UPpr/const UPpr &amp;). If such function does not exist, returns pointer_to(static_cast&lt;element_type&amp;&gt;(*uptr))</para><para><emphasis role="bold">Note</emphasis>: For non-conforming compilers only the existence of a member function called <computeroutput>static_cast_from</computeroutput> is checked. </para></description></method>
3578 <method name="const_cast_from" specifiers="static"><type>pointer</type><template>
3579           <template-type-parameter name="UPtr"/>
3580         </template><parameter name="uptr"><paramtype>const UPtr &amp;</paramtype></parameter><description><para><emphasis role="bold">Remark</emphasis>: Non-standard extension.</para><para><emphasis role="bold">Returns</emphasis>: A dereferenceable pointer to r obtained by calling the static template function Ptr::const_cast_from&lt;UPtr&gt;(UPpr/const UPpr &amp;). If such function does not exist, returns pointer_to(const_cast&lt;element_type&amp;&gt;(*uptr))</para><para><emphasis role="bold">Note</emphasis>: For non-conforming compilers only the existence of a member function called <computeroutput>const_cast_from</computeroutput> is checked. </para></description></method>
3581 <method name="dynamic_cast_from" specifiers="static"><type>pointer</type><template>
3582           <template-type-parameter name="UPtr"/>
3583         </template><parameter name="uptr"><paramtype>const UPtr &amp;</paramtype></parameter><description><para><emphasis role="bold">Remark</emphasis>: Non-standard extension.</para><para><emphasis role="bold">Returns</emphasis>: A dereferenceable pointer to r obtained by calling the static template function Ptr::dynamic_cast_from&lt;UPtr&gt;(UPpr/const UPpr &amp;). If such function does not exist, returns pointer_to(<emphasis>dynamic_cast&lt;element_type</emphasis>&gt;(&amp;*uptr))</para><para><emphasis role="bold">Note</emphasis>: For non-conforming compilers only the existence of a member function called <computeroutput>dynamic_cast_from</computeroutput> is checked. </para></description></method>
3584 </method-group>
3585 </struct><struct-specialization name="pointer_traits"><template>
3586       <template-type-parameter name="T"/>
3587     </template><specialization><template-arg>T *</template-arg></specialization><description><para>Specialization of <classname alt="boost::intrusive::pointer_traits">pointer_traits</classname> for raw pointers </para></description><struct name="rebind_pointer"><template>
3588       <template-type-parameter name="U"/>
3589     </template><typedef name="type"><type>U *</type></typedef>
3590 </struct><typedef name="element_type"><type>T</type></typedef>
3591 <typedef name="pointer"><type>T *</type></typedef>
3592 <typedef name="difference_type"><type>std::ptrdiff_t</type></typedef>
3593 <typedef name="reference"><type>T &amp;</type></typedef>
3594 <typedef name="rebind"><description><programlisting>U *
3595
3596 typename rebind_pointer&lt;U&gt;::type</programlisting></description><type>U *</type></typedef>
3597 <method-group name="public static functions">
3598 <method name="pointer_to" specifiers="static"><type>pointer</type><parameter name="r"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: addressof(r) </para></description></method>
3599 <method name="static_cast_from" specifiers="static"><type>pointer</type><template>
3600           <template-type-parameter name="U"/>
3601         </template><parameter name="uptr"><paramtype>U *</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: static_cast&lt;pointer&gt;(uptr) </para></description></method>
3602 <method name="const_cast_from" specifiers="static"><type>pointer</type><template>
3603           <template-type-parameter name="U"/>
3604         </template><parameter name="uptr"><paramtype>U *</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: const_cast&lt;pointer&gt;(uptr) </para></description></method>
3605 <method name="dynamic_cast_from" specifiers="static"><type>pointer</type><template>
3606           <template-type-parameter name="U"/>
3607         </template><parameter name="uptr"><paramtype>U *</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: dynamic_cast&lt;pointer&gt;(uptr) </para></description></method>
3608 </method-group>
3609 </struct-specialization>
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661 </namespace>
3662 </namespace>
3663 </header>
3664 <header name="boost/intrusive/priority_compare.hpp">
3665 <namespace name="boost">
3666 <namespace name="intrusive">
3667 <struct name="priority_compare"><template>
3668       <template-type-parameter name="T"><default>void</default></template-type-parameter>
3669     </template><typedef name="first_argument_type"><type>T</type></typedef>
3670 <typedef name="second_argument_type"><type>T</type></typedef>
3671 <typedef name="result_type"><type>bool</type></typedef>
3672 <method-group name="public member functions">
3673 <method name="operator()" cv="const"><type>bool</type><parameter name="val"><paramtype>const T &amp;</paramtype></parameter><parameter name="val2"><paramtype>const T &amp;</paramtype></parameter></method>
3674 </method-group>
3675 </struct><struct-specialization name="priority_compare"><template>
3676     </template><specialization><template-arg>void</template-arg></specialization><method-group name="public member functions">
3677 <method name="operator()" cv="const"><type>bool</type><template>
3678           <template-type-parameter name="T"/>
3679           <template-type-parameter name="U"/>
3680         </template><parameter name="t"><paramtype>const T &amp;</paramtype></parameter><parameter name="u"><paramtype>const U &amp;</paramtype></parameter></method>
3681 </method-group>
3682 </struct-specialization>
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734 </namespace>
3735 </namespace>
3736 </header>
3737 <header name="boost/intrusive/rbtree.hpp">
3738 <namespace name="boost">
3739 <namespace name="intrusive">
3740 <class name="rbtree"><template>
3741       <template-type-parameter name="T"/>
3742       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
3743     </template><description><para>The class template rbtree is an intrusive red-black tree container, that is used to construct intrusive set and multiset containers. The no-throw guarantee holds only, if the key_compare object doesn't throw.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput> and <computeroutput>compare&lt;&gt;</computeroutput>. </para></description><typedef name="value_traits"><type>ValueTraits</type></typedef>
3744 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
3745 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
3746 <typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
3747 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
3748 <typedef name="key_of_value"><type>implementation_defined::key_of_value</type></typedef>
3749 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
3750 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
3751 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
3752 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
3753 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
3754 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
3755 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
3756 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
3757 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
3758 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
3759 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
3760 <typedef name="node"><type>implementation_defined::node</type></typedef>
3761 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
3762 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
3763 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
3764 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
3765 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
3766 <method-group name="public member functions">
3767 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3768 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3769 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3770 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3771 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3772 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3773 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3774 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3775 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3776 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3777 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3778 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3779 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3780 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3781 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3782 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
3783 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
3784 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3785 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3786 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>rbtree</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two containers.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
3787 <method name="clone_from"><type>void</type><template>
3788           <template-type-parameter name="Cloner"/>
3789           <template-type-parameter name="Disposer"/>
3790         </template><parameter name="src"><paramtype>const <classname>rbtree</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. </para></description></method>
3791 <method name="clone_from"><type>void</type><template>
3792           <template-type-parameter name="Cloner"/>
3793           <template-type-parameter name="Disposer"/>
3794         </template><parameter name="src"><paramtype><classname>rbtree</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: This version can modify the source container, useful to implement move semantics. </para></description></method>
3795 <method name="clone_from"><type>void</type><template>
3796           <template-type-parameter name="Cloner"/>
3797           <template-type-parameter name="Disposer"/>
3798         </template><parameter name="src"><paramtype><classname>rbtree</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: This version can modify the source container, useful to implement move semantics. </para></description></method>
3799 <method name="insert_equal"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container before the upper bound.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
3800 <method name="insert_equal"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator.</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case)</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
3801 <method name="insert_equal"><type>void</type><template>
3802           <template-type-parameter name="Iterator"/>
3803         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Inserts a each element of a range into the container before the upper bound of the key of each element.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
3804 <method name="insert_unique"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container if the value is not already present.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
3805 <method name="insert_unique"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert x into the container, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time (two comparisons in the worst case) if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
3806 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
3807           <template-type-parameter name="KeyType"/>
3808           <template-type-parameter name="KeyTypeKeyCompare"/>
3809         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
3810 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
3811           <template-type-parameter name="KeyType"/>
3812           <template-type-parameter name="KeyTypeKeyCompare"/>
3813         </template><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the constructing that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that key to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This can give a total constant-time complexity to the insertion: check(O(1)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
3814 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
3815 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
3816 <method name="insert_unique_commit"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue of type value_type. commit_data must have been obtained from a previous call to "insert_check". No objects should have been inserted or erased from the container between the "insert_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the container using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the newly inserted object.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
3817 <method name="insert_unique"><type>void</type><template>
3818           <template-type-parameter name="Iterator"/>
3819         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert each element of a range into the container.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
3820 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
3821 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
3822 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
3823 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
3824 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
3825 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
3826 <method name="erase"><type>size_type</type><template>
3827           <template-type-parameter name="KeyType"/>
3828           <template-type-parameter name="KeyTypeKeyCompare"/>
3829         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
3830 <method name="erase_and_dispose"><type>iterator</type><template>
3831           <template-type-parameter name="Disposer"/>
3832         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
3833 <method name="erase_and_dispose"><type>iterator</type><template>
3834           <template-type-parameter name="Disposer"/>
3835         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
3836 <method name="erase_and_dispose"><type>size_type</type><template>
3837           <template-type-parameter name="Disposer"/>
3838         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
3839 <method name="erase_and_dispose"><type>size_type</type><template>
3840           <template-type-parameter name="KeyType"/>
3841           <template-type-parameter name="KeyTypeKeyCompare"/>
3842           <template-type-parameter name="Disposer"/>
3843         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk) and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
3844 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
3845 <method name="clear_and_dispose"><type>void</type><template>
3846           <template-type-parameter name="Disposer"/>
3847         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
3848 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
3849 <method name="count" cv="const"><type>size_type</type><template>
3850           <template-type-parameter name="KeyType"/>
3851           <template-type-parameter name="KeyTypeKeyCompare"/>
3852         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
3853 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
3854 <method name="lower_bound"><type>iterator</type><template>
3855           <template-type-parameter name="KeyType"/>
3856           <template-type-parameter name="KeyTypeKeyCompare"/>
3857         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
3858 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
3859 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
3860           <template-type-parameter name="KeyType"/>
3861           <template-type-parameter name="KeyTypeKeyCompare"/>
3862         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
3863 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
3864 <method name="upper_bound"><type>iterator</type><template>
3865           <template-type-parameter name="KeyType"/>
3866           <template-type-parameter name="KeyTypeKeyCompare"/>
3867         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
3868 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
3869 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
3870           <template-type-parameter name="KeyType"/>
3871           <template-type-parameter name="KeyTypeKeyCompare"/>
3872         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
3873 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
3874 <method name="find"><type>iterator</type><template>
3875           <template-type-parameter name="KeyType"/>
3876           <template-type-parameter name="KeyTypeKeyCompare"/>
3877         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
3878 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
3879 <method name="find" cv="const"><type>const_iterator</type><template>
3880           <template-type-parameter name="KeyType"/>
3881           <template-type-parameter name="KeyTypeKeyCompare"/>
3882         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
3883 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
3884 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
3885           <template-type-parameter name="KeyType"/>
3886           <template-type-parameter name="KeyTypeKeyCompare"/>
3887         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
3888 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
3889 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
3890           <template-type-parameter name="KeyType"/>
3891           <template-type-parameter name="KeyTypeKeyCompare"/>
3892         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
3893 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
3894 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
3895           <template-type-parameter name="KeyType"/>
3896           <template-type-parameter name="KeyTypeKeyCompare"/>
3897         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
3898 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
3899 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
3900           <template-type-parameter name="KeyType"/>
3901           <template-type-parameter name="KeyTypeKeyCompare"/>
3902         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
3903 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3904 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
3905 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
3906 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
3907 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
3908 <method name="merge_unique"><type>void</type><template>
3909           <template-type-parameter name="T"/>
3910           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
3911         </template><parameter name=""><paramtype><classname>rbtree</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
3912 <method name="merge_equal"><type>void</type><template>
3913           <template-type-parameter name="T"/>
3914           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
3915         </template><parameter name=""><paramtype><classname>rbtree</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Extracts each element in source and insert it into a using the comparison object of *this.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
3916 </method-group>
3917 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
3918 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container with given comparison and traits.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
3919 <constructor><template>
3920           <template-type-parameter name="Iterator"/>
3921         </template><parameter name="unique"><paramtype>bool</paramtype></parameter><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare object throws. Basic guarantee. </para></description></constructor>
3922 <constructor><parameter name="x"><paramtype><classname>rbtree</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
3923 <copy-assignment><type><classname>rbtree</classname> &amp;</type><parameter name="x"><paramtype><classname>rbtree</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
3924 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
3925 <method-group name="public static functions">
3926 <method name="container_from_end_iterator" specifiers="static"><type><classname>rbtree</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
3927 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>rbtree</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
3928 <method name="container_from_iterator" specifiers="static"><type><classname>rbtree</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
3929 <method name="container_from_iterator" specifiers="static"><type>const <classname>rbtree</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
3930 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
3931 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
3932 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
3933 </method-group>
3934 </class><struct name="make_rbtree"><template>
3935       <template-type-parameter name="T"/>
3936       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
3937     </template><description><para>Helper metafunction to define a <computeroutput>rbtree</computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
3938 </struct>
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990 </namespace>
3991 </namespace>
3992 </header>
3993 <header name="boost/intrusive/rbtree_algorithms.hpp">
3994 <namespace name="boost">
3995 <namespace name="intrusive">
3996 <class name="rbtree_algorithms"><template>
3997       <template-type-parameter name="NodeTraits"/>
3998     </template><description><para><classname alt="boost::intrusive::rbtree_algorithms">rbtree_algorithms</classname> provides basic algorithms to manipulate nodes forming a red-black tree. The insertion and deletion algorithms are based on those in Cormen, Leiserson, and Rivest, Introduction to Algorithms (MIT Press, 1990), except that</para><para>(1) the header node is maintained with links not only to the root but also to the leftmost node of the tree, to enable constant time begin(), and to the rightmost node of the tree, to enable linear time performance when used with the generic set algorithms (set_union, etc.);</para><para>(2) when a node being deleted has two children its successor node is relinked into its place, rather than copied, so that the only pointers invalidated are those referring to the deleted node.</para><para><classname alt="boost::intrusive::rbtree_algorithms">rbtree_algorithms</classname> is configured with a NodeTraits class, which encapsulates the information about the node to be manipulated. NodeTraits must support the following interface:</para><para><emphasis role="bold">Typedefs</emphasis>:</para><para><computeroutput>node</computeroutput>: The type of the node that forms the binary search tree</para><para><computeroutput>node_ptr</computeroutput>: A pointer to a node</para><para><computeroutput>const_node_ptr</computeroutput>: A pointer to a const node</para><para><computeroutput>color</computeroutput>: The type that can store the color of a node</para><para><emphasis role="bold">Static functions</emphasis>:</para><para><computeroutput>static node_ptr get_parent(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_parent(node_ptr n, node_ptr parent);</computeroutput></para><para><computeroutput>static node_ptr get_left(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_left(node_ptr n, node_ptr left);</computeroutput></para><para><computeroutput>static node_ptr get_right(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_right(node_ptr n, node_ptr right);</computeroutput></para><para><computeroutput>static color get_color(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_color(node_ptr n, color c);</computeroutput></para><para><computeroutput>static color black();</computeroutput></para><para><computeroutput>static color red();</computeroutput> </para></description><typedef name="node_traits"><type>NodeTraits</type></typedef>
3999 <typedef name="node"><type>NodeTraits::node</type></typedef>
4000 <typedef name="node_ptr"><type>NodeTraits::node_ptr</type></typedef>
4001 <typedef name="const_node_ptr"><type>NodeTraits::const_node_ptr</type></typedef>
4002 <typedef name="color"><type>NodeTraits::color</type></typedef>
4003 <typedef name="insert_commit_data"><description><para>This type is the information that will be filled by insert_unique_check </para></description><type>bstree_algo::insert_commit_data</type></typedef>
4004 <method-group name="public static functions">
4005 <method name="get_header" specifiers="static"><type>node_ptr</type><parameter name="n"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node of the tree or a header node.</para><para><emphasis role="bold">Effects</emphasis>: Returns the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4006 <method name="begin_node" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'header' is the header node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns the first node of the tree, the header if the tree is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4007 <method name="end_node" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'header' is the header node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4008 <method name="swap_tree" specifiers="static"><type>void</type><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the header nodes of two trees.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two trees. After the function header1 will contain links to the second tree and header2 will have links to the first tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4009 <method name="swap_nodes" specifiers="static"><type>void</type><parameter name="node1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="node2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node1 and node2 can't be header nodes of two trees.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two nodes. After the function node1 will be inserted in the position node2 before the function. node2 will be inserted in the position node1 had before the function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if node1 and node2 are not equivalent according to the ordering rules.</para><para>Experimental function </para></description></method>
4010 <method name="swap_nodes" specifiers="static"><type>void</type><parameter name="node1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="node2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node1 and node2 can't be header nodes of two trees with header header1 and header2.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two nodes. After the function node1 will be inserted in the position node2 before the function. node2 will be inserted in the position node1 had before the function.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if node1 and node2 are not equivalent according to the ordering rules.</para><para>Experimental function </para></description></method>
4011 <method name="replace_node" specifiers="static"><type>void</type><parameter name="node_to_be_replaced"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node_to_be_replaced must be inserted in a tree and new_node must not be inserted in a tree.</para><para><emphasis role="bold">Effects</emphasis>: Replaces node_to_be_replaced in its position in the tree with new_node. The tree does not need to be rebalanced</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if new_node is not equivalent to node_to_be_replaced according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing and comparison is needed. Experimental function </para></description></method>
4012 <method name="replace_node" specifiers="static"><type>void</type><parameter name="node_to_be_replaced"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node_to_be_replaced must be inserted in a tree with header "header" and new_node must not be inserted in a tree.</para><para><emphasis role="bold">Effects</emphasis>: Replaces node_to_be_replaced in its position in the tree with new_node. The tree does not need to be rebalanced</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if new_node is not equivalent to node_to_be_replaced according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. Experimental function </para></description></method>
4013 <method name="unlink" specifiers="static"><type>void</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node is a tree node but not the header.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the node and rebalances the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4014 <method name="unlink_leftmost_without_rebalance" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header is the header of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the tree, and updates the header link to the new leftmost node.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the tree and the tree can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the tree. </para></description></method>
4015 <method name="unique" specifiers="static"><type>bool</type><parameter name="node"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node of the tree or a node initialized by init(...) or init_node.</para><para><emphasis role="bold">Effects</emphasis>: Returns true if the node is initialized by init() or init_node().</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4016 <method name="size" specifiers="static"><type>std::size_t</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node is a node of the tree but it's not the header.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of nodes of the subtree.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4017 <method name="next_node" specifiers="static"><type>node_ptr</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node from the tree except the header.</para><para><emphasis role="bold">Effects</emphasis>: Returns the next node of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4018 <method name="prev_node" specifiers="static"><type>node_ptr</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node from the tree except the leftmost node.</para><para><emphasis role="bold">Effects</emphasis>: Returns the previous node of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4019 <method name="init" specifiers="static"><type>void</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' must not be part of any tree.</para><para><emphasis role="bold">Effects</emphasis>: After the function unique(node) == true.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Nodes</emphasis>: If node is inserted in a tree, this function corrupts the tree. </para></description></method>
4020 <method name="init_header" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node must not be part of any tree.</para><para><emphasis role="bold">Effects</emphasis>: Initializes the header to represent an empty tree. unique(header) == true.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Nodes</emphasis>: If node is inserted in a tree, this function corrupts the tree. </para></description></method>
4021 <method name="erase" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header must be the header of a tree, z a node of that tree and z != header.</para><para><emphasis role="bold">Effects</emphasis>: Erases node "z" from the tree with header "header".</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4022 <method name="transfer_unique" specifiers="static"><type>bool</type><template>
4023           <template-type-parameter name="NodePtrCompare"/>
4024         </template><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the headers of trees tree1 and tree2 respectively, z a non-header node of tree1. NodePtrCompare is the comparison function of tree1..</para><para><emphasis role="bold">Effects</emphasis>: Transfers node "z" from tree1 to tree2 if tree1 does not contain a node that is equivalent to z.</para><para><emphasis role="bold">Returns</emphasis>: True if the node was trasferred, false otherwise.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison throws. </para></description></method>
4025 <method name="transfer_equal" specifiers="static"><type>void</type><template>
4026           <template-type-parameter name="NodePtrCompare"/>
4027         </template><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the headers of trees tree1 and tree2 respectively, z a non-header node of tree1. NodePtrCompare is the comparison function of tree1..</para><para><emphasis role="bold">Effects</emphasis>: Transfers node "z" from tree1 to tree2.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison throws. </para></description></method>
4028 <method name="clone" specifiers="static"><type>void</type><template>
4029           <template-type-parameter name="Cloner"/>
4030           <template-type-parameter name="Disposer"/>
4031         </template><parameter name="source_header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="target_header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "cloner" must be a function object taking a node_ptr and returning a new cloned node of it. "disposer" must take a node_ptr and shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: First empties target tree calling <computeroutput>void disposer::operator()(const node_ptr &amp;)</computeroutput> for every node of the tree except the header.</para><para>Then, duplicates the entire tree pointed by "source_header" cloning each source node with <computeroutput>node_ptr Cloner::operator()(const node_ptr &amp;)</computeroutput> to obtain the nodes of the target tree. If "cloner" throws, the cloned target nodes are disposed using <computeroutput>void disposer(const node_ptr &amp;)</computeroutput>.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of element of the source tree plus the number of elements of tree target tree when calling this function.</para><para><emphasis role="bold">Throws</emphasis>: If cloner functor throws. If this happens target nodes are disposed. </para></description></method>
4032 <method name="clear_and_dispose" specifiers="static"><type>void</type><template>
4033           <template-type-parameter name="Disposer"/>
4034         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "disposer" must be an object function taking a node_ptr parameter and shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Empties the target tree calling <computeroutput>void disposer::operator()(const node_ptr &amp;)</computeroutput> for every node of the tree except the header.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of element of the source tree plus the. number of elements of tree target tree when calling this function.</para><para><emphasis role="bold">Throws</emphasis>: If cloner functor throws. If this happens target nodes are disposed. </para></description></method>
4035 <method name="lower_bound" specifiers="static"><type>node_ptr</type><template>
4036           <template-type-parameter name="KeyType"/>
4037           <template-type-parameter name="KeyNodePtrCompare"/>
4038         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is not less than "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
4039 <method name="upper_bound" specifiers="static"><type>node_ptr</type><template>
4040           <template-type-parameter name="KeyType"/>
4041           <template-type-parameter name="KeyNodePtrCompare"/>
4042         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is greater than "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
4043 <method name="find" specifiers="static"><type>node_ptr</type><template>
4044           <template-type-parameter name="KeyType"/>
4045           <template-type-parameter name="KeyNodePtrCompare"/>
4046         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is equivalent to "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
4047 <method name="equal_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
4048           <template-type-parameter name="KeyType"/>
4049           <template-type-parameter name="KeyNodePtrCompare"/>
4050         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair of node_ptr delimiting a range containing all elements that are equivalent to "key" according to "comp" or an empty range that indicates the position where those elements would be if there are no equivalent elements.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
4051 <method name="bounded_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
4052           <template-type-parameter name="KeyType"/>
4053           <template-type-parameter name="KeyNodePtrCompare"/>
4054         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. 'lower_key' must not be greater than 'upper_key' according to 'comp'. If 'lower_key' == 'upper_key', ('left_closed' || 'right_closed') must be true.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change. </para></description></method>
4055 <method name="count" specifiers="static"><type>std::size_t</type><template>
4056           <template-type-parameter name="KeyType"/>
4057           <template-type-parameter name="KeyNodePtrCompare"/>
4058         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements with a key equivalent to "key" according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
4059 <method name="insert_equal_upper_bound" specifiers="static"><type>node_ptr</type><template>
4060           <template-type-parameter name="NodePtrCompare"/>
4061         </template><parameter name="h"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "h" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before the upper bound according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
4062 <method name="insert_equal_lower_bound" specifiers="static"><type>node_ptr</type><template>
4063           <template-type-parameter name="NodePtrCompare"/>
4064         </template><parameter name="h"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "h" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before the lower bound according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
4065 <method name="insert_equal" specifiers="static"><type>node_ptr</type><template>
4066           <template-type-parameter name="NodePtrCompare"/>
4067         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="hint"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs. "hint" is node from the "header"'s tree.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case).</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if new_node is inserted immediately before "hint".</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
4068 <method name="insert_before" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="pos"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "pos" must be a valid iterator or header (end) node. "pos" must be an iterator pointing to the successor to "new_node" once inserted according to the order of already inserted nodes. This function does not check "pos" and this precondition must be guaranteed by the caller.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: If "pos" is not the successor of the newly inserted "new_node" tree invariants might be broken. </para></description></method>
4069 <method name="push_back" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "new_node" must be, according to the used ordering no less than the greatest inserted key.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: If "new_node" is less than the greatest inserted key tree invariants are broken. This function is slightly faster than using "insert_before". </para></description></method>
4070 <method name="push_front" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "new_node" must be, according to the used ordering, no greater than the lowest inserted key.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: If "new_node" is greater than the lowest inserted key tree invariants are broken. This function is slightly faster than using "insert_before". </para></description></method>
4071 <method name="insert_unique_check" specifiers="static"><type>std::pair&lt; node_ptr, bool &gt;</type><template>
4072           <template-type-parameter name="KeyType"/>
4073           <template-type-parameter name="KeyNodePtrCompare"/>
4074         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares KeyType with a node_ptr.</para><para><emphasis role="bold">Effects</emphasis>: Checks if there is an equivalent node to "key" in the tree according to "comp" and obtains the needed information to realize a constant-time node insertion if there is no equivalent node.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing a node_ptr to the already present node and false. If there is not equivalent key can be inserted returns true in the returned pair's boolean and fills "commit_data" that is meant to be used with the "insert_commit" function to achieve a constant-time insertion function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a node is expensive and the user does not want to have two equivalent nodes in the tree: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the node and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the node and use "insert_commit" to insert the node in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_unique_commit" only if no more objects are inserted or erased from the set. </para></description></method>
4075 <method name="insert_unique_check" specifiers="static"><type>std::pair&lt; node_ptr, bool &gt;</type><template>
4076           <template-type-parameter name="KeyType"/>
4077           <template-type-parameter name="KeyNodePtrCompare"/>
4078         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="hint"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares KeyType with a node_ptr. "hint" is node from the "header"'s tree.</para><para><emphasis role="bold">Effects</emphasis>: Checks if there is an equivalent node to "key" in the tree according to "comp" using "hint" as a hint to where it should be inserted and obtains the needed information to realize a constant-time node insertion if there is no equivalent node. If "hint" is the upper_bound the function has constant time complexity (two comparisons in the worst case).</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing a node_ptr to the already present node and false. If there is not equivalent key can be inserted returns true in the returned pair's boolean and fills "commit_data" that is meant to be used with the "insert_commit" function to achieve a constant-time insertion function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic, but it is amortized constant time if new_node should be inserted immediately before "hint".</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a node is expensive and the user does not want to have two equivalent nodes in the tree: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the node and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the node and use "insert_commit" to insert the node in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_unique_commit" only if no more objects are inserted or erased from the set. </para></description></method>
4079 <method name="insert_unique_commit" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_value"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "commit_data" must have been obtained from a previous call to "insert_unique_check". No objects should have been inserted or erased from the set between the "insert_unique_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node in the set using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_unique_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
4080 <method name="is_header" specifiers="static"><type>bool</type><parameter name="p"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: p is a node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns true if p is the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4081 </method-group>
4082 </class>
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134 </namespace>
4135 </namespace>
4136 </header>
4137 <header name="boost/intrusive/set.hpp">
4138 <namespace name="boost">
4139 <namespace name="intrusive">
4140 <class name="set"><template>
4141       <template-type-parameter name="T"/>
4142       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4143     </template><description><para>The class template set is an intrusive container, that mimics most of the interface of std::set as described in the C++ standard.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput> and <computeroutput>compare&lt;&gt;</computeroutput>. </para></description><typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
4144 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
4145 <typedef name="key_of_value"><type>implementation_defined::key_of_value</type></typedef>
4146 <typedef name="value_traits"><type>implementation_defined::value_traits</type></typedef>
4147 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
4148 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
4149 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
4150 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
4151 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
4152 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
4153 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
4154 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
4155 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
4156 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
4157 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
4158 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
4159 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
4160 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
4161 <typedef name="node"><type>implementation_defined::node</type></typedef>
4162 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
4163 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
4164 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
4165 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
4166 <method-group name="public member functions">
4167 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4168 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4169 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4170 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4171 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4172 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4173 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4174 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4175 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4176 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4177 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4178 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4179 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4180 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4181 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4182 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
4183 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
4184 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4185 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4186 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>set</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two containers.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
4187 <method name="clone_from"><type>void</type><template>
4188           <template-type-parameter name="Cloner"/>
4189           <template-type-parameter name="Disposer"/>
4190         </template><parameter name="src"><paramtype>const <classname>set</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. </para></description></method>
4191 <method name="clone_from"><type>void</type><template>
4192           <template-type-parameter name="Cloner"/>
4193           <template-type-parameter name="Disposer"/>
4194         </template><parameter name="src"><paramtype><classname>set</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: This version can modify the source container, useful to implement move semantics. </para></description></method>
4195 <method name="insert"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container if the value is not already present.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
4196 <method name="insert"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert x into the container, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time (two comparisons in the worst case) if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
4197 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
4198 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
4199 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
4200           <template-type-parameter name="KeyType"/>
4201           <template-type-parameter name="KeyTypeKeyCompare"/>
4202         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
4203 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
4204           <template-type-parameter name="KeyType"/>
4205           <template-type-parameter name="KeyTypeKeyCompare"/>
4206         </template><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the constructing that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that key to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This can give a total constant-time complexity to the insertion: check(O(1)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
4207 <method name="insert"><type>void</type><template>
4208           <template-type-parameter name="Iterator"/>
4209         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert each element of a range into the container.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
4210 <method name="insert_commit"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue of type value_type. commit_data must have been obtained from a previous call to "insert_check". No objects should have been inserted or erased from the container between the "insert_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the container using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the newly inserted object.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
4211 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
4212 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
4213 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
4214 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4215 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4216 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4217 <method name="erase"><type>size_type</type><template>
4218           <template-type-parameter name="KeyType"/>
4219           <template-type-parameter name="KeyTypeKeyCompare"/>
4220         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4221 <method name="erase_and_dispose"><type>iterator</type><template>
4222           <template-type-parameter name="Disposer"/>
4223         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
4224 <method name="erase_and_dispose"><type>iterator</type><template>
4225           <template-type-parameter name="Disposer"/>
4226         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
4227 <method name="erase_and_dispose"><type>size_type</type><template>
4228           <template-type-parameter name="Disposer"/>
4229         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4230 <method name="erase_and_dispose"><type>size_type</type><template>
4231           <template-type-parameter name="KeyType"/>
4232           <template-type-parameter name="KeyTypeKeyCompare"/>
4233           <template-type-parameter name="Disposer"/>
4234         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk) and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
4235 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4236 <method name="clear_and_dispose"><type>void</type><template>
4237           <template-type-parameter name="Disposer"/>
4238         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
4239 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4240 <method name="count" cv="const"><type>size_type</type><template>
4241           <template-type-parameter name="KeyType"/>
4242           <template-type-parameter name="KeyTypeKeyCompare"/>
4243         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4244 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4245 <method name="lower_bound"><type>iterator</type><template>
4246           <template-type-parameter name="KeyType"/>
4247           <template-type-parameter name="KeyTypeKeyCompare"/>
4248         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4249 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4250 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
4251           <template-type-parameter name="KeyType"/>
4252           <template-type-parameter name="KeyTypeKeyCompare"/>
4253         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4254 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4255 <method name="upper_bound"><type>iterator</type><template>
4256           <template-type-parameter name="KeyType"/>
4257           <template-type-parameter name="KeyTypeKeyCompare"/>
4258         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4259 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4260 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
4261           <template-type-parameter name="KeyType"/>
4262           <template-type-parameter name="KeyTypeKeyCompare"/>
4263         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4264 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4265 <method name="find"><type>iterator</type><template>
4266           <template-type-parameter name="KeyType"/>
4267           <template-type-parameter name="KeyTypeKeyCompare"/>
4268         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4269 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4270 <method name="find" cv="const"><type>const_iterator</type><template>
4271           <template-type-parameter name="KeyType"/>
4272           <template-type-parameter name="KeyTypeKeyCompare"/>
4273         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4274 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4275 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
4276           <template-type-parameter name="KeyType"/>
4277           <template-type-parameter name="KeyTypeKeyCompare"/>
4278         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4279 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4280 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
4281           <template-type-parameter name="KeyType"/>
4282           <template-type-parameter name="KeyTypeKeyCompare"/>
4283         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4284 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
4285 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
4286           <template-type-parameter name="KeyType"/>
4287           <template-type-parameter name="KeyTypeKeyCompare"/>
4288         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
4289 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
4290 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
4291           <template-type-parameter name="KeyType"/>
4292           <template-type-parameter name="KeyTypeKeyCompare"/>
4293         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
4294 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4295 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4296 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
4297 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
4298 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
4299 <method name="merge"><type>void</type><template>
4300           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
4301         </template><parameter name="source"><paramtype><classname>set</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
4302 <method name="merge"><type>void</type><template>
4303           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
4304         </template><parameter name="source"><paramtype><classname>multiset</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
4305 </method-group>
4306 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
4307 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container with given comparison and traits.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
4308 <constructor><template>
4309           <template-type-parameter name="Iterator"/>
4310         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare object throws. Basic guarantee. </para></description></constructor>
4311 <constructor><parameter name="x"><paramtype><classname>set</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
4312 <copy-assignment><type><classname>set</classname> &amp;</type><parameter name="x"><paramtype><classname>set</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
4313 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
4314 <method-group name="public static functions">
4315 <method name="container_from_end_iterator" specifiers="static"><type><classname>set</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
4316 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>set</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
4317 <method name="container_from_iterator" specifiers="static"><type><classname>set</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
4318 <method name="container_from_iterator" specifiers="static"><type>const <classname>set</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
4319 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
4320 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
4321 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
4322 </method-group>
4323 </class><struct name="make_set"><template>
4324       <template-type-parameter name="T"/>
4325       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4326     </template><description><para>Helper metafunction to define a <computeroutput>set</computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
4327 </struct><class name="multiset"><template>
4328       <template-type-parameter name="T"/>
4329       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4330     </template><description><para>The class template multiset is an intrusive container, that mimics most of the interface of std::multiset as described in the C++ standard.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput> and <computeroutput>compare&lt;&gt;</computeroutput>. </para></description><typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
4331 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
4332 <typedef name="key_of_value"><type>implementation_defined::key_of_value</type></typedef>
4333 <typedef name="value_traits"><type>implementation_defined::value_traits</type></typedef>
4334 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
4335 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
4336 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
4337 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
4338 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
4339 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
4340 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
4341 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
4342 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
4343 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
4344 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
4345 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
4346 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
4347 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
4348 <typedef name="node"><type>implementation_defined::node</type></typedef>
4349 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
4350 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
4351 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
4352 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
4353 <method-group name="public member functions">
4354 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4355 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4356 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4357 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4358 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4359 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4360 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4361 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4362 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4363 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4364 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4365 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4366 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4367 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4368 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4369 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
4370 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
4371 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4372 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4373 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>multiset</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two containers.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
4374 <method name="clone_from"><type>void</type><template>
4375           <template-type-parameter name="Cloner"/>
4376           <template-type-parameter name="Disposer"/>
4377         </template><parameter name="src"><paramtype>const <classname>multiset</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. </para></description></method>
4378 <method name="clone_from"><type>void</type><template>
4379           <template-type-parameter name="Cloner"/>
4380           <template-type-parameter name="Disposer"/>
4381         </template><parameter name="src"><paramtype><classname>multiset</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: This version can modify the source container, useful to implement move semantics. </para></description></method>
4382 <method name="insert"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container before the upper bound.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
4383 <method name="insert"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator.</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case)</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
4384 <method name="insert"><type>void</type><template>
4385           <template-type-parameter name="Iterator"/>
4386         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Inserts a each element of a range into the container before the upper bound of the key of each element.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
4387 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
4388 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
4389 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
4390 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4391 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4392 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4393 <method name="erase"><type>size_type</type><template>
4394           <template-type-parameter name="KeyType"/>
4395           <template-type-parameter name="KeyTypeKeyCompare"/>
4396         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4397 <method name="erase_and_dispose"><type>iterator</type><template>
4398           <template-type-parameter name="Disposer"/>
4399         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
4400 <method name="erase_and_dispose"><type>iterator</type><template>
4401           <template-type-parameter name="Disposer"/>
4402         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
4403 <method name="erase_and_dispose"><type>size_type</type><template>
4404           <template-type-parameter name="Disposer"/>
4405         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4406 <method name="erase_and_dispose"><type>size_type</type><template>
4407           <template-type-parameter name="KeyType"/>
4408           <template-type-parameter name="KeyTypeKeyCompare"/>
4409           <template-type-parameter name="Disposer"/>
4410         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk) and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
4411 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4412 <method name="clear_and_dispose"><type>void</type><template>
4413           <template-type-parameter name="Disposer"/>
4414         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
4415 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4416 <method name="count" cv="const"><type>size_type</type><template>
4417           <template-type-parameter name="KeyType"/>
4418           <template-type-parameter name="KeyTypeKeyCompare"/>
4419         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4420 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4421 <method name="lower_bound"><type>iterator</type><template>
4422           <template-type-parameter name="KeyType"/>
4423           <template-type-parameter name="KeyTypeKeyCompare"/>
4424         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4425 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4426 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
4427           <template-type-parameter name="KeyType"/>
4428           <template-type-parameter name="KeyTypeKeyCompare"/>
4429         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4430 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4431 <method name="upper_bound"><type>iterator</type><template>
4432           <template-type-parameter name="KeyType"/>
4433           <template-type-parameter name="KeyTypeKeyCompare"/>
4434         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4435 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4436 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
4437           <template-type-parameter name="KeyType"/>
4438           <template-type-parameter name="KeyTypeKeyCompare"/>
4439         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4440 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4441 <method name="find"><type>iterator</type><template>
4442           <template-type-parameter name="KeyType"/>
4443           <template-type-parameter name="KeyTypeKeyCompare"/>
4444         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4445 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4446 <method name="find" cv="const"><type>const_iterator</type><template>
4447           <template-type-parameter name="KeyType"/>
4448           <template-type-parameter name="KeyTypeKeyCompare"/>
4449         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4450 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4451 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
4452           <template-type-parameter name="KeyType"/>
4453           <template-type-parameter name="KeyTypeKeyCompare"/>
4454         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4455 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4456 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
4457           <template-type-parameter name="KeyType"/>
4458           <template-type-parameter name="KeyTypeKeyCompare"/>
4459         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4460 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
4461 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
4462           <template-type-parameter name="KeyType"/>
4463           <template-type-parameter name="KeyTypeKeyCompare"/>
4464         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
4465 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
4466 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
4467           <template-type-parameter name="KeyType"/>
4468           <template-type-parameter name="KeyTypeKeyCompare"/>
4469         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
4470 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4471 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4472 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
4473 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
4474 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
4475 <method name="merge"><type>void</type><template>
4476           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
4477         </template><parameter name="source"><paramtype><classname>multiset</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Extracts each element in source and insert it into a using the comparison object of *this.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
4478 <method name="merge"><type>void</type><template>
4479           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
4480         </template><parameter name="source"><paramtype><classname>set</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Extracts each element in source and insert it into a using the comparison object of *this.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
4481 </method-group>
4482 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
4483 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container with given comparison and traits.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
4484 <constructor><template>
4485           <template-type-parameter name="Iterator"/>
4486         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare object throws. Basic guarantee. </para></description></constructor>
4487 <constructor><parameter name="x"><paramtype><classname>multiset</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
4488 <copy-assignment><type><classname>multiset</classname> &amp;</type><parameter name="x"><paramtype><classname>multiset</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
4489 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
4490 <method-group name="public static functions">
4491 <method name="container_from_end_iterator" specifiers="static"><type><classname>multiset</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
4492 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>multiset</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
4493 <method name="container_from_iterator" specifiers="static"><type><classname>multiset</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
4494 <method name="container_from_iterator" specifiers="static"><type>const <classname>multiset</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
4495 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
4496 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
4497 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
4498 </method-group>
4499 </class><struct name="make_multiset"><template>
4500       <template-type-parameter name="T"/>
4501       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4502     </template><description><para>Helper metafunction to define a <computeroutput>multiset</computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
4503 </struct>
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525 <function name="operator!="><type>bool</type><template>
4526           <template-type-parameter name="T"/>
4527           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4528         </template><parameter name="x"><paramtype>const <classname>set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
4529 <function name="operator&gt;"><type>bool</type><template>
4530           <template-type-parameter name="T"/>
4531           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4532         </template><parameter name="x"><paramtype>const <classname>set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
4533 <function name="operator&lt;="><type>bool</type><template>
4534           <template-type-parameter name="T"/>
4535           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4536         </template><parameter name="x"><paramtype>const <classname>set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
4537 <function name="operator&gt;="><type>bool</type><template>
4538           <template-type-parameter name="T"/>
4539           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4540         </template><parameter name="x"><paramtype>const <classname>set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
4541 <function name="swap"><type>void</type><template>
4542           <template-type-parameter name="T"/>
4543           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4544         </template><parameter name="x"><paramtype><classname>set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype><classname>set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
4545 <function name="operator!="><type>bool</type><template>
4546           <template-type-parameter name="T"/>
4547           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4548         </template><parameter name="x"><paramtype>const <classname>multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
4549 <function name="operator&gt;"><type>bool</type><template>
4550           <template-type-parameter name="T"/>
4551           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4552         </template><parameter name="x"><paramtype>const <classname>multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
4553 <function name="operator&lt;="><type>bool</type><template>
4554           <template-type-parameter name="T"/>
4555           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4556         </template><parameter name="x"><paramtype>const <classname>multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
4557 <function name="operator&gt;="><type>bool</type><template>
4558           <template-type-parameter name="T"/>
4559           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4560         </template><parameter name="x"><paramtype>const <classname>multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
4561 <function name="swap"><type>void</type><template>
4562           <template-type-parameter name="T"/>
4563           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4564         </template><parameter name="x"><paramtype><classname>multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype><classname>multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585 </namespace>
4586 </namespace>
4587 </header>
4588 <header name="boost/intrusive/set_hook.hpp">
4589 <namespace name="boost">
4590 <namespace name="intrusive">
4591 <struct name="make_set_base_hook"><template>
4592       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4593     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::set_base_hook">set_base_hook</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
4594 </struct><class name="set_base_hook"><template>
4595       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4596     </template><inherit access="public">make_set_base_hook::type&lt; O1, O2, O3, O4 &gt;</inherit><description><para>Derive a class from <classname alt="boost::intrusive::set_base_hook">set_base_hook</classname> in order to store objects in in a set/multiset. <classname alt="boost::intrusive::set_base_hook">set_base_hook</classname> holds the data necessary to maintain the set/multiset and provides an appropriate <classname alt="boost::intrusive::value_traits">value_traits</classname> class for set/multiset.</para><para>The hook admits the following options: <computeroutput>tag&lt;&gt;</computeroutput>, <computeroutput>void_pointer&lt;&gt;</computeroutput>, <computeroutput>link_mode&lt;&gt;</computeroutput> and <computeroutput>optimize_size&lt;&gt;</computeroutput>.</para><para><computeroutput>tag&lt;&gt;</computeroutput> defines a tag to identify the node. The same tag value can be used in different classes, but if a class is derived from more than one <computeroutput><classname alt="boost::intrusive::list_base_hook">list_base_hook</classname></computeroutput>, then each <computeroutput><classname alt="boost::intrusive::list_base_hook">list_base_hook</classname></computeroutput> needs its unique tag.</para><para><computeroutput>void_pointer&lt;&gt;</computeroutput> is the pointer type that will be used internally in the hook and the container configured to use this hook.</para><para><computeroutput>link_mode&lt;&gt;</computeroutput> will specify the linking mode of the hook (<computeroutput>normal_link</computeroutput>, <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput>).</para><para><computeroutput>optimize_size&lt;&gt;</computeroutput> will tell the hook to optimize the hook for size instead of speed. </para></description><method-group name="public member functions">
4597 <method name="swap_nodes"><type>void</type><parameter name="other"><paramtype><classname>set_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swapping two nodes swaps the position of the elements related to those nodes in one or two containers. That is, if the node this is part of the element e1, the node x is part of the element e2 and both elements are included in the containers s1 and s2, then after the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 at the position of e1. If one element is not in a container, then after the swap-operation the other element is not in a container. Iterators to e1 and e2 related to those nodes are invalidated.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4598 <method name="is_linked" cv="const"><type>bool</type><description><para><emphasis role="bold">Precondition</emphasis>: <classname alt="boost::intrusive::link_mode">link_mode</classname> must be <computeroutput>safe_link</computeroutput> or <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: true, if the node belongs to a container, false otherwise. This function can be used to test whether <computeroutput>set::iterator_to</computeroutput> will return a valid iterator.</para><para><emphasis role="bold">Complexity</emphasis>: Constant </para></description></method>
4599 <method name="unlink"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Removes the node if it's inserted in a container. This function is only allowed if <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4600 </method-group>
4601 <constructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></constructor>
4602 <constructor><parameter name=""><paramtype>const <classname>set_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing a copy-constructor makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></constructor>
4603 <copy-assignment><type><classname>set_base_hook</classname> &amp;</type><parameter name=""><paramtype>const <classname>set_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Empty function. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing an assignment operator makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></copy-assignment>
4604 <destructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>normal_link</computeroutput>, the destructor does nothing (ie. no code is generated). If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>safe_link</computeroutput> and the object is stored in a set an assertion is raised. If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> and <computeroutput>is_linked()</computeroutput> is true, the node is unlinked.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
4605 </class><struct name="make_set_member_hook"><template>
4606       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4607     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::set_member_hook">set_member_hook</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
4608 </struct><class name="set_member_hook"><template>
4609       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4610     </template><inherit access="public">make_set_member_hook::type&lt; O1, O2, O3, O4 &gt;</inherit><description><para>Put a public data member <classname alt="boost::intrusive::set_member_hook">set_member_hook</classname> in order to store objects of this class in a set/multiset. <classname alt="boost::intrusive::set_member_hook">set_member_hook</classname> holds the data necessary for maintaining the set/multiset and provides an appropriate <classname alt="boost::intrusive::value_traits">value_traits</classname> class for set/multiset.</para><para>The hook admits the following options: <computeroutput>void_pointer&lt;&gt;</computeroutput>, <computeroutput>link_mode&lt;&gt;</computeroutput> and <computeroutput>optimize_size&lt;&gt;</computeroutput>.</para><para><computeroutput>void_pointer&lt;&gt;</computeroutput> is the pointer type that will be used internally in the hook and the container configured to use this hook.</para><para><computeroutput>link_mode&lt;&gt;</computeroutput> will specify the linking mode of the hook (<computeroutput>normal_link</computeroutput>, <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput>).</para><para><computeroutput>optimize_size&lt;&gt;</computeroutput> will tell the hook to optimize the hook for size instead of speed. </para></description><method-group name="public member functions">
4611 <method name="swap_nodes"><type>void</type><parameter name="other"><paramtype><classname>set_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swapping two nodes swaps the position of the elements related to those nodes in one or two containers. That is, if the node this is part of the element e1, the node x is part of the element e2 and both elements are included in the containers s1 and s2, then after the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 at the position of e1. If one element is not in a container, then after the swap-operation the other element is not in a container. Iterators to e1 and e2 related to those nodes are invalidated.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4612 <method name="is_linked" cv="const"><type>bool</type><description><para><emphasis role="bold">Precondition</emphasis>: <classname alt="boost::intrusive::link_mode">link_mode</classname> must be <computeroutput>safe_link</computeroutput> or <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: true, if the node belongs to a container, false otherwise. This function can be used to test whether <computeroutput>set::iterator_to</computeroutput> will return a valid iterator.</para><para><emphasis role="bold">Complexity</emphasis>: Constant </para></description></method>
4613 <method name="unlink"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Removes the node if it's inserted in a container. This function is only allowed if <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4614 </method-group>
4615 <constructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></constructor>
4616 <constructor><parameter name=""><paramtype>const <classname>set_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing a copy-constructor makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></constructor>
4617 <copy-assignment><type><classname>set_member_hook</classname> &amp;</type><parameter name=""><paramtype>const <classname>set_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Empty function. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing an assignment operator makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></copy-assignment>
4618 <destructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>normal_link</computeroutput>, the destructor does nothing (ie. no code is generated). If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>safe_link</computeroutput> and the object is stored in a set an assertion is raised. If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> and <computeroutput>is_linked()</computeroutput> is true, the node is unlinked.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
4619 </class>
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671 </namespace>
4672 </namespace>
4673 </header>
4674 <header name="boost/intrusive/sg_set.hpp">
4675 <namespace name="boost">
4676 <namespace name="intrusive">
4677 <class name="sg_set"><template>
4678       <template-type-parameter name="T"/>
4679       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4680     </template><description><para>The class template <classname alt="boost::intrusive::sg_set">sg_set</classname> is an intrusive container, that mimics most of the interface of std::sg_set as described in the C++ standard.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>floating_point&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput> and <computeroutput>compare&lt;&gt;</computeroutput>. </para></description><typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
4681 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
4682 <typedef name="key_of_value"><type>implementation_defined::key_of_value</type></typedef>
4683 <typedef name="value_traits"><type>implementation_defined::value_traits</type></typedef>
4684 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
4685 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
4686 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
4687 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
4688 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
4689 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
4690 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
4691 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
4692 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
4693 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
4694 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
4695 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
4696 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
4697 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
4698 <typedef name="node"><type>implementation_defined::node</type></typedef>
4699 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
4700 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
4701 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
4702 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
4703 <method-group name="public member functions">
4704 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4705 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4706 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4707 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4708 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4709 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4710 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4711 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4712 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4713 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4714 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4715 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4716 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4717 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4718 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4719 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
4720 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
4721 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4722 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4723 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>sg_set</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two containers.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
4724 <method name="clone_from"><type>void</type><template>
4725           <template-type-parameter name="Cloner"/>
4726           <template-type-parameter name="Disposer"/>
4727         </template><parameter name="src"><paramtype>const <classname>sg_set</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. Additional notes: it also copies the alpha factor from the source container. </para></description></method>
4728 <method name="clone_from"><type>void</type><template>
4729           <template-type-parameter name="Cloner"/>
4730           <template-type-parameter name="Disposer"/>
4731         </template><parameter name="src"><paramtype><classname>sg_set</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: This version can modify the source container, useful to implement move semantics. Additional notes: it also copies the alpha factor from the source container. </para></description></method>
4732 <method name="insert"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container if the value is not already present.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
4733 <method name="insert"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert x into the container, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time (two comparisons in the worst case) if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
4734 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
4735 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
4736 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
4737           <template-type-parameter name="KeyType"/>
4738           <template-type-parameter name="KeyTypeKeyCompare"/>
4739         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
4740 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
4741           <template-type-parameter name="KeyType"/>
4742           <template-type-parameter name="KeyTypeKeyCompare"/>
4743         </template><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the constructing that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that key to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This can give a total constant-time complexity to the insertion: check(O(1)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
4744 <method name="insert"><type>void</type><template>
4745           <template-type-parameter name="Iterator"/>
4746         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert each element of a range into the container.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
4747 <method name="insert_commit"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue of type value_type. commit_data must have been obtained from a previous call to "insert_check". No objects should have been inserted or erased from the container between the "insert_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the container using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the newly inserted object.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
4748 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
4749 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
4750 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
4751 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4752 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4753 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4754 <method name="erase"><type>size_type</type><template>
4755           <template-type-parameter name="KeyType"/>
4756           <template-type-parameter name="KeyTypeKeyCompare"/>
4757         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4758 <method name="erase_and_dispose"><type>iterator</type><template>
4759           <template-type-parameter name="Disposer"/>
4760         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
4761 <method name="erase_and_dispose"><type>iterator</type><template>
4762           <template-type-parameter name="Disposer"/>
4763         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
4764 <method name="erase_and_dispose"><type>size_type</type><template>
4765           <template-type-parameter name="Disposer"/>
4766         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4767 <method name="erase_and_dispose"><type>size_type</type><template>
4768           <template-type-parameter name="KeyType"/>
4769           <template-type-parameter name="KeyTypeKeyCompare"/>
4770           <template-type-parameter name="Disposer"/>
4771         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk) and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
4772 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4773 <method name="clear_and_dispose"><type>void</type><template>
4774           <template-type-parameter name="Disposer"/>
4775         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
4776 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4777 <method name="count" cv="const"><type>size_type</type><template>
4778           <template-type-parameter name="KeyType"/>
4779           <template-type-parameter name="KeyTypeKeyCompare"/>
4780         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4781 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4782 <method name="lower_bound"><type>iterator</type><template>
4783           <template-type-parameter name="KeyType"/>
4784           <template-type-parameter name="KeyTypeKeyCompare"/>
4785         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4786 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4787 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
4788           <template-type-parameter name="KeyType"/>
4789           <template-type-parameter name="KeyTypeKeyCompare"/>
4790         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4791 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4792 <method name="upper_bound"><type>iterator</type><template>
4793           <template-type-parameter name="KeyType"/>
4794           <template-type-parameter name="KeyTypeKeyCompare"/>
4795         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4796 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4797 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
4798           <template-type-parameter name="KeyType"/>
4799           <template-type-parameter name="KeyTypeKeyCompare"/>
4800         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4801 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4802 <method name="find"><type>iterator</type><template>
4803           <template-type-parameter name="KeyType"/>
4804           <template-type-parameter name="KeyTypeKeyCompare"/>
4805         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4806 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4807 <method name="find" cv="const"><type>const_iterator</type><template>
4808           <template-type-parameter name="KeyType"/>
4809           <template-type-parameter name="KeyTypeKeyCompare"/>
4810         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4811 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4812 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
4813           <template-type-parameter name="KeyType"/>
4814           <template-type-parameter name="KeyTypeKeyCompare"/>
4815         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4816 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4817 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
4818           <template-type-parameter name="KeyType"/>
4819           <template-type-parameter name="KeyTypeKeyCompare"/>
4820         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4821 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
4822 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
4823           <template-type-parameter name="KeyType"/>
4824           <template-type-parameter name="KeyTypeKeyCompare"/>
4825         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
4826 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
4827 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
4828           <template-type-parameter name="KeyType"/>
4829           <template-type-parameter name="KeyTypeKeyCompare"/>
4830         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
4831 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4832 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4833 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
4834 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
4835 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
4836 <method name="rebalance"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Rebalances the tree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear. </para></description></method>
4837 <method name="rebalance_subtree"><type>iterator</type><parameter name="root"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: old_root is a node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Rebalances the subtree rooted at old_root.</para><para><emphasis role="bold">Returns</emphasis>: The new root of the subtree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the elements in the subtree. </para></description></method>
4838 <method name="balance_factor" cv="const"><type>float</type><description><para><emphasis role="bold">Returns</emphasis>: The balance factor (alpha) used in this tree</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
4839 <method name="balance_factor"><type>void</type><parameter name="new_alpha"><paramtype>float</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: new_alpha must be a value between 0.5 and 1.0</para><para><emphasis role="bold">Effects</emphasis>: Establishes a new balance factor (alpha) and rebalances the tree if the new balance factor is stricter (less) than the old factor.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the elements in the subtree. </para></description></method>
4840 <method name="merge"><type>void</type><template>
4841           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
4842         </template><parameter name="source"><paramtype><classname>sg_set</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
4843 <method name="merge"><type>void</type><template>
4844           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
4845         </template><parameter name="source"><paramtype><classname>sg_multiset</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
4846 </method-group>
4847 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
4848 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container with given comparison and traits.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
4849 <constructor><template>
4850           <template-type-parameter name="Iterator"/>
4851         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare object throws. Basic guarantee. </para></description></constructor>
4852 <constructor><parameter name="x"><paramtype><classname>sg_set</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
4853 <copy-assignment><type><classname>sg_set</classname> &amp;</type><parameter name="x"><paramtype><classname>sg_set</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
4854 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
4855 <method-group name="public static functions">
4856 <method name="container_from_end_iterator" specifiers="static"><type><classname>sg_set</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
4857 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>sg_set</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
4858 <method name="container_from_iterator" specifiers="static"><type><classname>sg_set</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
4859 <method name="container_from_iterator" specifiers="static"><type>const <classname>sg_set</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
4860 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
4861 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
4862 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
4863 </method-group>
4864 </class><struct name="make_sg_set"><template>
4865       <template-type-parameter name="T"/>
4866       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4867     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::sg_set">sg_set</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
4868 </struct><class name="sg_multiset"><template>
4869       <template-type-parameter name="T"/>
4870       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
4871     </template><description><para>The class template <classname alt="boost::intrusive::sg_multiset">sg_multiset</classname> is an intrusive container, that mimics most of the interface of std::sg_multiset as described in the C++ standard.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>floating_point&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput> and <computeroutput>compare&lt;&gt;</computeroutput>. </para></description><typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
4872 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
4873 <typedef name="key_of_value"><type>implementation_defined::key_of_value</type></typedef>
4874 <typedef name="value_traits"><type>implementation_defined::value_traits</type></typedef>
4875 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
4876 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
4877 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
4878 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
4879 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
4880 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
4881 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
4882 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
4883 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
4884 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
4885 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
4886 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
4887 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
4888 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
4889 <typedef name="node"><type>implementation_defined::node</type></typedef>
4890 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
4891 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
4892 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
4893 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
4894 <method-group name="public member functions">
4895 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4896 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4897 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4898 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4899 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4900 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4901 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4902 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4903 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4904 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4905 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4906 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4907 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4908 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4909 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4910 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
4911 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
4912 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4913 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
4914 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>sg_multiset</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two containers.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
4915 <method name="clone_from"><type>void</type><template>
4916           <template-type-parameter name="Cloner"/>
4917           <template-type-parameter name="Disposer"/>
4918         </template><parameter name="src"><paramtype>const <classname>sg_multiset</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. Additional notes: it also copies the alpha factor from the source container. </para></description></method>
4919 <method name="clone_from"><type>void</type><template>
4920           <template-type-parameter name="Cloner"/>
4921           <template-type-parameter name="Disposer"/>
4922         </template><parameter name="src"><paramtype><classname>sg_multiset</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: This version can modify the source container, useful to implement move semantics. Additional notes: it also copies the alpha factor from the source container. </para></description></method>
4923 <method name="insert"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container before the upper bound.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
4924 <method name="insert"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator.</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case)</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
4925 <method name="insert"><type>void</type><template>
4926           <template-type-parameter name="Iterator"/>
4927         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Inserts a each element of a range into the container before the upper bound of the key of each element.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
4928 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
4929 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
4930 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
4931 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4932 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4933 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4934 <method name="erase"><type>size_type</type><template>
4935           <template-type-parameter name="KeyType"/>
4936           <template-type-parameter name="KeyTypeKeyCompare"/>
4937         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4938 <method name="erase_and_dispose"><type>iterator</type><template>
4939           <template-type-parameter name="Disposer"/>
4940         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
4941 <method name="erase_and_dispose"><type>iterator</type><template>
4942           <template-type-parameter name="Disposer"/>
4943         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
4944 <method name="erase_and_dispose"><type>size_type</type><template>
4945           <template-type-parameter name="Disposer"/>
4946         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4947 <method name="erase_and_dispose"><type>size_type</type><template>
4948           <template-type-parameter name="KeyType"/>
4949           <template-type-parameter name="KeyTypeKeyCompare"/>
4950           <template-type-parameter name="Disposer"/>
4951         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk) and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
4952 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
4953 <method name="clear_and_dispose"><type>void</type><template>
4954           <template-type-parameter name="Disposer"/>
4955         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
4956 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4957 <method name="count" cv="const"><type>size_type</type><template>
4958           <template-type-parameter name="KeyType"/>
4959           <template-type-parameter name="KeyTypeKeyCompare"/>
4960         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4961 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4962 <method name="lower_bound"><type>iterator</type><template>
4963           <template-type-parameter name="KeyType"/>
4964           <template-type-parameter name="KeyTypeKeyCompare"/>
4965         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4966 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4967 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
4968           <template-type-parameter name="KeyType"/>
4969           <template-type-parameter name="KeyTypeKeyCompare"/>
4970         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4971 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4972 <method name="upper_bound"><type>iterator</type><template>
4973           <template-type-parameter name="KeyType"/>
4974           <template-type-parameter name="KeyTypeKeyCompare"/>
4975         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4976 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4977 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
4978           <template-type-parameter name="KeyType"/>
4979           <template-type-parameter name="KeyTypeKeyCompare"/>
4980         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4981 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4982 <method name="find"><type>iterator</type><template>
4983           <template-type-parameter name="KeyType"/>
4984           <template-type-parameter name="KeyTypeKeyCompare"/>
4985         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4986 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4987 <method name="find" cv="const"><type>const_iterator</type><template>
4988           <template-type-parameter name="KeyType"/>
4989           <template-type-parameter name="KeyTypeKeyCompare"/>
4990         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4991 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4992 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
4993           <template-type-parameter name="KeyType"/>
4994           <template-type-parameter name="KeyTypeKeyCompare"/>
4995         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
4996 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
4997 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
4998           <template-type-parameter name="KeyType"/>
4999           <template-type-parameter name="KeyTypeKeyCompare"/>
5000         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
5001 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
5002 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
5003           <template-type-parameter name="KeyType"/>
5004           <template-type-parameter name="KeyTypeKeyCompare"/>
5005         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
5006 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
5007 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
5008           <template-type-parameter name="KeyType"/>
5009           <template-type-parameter name="KeyTypeKeyCompare"/>
5010         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
5011 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5012 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5013 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
5014 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
5015 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
5016 <method name="rebalance"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Rebalances the tree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear. </para></description></method>
5017 <method name="rebalance_subtree"><type>iterator</type><parameter name="root"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: old_root is a node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Rebalances the subtree rooted at old_root.</para><para><emphasis role="bold">Returns</emphasis>: The new root of the subtree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the elements in the subtree. </para></description></method>
5018 <method name="balance_factor" cv="const"><type>float</type><description><para><emphasis role="bold">Returns</emphasis>: The balance factor (alpha) used in this tree</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5019 <method name="balance_factor"><type>void</type><parameter name="new_alpha"><paramtype>float</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: new_alpha must be a value between 0.5 and 1.0</para><para><emphasis role="bold">Effects</emphasis>: Establishes a new balance factor (alpha) and rebalances the tree if the new balance factor is stricter (less) than the old factor.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the elements in the subtree. </para></description></method>
5020 <method name="merge"><type>void</type><template>
5021           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
5022         </template><parameter name="source"><paramtype><classname>sg_multiset</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
5023 <method name="merge"><type>void</type><template>
5024           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
5025         </template><parameter name="source"><paramtype><classname>sg_set</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
5026 </method-group>
5027 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
5028 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container with given comparison and traits.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
5029 <constructor><template>
5030           <template-type-parameter name="Iterator"/>
5031         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare object throws. Basic guarantee. </para></description></constructor>
5032 <constructor><parameter name="x"><paramtype><classname>sg_multiset</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
5033 <copy-assignment><type><classname>sg_multiset</classname> &amp;</type><parameter name="x"><paramtype><classname>sg_multiset</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
5034 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
5035 <method-group name="public static functions">
5036 <method name="container_from_end_iterator" specifiers="static"><type><classname>sg_multiset</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5037 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>sg_multiset</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5038 <method name="container_from_iterator" specifiers="static"><type><classname>sg_multiset</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
5039 <method name="container_from_iterator" specifiers="static"><type>const <classname>sg_multiset</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
5040 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
5041 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
5042 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
5043 </method-group>
5044 </class><struct name="make_sg_multiset"><template>
5045       <template-type-parameter name="T"/>
5046       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5047     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::sg_multiset">sg_multiset</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
5048 </struct>
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080 <function name="operator!="><type>bool</type><template>
5081           <template-type-parameter name="T"/>
5082           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5083         </template><parameter name="x"><paramtype>const <classname>sg_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>sg_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
5084 <function name="operator&gt;"><type>bool</type><template>
5085           <template-type-parameter name="T"/>
5086           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5087         </template><parameter name="x"><paramtype>const <classname>sg_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>sg_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
5088 <function name="operator&lt;="><type>bool</type><template>
5089           <template-type-parameter name="T"/>
5090           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5091         </template><parameter name="x"><paramtype>const <classname>sg_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>sg_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
5092 <function name="operator&gt;="><type>bool</type><template>
5093           <template-type-parameter name="T"/>
5094           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5095         </template><parameter name="x"><paramtype>const <classname>sg_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>sg_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
5096 <function name="swap"><type>void</type><template>
5097           <template-type-parameter name="T"/>
5098           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5099         </template><parameter name="x"><paramtype><classname>sg_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype><classname>sg_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
5100 <function name="operator!="><type>bool</type><template>
5101           <template-type-parameter name="T"/>
5102           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5103         </template><parameter name="x"><paramtype>const <classname>sg_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>sg_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
5104 <function name="operator&gt;"><type>bool</type><template>
5105           <template-type-parameter name="T"/>
5106           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5107         </template><parameter name="x"><paramtype>const <classname>sg_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>sg_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
5108 <function name="operator&lt;="><type>bool</type><template>
5109           <template-type-parameter name="T"/>
5110           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5111         </template><parameter name="x"><paramtype>const <classname>sg_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>sg_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
5112 <function name="operator&gt;="><type>bool</type><template>
5113           <template-type-parameter name="T"/>
5114           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5115         </template><parameter name="x"><paramtype>const <classname>sg_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>sg_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
5116 <function name="swap"><type>void</type><template>
5117           <template-type-parameter name="T"/>
5118           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5119         </template><parameter name="x"><paramtype><classname>sg_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype><classname>sg_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130 </namespace>
5131 </namespace>
5132 </header>
5133 <header name="boost/intrusive/sgtree.hpp">
5134 <namespace name="boost">
5135 <namespace name="intrusive">
5136 <class name="sgtree"><template>
5137       <template-type-parameter name="T"/>
5138       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5139     </template><description><para>The class template sgtree is an intrusive scapegoat tree container, that is used to construct intrusive <classname alt="boost::intrusive::sg_set">sg_set</classname> and <classname alt="boost::intrusive::sg_multiset">sg_multiset</classname> containers. The no-throw guarantee holds only, if the value_compare object doesn't throw.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>floating_point&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput> and <computeroutput>compare&lt;&gt;</computeroutput>. </para></description><typedef name="value_traits"><type>ValueTraits</type></typedef>
5140 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
5141 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
5142 <typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
5143 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
5144 <typedef name="key_of_value"><type>implementation_defined::key_of_value</type></typedef>
5145 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
5146 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
5147 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
5148 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
5149 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
5150 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
5151 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
5152 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
5153 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
5154 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
5155 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
5156 <typedef name="node"><type>implementation_defined::node</type></typedef>
5157 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
5158 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
5159 <typedef name="node_algorithms"><type>implementation_defined</type></typedef>
5160 <typedef name="insert_commit_data"><type>implementation_defined</type></typedef>
5161 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
5162 <data-member name="floating_point" specifiers="static"><type>const bool</type></data-member>
5163 <data-member name="stateful_value_traits" specifiers="static"><type>const bool</type></data-member>
5164 <method-group name="public member functions">
5165 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5166 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5167 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5168 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5169 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5170 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5171 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5172 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5173 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5174 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5175 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5176 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5177 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5178 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5179 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5180 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
5181 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
5182 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5183 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5184 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>sgtree</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two containers.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
5185 <method name="clone_from"><type>void</type><template>
5186           <template-type-parameter name="Cloner"/>
5187           <template-type-parameter name="Disposer"/>
5188         </template><parameter name="src"><paramtype>const <classname>sgtree</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. Additional notes: it also copies the alpha factor from the source container. </para></description></method>
5189 <method name="clone_from"><type>void</type><template>
5190           <template-type-parameter name="Cloner"/>
5191           <template-type-parameter name="Disposer"/>
5192         </template><parameter name="src"><paramtype><classname>sgtree</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: This version can modify the source container, useful to implement move semantics. Additional notes: it also copies the alpha factor from the source container. </para></description></method>
5193 <method name="insert_equal"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container before the upper bound.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
5194 <method name="insert_equal"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator.</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case)</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
5195 <method name="insert_equal"><type>void</type><template>
5196           <template-type-parameter name="Iterator"/>
5197         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Inserts a each element of a range into the container before the upper bound of the key of each element.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
5198 <method name="insert_unique"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container if the value is not already present.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
5199 <method name="insert_unique"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert x into the container, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time (two comparisons in the worst case) if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
5200 <method name="insert_unique_check"><type>std::pair&lt; iterator BOOST_INTRUSIVE_I bool &gt;</type><template>
5201           <template-type-parameter name="KeyType"/>
5202           <template-type-parameter name="KeyTypeKeyCompare"/>
5203         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
5204 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
5205           <template-type-parameter name="KeyType"/>
5206           <template-type-parameter name="KeyTypeKeyCompare"/>
5207         </template><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the constructing that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that key to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This can give a total constant-time complexity to the insertion: check(O(1)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
5208 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
5209 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
5210 <method name="insert_unique_commit"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue of type value_type. commit_data must have been obtained from a previous call to "insert_check". No objects should have been inserted or erased from the container between the "insert_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the container using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the newly inserted object.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
5211 <method name="insert_unique"><type>void</type><template>
5212           <template-type-parameter name="Iterator"/>
5213         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert each element of a range into the container.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
5214 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
5215 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
5216 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
5217 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
5218 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
5219 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
5220 <method name="erase"><type>size_type</type><template>
5221           <template-type-parameter name="KeyType"/>
5222           <template-type-parameter name="KeyTypeKeyCompare"/>
5223         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
5224 <method name="erase_and_dispose"><type>iterator</type><template>
5225           <template-type-parameter name="Disposer"/>
5226         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
5227 <method name="erase_and_dispose"><type>iterator</type><template>
5228           <template-type-parameter name="Disposer"/>
5229         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
5230 <method name="erase_and_dispose"><type>size_type</type><template>
5231           <template-type-parameter name="Disposer"/>
5232         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
5233 <method name="erase_and_dispose"><type>size_type</type><template>
5234           <template-type-parameter name="KeyType"/>
5235           <template-type-parameter name="KeyTypeKeyCompare"/>
5236           <template-type-parameter name="Disposer"/>
5237         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk) and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
5238 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
5239 <method name="clear_and_dispose"><type>void</type><template>
5240           <template-type-parameter name="Disposer"/>
5241         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
5242 <method name="merge_unique"><type>void</type><template>
5243           <template-type-parameter name="T"/>
5244           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
5245         </template><parameter name=""><paramtype><classname>sgtree</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
5246 <method name="while"><type/><parameter name=""><paramtype>it!</paramtype><default>itend</default></parameter></method>
5247 <method name="merge_equal"><type>void</type><template>
5248           <template-type-parameter name="T"/>
5249           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
5250         </template><parameter name=""><paramtype><classname>sgtree</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Extracts each element in source and insert it into a using the comparison object of *this.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
5251 <method name="while"><type/><parameter name=""><paramtype>it!</paramtype><default>itend</default></parameter></method>
5252 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
5253 <method name="count" cv="const"><type>size_type</type><template>
5254           <template-type-parameter name="KeyType"/>
5255           <template-type-parameter name="KeyTypeKeyCompare"/>
5256         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
5257 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
5258 <method name="lower_bound"><type>iterator</type><template>
5259           <template-type-parameter name="KeyType"/>
5260           <template-type-parameter name="KeyTypeKeyCompare"/>
5261         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
5262 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
5263 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
5264           <template-type-parameter name="KeyType"/>
5265           <template-type-parameter name="KeyTypeKeyCompare"/>
5266         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
5267 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
5268 <method name="upper_bound"><type>iterator</type><template>
5269           <template-type-parameter name="KeyType"/>
5270           <template-type-parameter name="KeyTypeKeyCompare"/>
5271         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
5272 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
5273 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
5274           <template-type-parameter name="KeyType"/>
5275           <template-type-parameter name="KeyTypeKeyCompare"/>
5276         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
5277 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
5278 <method name="find"><type>iterator</type><template>
5279           <template-type-parameter name="KeyType"/>
5280           <template-type-parameter name="KeyTypeKeyCompare"/>
5281         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
5282 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
5283 <method name="find" cv="const"><type>const_iterator</type><template>
5284           <template-type-parameter name="KeyType"/>
5285           <template-type-parameter name="KeyTypeKeyCompare"/>
5286         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
5287 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
5288 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
5289           <template-type-parameter name="KeyType"/>
5290           <template-type-parameter name="KeyTypeKeyCompare"/>
5291         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
5292 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
5293 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
5294           <template-type-parameter name="KeyType"/>
5295           <template-type-parameter name="KeyTypeKeyCompare"/>
5296         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
5297 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
5298 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
5299           <template-type-parameter name="KeyType"/>
5300           <template-type-parameter name="KeyTypeKeyCompare"/>
5301         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
5302 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
5303 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
5304           <template-type-parameter name="KeyType"/>
5305           <template-type-parameter name="KeyTypeKeyCompare"/>
5306         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
5307 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5308 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5309 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
5310 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
5311 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
5312 <method name="rebalance"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Rebalances the tree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear. </para></description></method>
5313 <method name="rebalance_subtree"><type>iterator</type><parameter name="root"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: old_root is a node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Rebalances the subtree rooted at old_root.</para><para><emphasis role="bold">Returns</emphasis>: The new root of the subtree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the elements in the subtree. </para></description></method>
5314 <method name="balance_factor" cv="const"><type>float</type><description><para><emphasis role="bold">Returns</emphasis>: The balance factor (alpha) used in this tree</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5315 <method name="balance_factor"><type>void</type><parameter name="new_alpha"><paramtype>float</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: new_alpha must be a value between 0.5 and 1.0</para><para><emphasis role="bold">Effects</emphasis>: Establishes a new balance factor (alpha) and rebalances the tree if the new balance factor is stricter (less) than the old factor.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the elements in the subtree. </para></description></method>
5316 </method-group>
5317 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
5318 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container with given comparison and traits.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
5319 <constructor><template>
5320           <template-type-parameter name="Iterator"/>
5321         </template><parameter name="unique"><paramtype>bool</paramtype></parameter><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare object throws. Basic guarantee. </para></description></constructor>
5322 <constructor><parameter name="x"><paramtype><classname>sgtree</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
5323 <copy-assignment><type><classname>sgtree</classname> &amp;</type><parameter name="x"><paramtype><classname>sgtree</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
5324 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
5325 <method-group name="public static functions">
5326 <method name="container_from_end_iterator" specifiers="static"><type><classname>sgtree</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5327 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>sgtree</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5328 <method name="container_from_iterator" specifiers="static"><type><classname>sgtree</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
5329 <method name="container_from_iterator" specifiers="static"><type>const <classname>sgtree</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
5330 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
5331 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
5332 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
5333 </method-group>
5334 </class><struct name="make_sgtree"><template>
5335       <template-type-parameter name="T"/>
5336       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5337     </template><description><para>Helper metafunction to define a <computeroutput>sgtree</computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
5338 </struct>
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390 </namespace>
5391 </namespace>
5392 </header>
5393 <header name="boost/intrusive/sgtree_algorithms.hpp">
5394 <namespace name="boost">
5395 <namespace name="intrusive">
5396 <class name="sgtree_algorithms"><template>
5397       <template-type-parameter name="NodeTraits"/>
5398     </template><description><para><classname alt="boost::intrusive::sgtree_algorithms">sgtree_algorithms</classname> is configured with a NodeTraits class, which encapsulates the information about the node to be manipulated. NodeTraits must support the following interface:</para><para><emphasis role="bold">Typedefs</emphasis>:</para><para><computeroutput>node</computeroutput>: The type of the node that forms the binary search tree</para><para><computeroutput>node_ptr</computeroutput>: A pointer to a node</para><para><computeroutput>const_node_ptr</computeroutput>: A pointer to a const node</para><para><emphasis role="bold">Static functions</emphasis>:</para><para><computeroutput>static node_ptr get_parent(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_parent(node_ptr n, node_ptr parent);</computeroutput></para><para><computeroutput>static node_ptr get_left(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_left(node_ptr n, node_ptr left);</computeroutput></para><para><computeroutput>static node_ptr get_right(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_right(node_ptr n, node_ptr right);</computeroutput> </para></description><struct name="insert_commit_data"><inherit access="public">insert_commit_data</inherit><description><para>This type is the information that will be filled by insert_unique_check </para></description><data-member name="depth"><type>std::size_t</type></data-member>
5399 </struct><typedef name="node"><type>NodeTraits::node</type></typedef>
5400 <typedef name="node_traits"><type>NodeTraits</type></typedef>
5401 <typedef name="node_ptr"><type>NodeTraits::node_ptr</type></typedef>
5402 <typedef name="const_node_ptr"><type>NodeTraits::const_node_ptr</type></typedef>
5403 <method-group name="public static functions">
5404 <method name="get_header" specifiers="static"><type>node_ptr</type><parameter name="n"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node of the tree or a header node.</para><para><emphasis role="bold">Effects</emphasis>: Returns the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5405 <method name="begin_node" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'header' is the header node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns the first node of the tree, the header if the tree is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5406 <method name="end_node" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'header' is the header node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5407 <method name="swap_tree" specifiers="static"><type>void</type><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the header nodes of two trees.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two trees. After the function header1 will contain links to the second tree and header2 will have links to the first tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5408 <method name="swap_nodes" specifiers="static"><type>void</type><parameter name="node1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="node2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node1 and node2 can't be header nodes of two trees.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two nodes. After the function node1 will be inserted in the position node2 before the function. node2 will be inserted in the position node1 had before the function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if node1 and node2 are not equivalent according to the ordering rules.</para><para>Experimental function </para></description></method>
5409 <method name="swap_nodes" specifiers="static"><type>void</type><parameter name="node1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="node2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node1 and node2 can't be header nodes of two trees with header header1 and header2.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two nodes. After the function node1 will be inserted in the position node2 before the function. node2 will be inserted in the position node1 had before the function.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if node1 and node2 are not equivalent according to the ordering rules.</para><para>Experimental function </para></description></method>
5410 <method name="replace_node" specifiers="static"><type>void</type><parameter name="node_to_be_replaced"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node_to_be_replaced must be inserted in a tree and new_node must not be inserted in a tree.</para><para><emphasis role="bold">Effects</emphasis>: Replaces node_to_be_replaced in its position in the tree with new_node. The tree does not need to be rebalanced</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if new_node is not equivalent to node_to_be_replaced according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing and comparison is needed. Experimental function </para></description></method>
5411 <method name="replace_node" specifiers="static"><type>void</type><parameter name="node_to_be_replaced"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node_to_be_replaced must be inserted in a tree with header "header" and new_node must not be inserted in a tree.</para><para><emphasis role="bold">Effects</emphasis>: Replaces node_to_be_replaced in its position in the tree with new_node. The tree does not need to be rebalanced</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if new_node is not equivalent to node_to_be_replaced according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. Experimental function </para></description></method>
5412 <method name="unlink_leftmost_without_rebalance" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><purpose>static void unlink(const node_ptr &amp; node); </purpose><description><para><emphasis role="bold">Requires</emphasis>: header is the header of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the tree, and updates the header link to the new leftmost node.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the tree and the tree can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the tree. </para></description></method>
5413 <method name="unique" specifiers="static"><type>bool</type><parameter name="node"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node of the tree or a node initialized by init(...) or init_node.</para><para><emphasis role="bold">Effects</emphasis>: Returns true if the node is initialized by init() or init_node().</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5414 <method name="size" specifiers="static"><type>std::size_t</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node is a node of the tree but it's not the header.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of nodes of the subtree.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5415 <method name="next_node" specifiers="static"><type>node_ptr</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node from the tree except the header.</para><para><emphasis role="bold">Effects</emphasis>: Returns the next node of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5416 <method name="prev_node" specifiers="static"><type>node_ptr</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node from the tree except the leftmost node.</para><para><emphasis role="bold">Effects</emphasis>: Returns the previous node of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5417 <method name="init" specifiers="static"><type>void</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' must not be part of any tree.</para><para><emphasis role="bold">Effects</emphasis>: After the function unique(node) == true.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Nodes</emphasis>: If node is inserted in a tree, this function corrupts the tree. </para></description></method>
5418 <method name="init_header" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node must not be part of any tree.</para><para><emphasis role="bold">Effects</emphasis>: Initializes the header to represent an empty tree. unique(header) == true.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Nodes</emphasis>: If node is inserted in a tree, this function corrupts the tree. </para></description></method>
5419 <method name="erase" specifiers="static"><type>node_ptr</type><template>
5420           <template-type-parameter name="AlphaByMaxSize"/>
5421         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="tree_size"><paramtype>std::size_t</paramtype></parameter><parameter name="max_tree_size"><paramtype>std::size_t &amp;</paramtype></parameter><parameter name="alpha_by_maxsize"><paramtype>AlphaByMaxSize</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header must be the header of a tree, z a node of that tree and z != header.</para><para><emphasis role="bold">Effects</emphasis>: Erases node "z" from the tree with header "header".</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5422 <method name="clone" specifiers="static"><type>void</type><template>
5423           <template-type-parameter name="Cloner"/>
5424           <template-type-parameter name="Disposer"/>
5425         </template><parameter name="source_header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="target_header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "cloner" must be a function object taking a node_ptr and returning a new cloned node of it. "disposer" must take a node_ptr and shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: First empties target tree calling <computeroutput>void disposer::operator()(const node_ptr &amp;)</computeroutput> for every node of the tree except the header.</para><para>Then, duplicates the entire tree pointed by "source_header" cloning each source node with <computeroutput>node_ptr Cloner::operator()(const node_ptr &amp;)</computeroutput> to obtain the nodes of the target tree. If "cloner" throws, the cloned target nodes are disposed using <computeroutput>void disposer(const node_ptr &amp;)</computeroutput>.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of element of the source tree plus the number of elements of tree target tree when calling this function.</para><para><emphasis role="bold">Throws</emphasis>: If cloner functor throws. If this happens target nodes are disposed. </para></description></method>
5426 <method name="clear_and_dispose" specifiers="static"><type>void</type><template>
5427           <template-type-parameter name="Disposer"/>
5428         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "disposer" must be an object function taking a node_ptr parameter and shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Empties the target tree calling <computeroutput>void disposer::operator()(const node_ptr &amp;)</computeroutput> for every node of the tree except the header.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of element of the source tree plus the. number of elements of tree target tree when calling this function.</para><para><emphasis role="bold">Throws</emphasis>: If cloner functor throws. If this happens target nodes are disposed. </para></description></method>
5429 <method name="lower_bound" specifiers="static"><type>node_ptr</type><template>
5430           <template-type-parameter name="KeyType"/>
5431           <template-type-parameter name="KeyNodePtrCompare"/>
5432         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is not less than "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
5433 <method name="upper_bound" specifiers="static"><type>node_ptr</type><template>
5434           <template-type-parameter name="KeyType"/>
5435           <template-type-parameter name="KeyNodePtrCompare"/>
5436         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is greater than "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
5437 <method name="find" specifiers="static"><type>node_ptr</type><template>
5438           <template-type-parameter name="KeyType"/>
5439           <template-type-parameter name="KeyNodePtrCompare"/>
5440         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is equivalent to "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
5441 <method name="equal_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
5442           <template-type-parameter name="KeyType"/>
5443           <template-type-parameter name="KeyNodePtrCompare"/>
5444         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair of node_ptr delimiting a range containing all elements that are equivalent to "key" according to "comp" or an empty range that indicates the position where those elements would be if there are no equivalent elements.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
5445 <method name="bounded_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
5446           <template-type-parameter name="KeyType"/>
5447           <template-type-parameter name="KeyNodePtrCompare"/>
5448         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. 'lower_key' must not be greater than 'upper_key' according to 'comp'. If 'lower_key' == 'upper_key', ('left_closed' || 'right_closed') must be true.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change. </para></description></method>
5449 <method name="count" specifiers="static"><type>std::size_t</type><template>
5450           <template-type-parameter name="KeyType"/>
5451           <template-type-parameter name="KeyNodePtrCompare"/>
5452         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements with a key equivalent to "key" according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
5453 <method name="insert_equal_upper_bound" specifiers="static"><type>node_ptr</type><template>
5454           <template-type-parameter name="NodePtrCompare"/>
5455           <template-type-parameter name="H_Alpha"/>
5456         </template><parameter name="h"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="tree_size"><paramtype>std::size_t</paramtype></parameter><parameter name="h_alpha"><paramtype>H_Alpha</paramtype></parameter><parameter name="max_tree_size"><paramtype>std::size_t &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "h" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before the upper bound according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
5457 <method name="insert_equal_lower_bound" specifiers="static"><type>node_ptr</type><template>
5458           <template-type-parameter name="NodePtrCompare"/>
5459           <template-type-parameter name="H_Alpha"/>
5460         </template><parameter name="h"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="tree_size"><paramtype>std::size_t</paramtype></parameter><parameter name="h_alpha"><paramtype>H_Alpha</paramtype></parameter><parameter name="max_tree_size"><paramtype>std::size_t &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "h" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before the lower bound according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
5461 <method name="insert_equal" specifiers="static"><type>node_ptr</type><template>
5462           <template-type-parameter name="NodePtrCompare"/>
5463           <template-type-parameter name="H_Alpha"/>
5464         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="hint"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="tree_size"><paramtype>std::size_t</paramtype></parameter><parameter name="h_alpha"><paramtype>H_Alpha</paramtype></parameter><parameter name="max_tree_size"><paramtype>std::size_t &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs. "hint" is node from the "header"'s tree.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case).</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if new_node is inserted immediately before "hint".</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
5465 <method name="insert_before" specifiers="static"><type>node_ptr</type><template>
5466           <template-type-parameter name="H_Alpha"/>
5467         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="pos"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="tree_size"><paramtype>std::size_t</paramtype></parameter><parameter name="h_alpha"><paramtype>H_Alpha</paramtype></parameter><parameter name="max_tree_size"><paramtype>std::size_t &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "pos" must be a valid iterator or header (end) node. "pos" must be an iterator pointing to the successor to "new_node" once inserted according to the order of already inserted nodes. This function does not check "pos" and this precondition must be guaranteed by the caller.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: If "pos" is not the successor of the newly inserted "new_node" tree invariants might be broken. </para></description></method>
5468 <method name="push_back" specifiers="static"><type>void</type><template>
5469           <template-type-parameter name="H_Alpha"/>
5470         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="tree_size"><paramtype>std::size_t</paramtype></parameter><parameter name="h_alpha"><paramtype>H_Alpha</paramtype></parameter><parameter name="max_tree_size"><paramtype>std::size_t &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "new_node" must be, according to the used ordering no less than the greatest inserted key.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: If "new_node" is less than the greatest inserted key tree invariants are broken. This function is slightly faster than using "insert_before". </para></description></method>
5471 <method name="push_front" specifiers="static"><type>void</type><template>
5472           <template-type-parameter name="H_Alpha"/>
5473         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="tree_size"><paramtype>std::size_t</paramtype></parameter><parameter name="h_alpha"><paramtype>H_Alpha</paramtype></parameter><parameter name="max_tree_size"><paramtype>std::size_t &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "new_node" must be, according to the used ordering, no greater than the lowest inserted key.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: If "new_node" is greater than the lowest inserted key tree invariants are broken. This function is slightly faster than using "insert_before". </para></description></method>
5474 <method name="insert_unique_check" specifiers="static"><type>std::pair&lt; node_ptr, bool &gt;</type><template>
5475           <template-type-parameter name="KeyType"/>
5476           <template-type-parameter name="KeyNodePtrCompare"/>
5477         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="commit_data"><paramtype><classname>insert_commit_data</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares KeyType with a node_ptr.</para><para><emphasis role="bold">Effects</emphasis>: Checks if there is an equivalent node to "key" in the tree according to "comp" and obtains the needed information to realize a constant-time node insertion if there is no equivalent node.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing a node_ptr to the already present node and false. If there is not equivalent key can be inserted returns true in the returned pair's boolean and fills "commit_data" that is meant to be used with the "insert_commit" function to achieve a constant-time insertion function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a node is expensive and the user does not want to have two equivalent nodes in the tree: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the node and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the node and use "insert_commit" to insert the node in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_unique_commit" only if no more objects are inserted or erased from the set. </para></description></method>
5478 <method name="insert_unique_check" specifiers="static"><type>std::pair&lt; node_ptr, bool &gt;</type><template>
5479           <template-type-parameter name="KeyType"/>
5480           <template-type-parameter name="KeyNodePtrCompare"/>
5481         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="hint"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="commit_data"><paramtype><classname>insert_commit_data</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares KeyType with a node_ptr. "hint" is node from the "header"'s tree.</para><para><emphasis role="bold">Effects</emphasis>: Checks if there is an equivalent node to "key" in the tree according to "comp" using "hint" as a hint to where it should be inserted and obtains the needed information to realize a constant-time node insertion if there is no equivalent node. If "hint" is the upper_bound the function has constant time complexity (two comparisons in the worst case).</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing a node_ptr to the already present node and false. If there is not equivalent key can be inserted returns true in the returned pair's boolean and fills "commit_data" that is meant to be used with the "insert_commit" function to achieve a constant-time insertion function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic, but it is amortized constant time if new_node should be inserted immediately before "hint".</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a node is expensive and the user does not want to have two equivalent nodes in the tree: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the node and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the node and use "insert_commit" to insert the node in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_unique_commit" only if no more objects are inserted or erased from the set. </para></description></method>
5482 <method name="insert_unique_commit" specifiers="static"><type>void</type><template>
5483           <template-type-parameter name="H_Alpha"/>
5484         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_value"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>const <classname>insert_commit_data</classname> &amp;</paramtype></parameter><parameter name="tree_size"><paramtype>std::size_t</paramtype></parameter><parameter name="h_alpha"><paramtype>H_Alpha</paramtype></parameter><parameter name="max_tree_size"><paramtype>std::size_t &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "commit_data" must have been obtained from a previous call to "insert_unique_check". No objects should have been inserted or erased from the set between the "insert_unique_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node in the set using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_unique_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
5485 <method name="transfer_unique" specifiers="static"><type>bool</type><template>
5486           <template-type-parameter name="NodePtrCompare"/>
5487           <template-type-parameter name="H_Alpha"/>
5488           <template-type-parameter name="AlphaByMaxSize"/>
5489         </template><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="tree1_size"><paramtype>std::size_t</paramtype></parameter><parameter name="max_tree1_size"><paramtype>std::size_t &amp;</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="tree2_size"><paramtype>std::size_t</paramtype></parameter><parameter name="max_tree2_size"><paramtype>std::size_t &amp;</paramtype></parameter><parameter name="h_alpha"><paramtype>H_Alpha</paramtype></parameter><parameter name="alpha_by_maxsize"><paramtype>AlphaByMaxSize</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the headers of trees tree1 and tree2 respectively, z a non-header node of tree1. NodePtrCompare is the comparison function of tree1..</para><para><emphasis role="bold">Effects</emphasis>: Transfers node "z" from tree1 to tree2 if tree1 does not contain a node that is equivalent to z.</para><para><emphasis role="bold">Returns</emphasis>: True if the node was trasferred, false otherwise.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison throws. </para></description></method>
5490 <method name="transfer_equal" specifiers="static"><type>void</type><template>
5491           <template-type-parameter name="NodePtrCompare"/>
5492           <template-type-parameter name="H_Alpha"/>
5493           <template-type-parameter name="AlphaByMaxSize"/>
5494         </template><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="tree1_size"><paramtype>std::size_t</paramtype></parameter><parameter name="max_tree1_size"><paramtype>std::size_t &amp;</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="tree2_size"><paramtype>std::size_t</paramtype></parameter><parameter name="max_tree2_size"><paramtype>std::size_t &amp;</paramtype></parameter><parameter name="h_alpha"><paramtype>H_Alpha</paramtype></parameter><parameter name="alpha_by_maxsize"><paramtype>AlphaByMaxSize</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the headers of trees tree1 and tree2 respectively, z a non-header node of tree1. NodePtrCompare is the comparison function of tree1..</para><para><emphasis role="bold">Effects</emphasis>: Transfers node "z" from tree1 to tree2.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison throws. </para></description></method>
5495 <method name="is_header" specifiers="static"><type>bool</type><parameter name="p"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: p is a node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns true if p is the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5496 <method name="rebalance" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: p is a node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns true if p is the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5497 </method-group>
5498 </class>
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550 </namespace>
5551 </namespace>
5552 </header>
5553 <header name="boost/intrusive/slist.hpp">
5554 <namespace name="boost">
5555 <namespace name="intrusive">
5556 <class name="slist"><template>
5557       <template-type-parameter name="T"/>
5558       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5559     </template><description><para>The class template slist is an intrusive container, that encapsulates a singly-linked list. You can use such a list to squeeze the last bit of performance from your application. Unfortunately, the little gains come with some huge drawbacks. A lot of member functions can't be implemented as efficiently as for standard containers. To overcome this limitation some other member functions with rather unusual semantics have to be introduced.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput>, <computeroutput>linear&lt;&gt;</computeroutput> and <computeroutput>cache_last&lt;&gt;</computeroutput>.</para><para>The iterators of slist are forward iterators. slist provides a static function called "previous" to compute the previous iterator of a given iterator. This function has linear complexity. To improve the usability esp. with the '*_after' functions, ++end() == begin() and previous(begin()) == end() are defined. An new special function "before_begin()" is defined, which returns an iterator that points one less the beginning of the list: ++before_begin() == begin() </para></description><typedef name="value_traits"><type>ValueTraits</type></typedef>
5560 <typedef name="pointer"><type>value_traits::pointer</type></typedef>
5561 <typedef name="const_pointer"><type>value_traits::const_pointer</type></typedef>
5562 <typedef name="value_type"><type><classname>pointer_traits</classname>&lt; pointer &gt;::element_type</type></typedef>
5563 <typedef name="reference"><type><classname>pointer_traits</classname>&lt; pointer &gt;::reference</type></typedef>
5564 <typedef name="const_reference"><type><classname>pointer_traits</classname>&lt; const_pointer &gt;::reference</type></typedef>
5565 <typedef name="difference_type"><type><classname>pointer_traits</classname>&lt; pointer &gt;::difference_type</type></typedef>
5566 <typedef name="size_type"><type>SizeType</type></typedef>
5567 <typedef name="iterator"><type>slist_iterator&lt; value_traits, false &gt;</type></typedef>
5568 <typedef name="const_iterator"><type>slist_iterator&lt; value_traits, true &gt;</type></typedef>
5569 <typedef name="node_traits"><type>value_traits::node_traits</type></typedef>
5570 <typedef name="node"><type>node_traits::node</type></typedef>
5571 <typedef name="node_ptr"><type>node_traits::node_ptr</type></typedef>
5572 <typedef name="const_node_ptr"><type>node_traits::const_node_ptr</type></typedef>
5573 <typedef name="header_holder_type"><type><emphasis>unspecified</emphasis></type></typedef>
5574 <typedef name="node_algorithms"><type><emphasis>unspecified</emphasis></type></typedef>
5575 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
5576 <data-member name="stateful_value_traits" specifiers="static"><type>const bool</type></data-member>
5577 <data-member name="linear" specifiers="static"><type>const bool</type></data-member>
5578 <data-member name="cache_last" specifiers="static"><type>const bool</type></data-member>
5579 <data-member name="has_container_from_iterator" specifiers="static"><type>const bool</type></data-member>
5580 <method-group name="public member functions">
5581 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements of the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements of the list. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. </para></description></method>
5582 <method name="clear_and_dispose"><type>void</type><template>
5583           <template-type-parameter name="Disposer"/>
5584         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements of the container Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements of the list.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
5585 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue.</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the front of the list. No copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
5586 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue.</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the back of the list. No copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. This function is only available is cache_last&lt;&gt; is true. </para></description></method>
5587 <method name="pop_front"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases the first element of the list. No destructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased element. </para></description></method>
5588 <method name="pop_front_and_dispose"><type>void</type><template>
5589           <template-type-parameter name="Disposer"/>
5590         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the first element of the list. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased element. </para></description></method>
5591 <method name="front"><type>reference</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reference to the first element of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5592 <method name="front" cv="const"><type>const_reference</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reference to the first element of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5593 <method name="back"><type>reference</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reference to the last element of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. This function is only available is cache_last&lt;&gt; is true. </para></description></method>
5594 <method name="back" cv="const"><type>const_reference</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reference to the last element of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. This function is only available is cache_last&lt;&gt; is true. </para></description></method>
5595 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element contained in the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5596 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator to the first element contained in the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5597 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator to the first element contained in the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5598 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the end of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5599 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator to the end of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5600 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator to the end of the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5601 <method name="before_begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator that points to a position before the first element. Equivalent to "end()"</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5602 <method name="before_begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator that points to a position before the first element. Equivalent to "end()"</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5603 <method name="cbefore_begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator that points to a position before the first element. Equivalent to "end()"</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5604 <method name="last"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the last element contained in the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: This function is present only if cached_last&lt;&gt; option is true. </para></description></method>
5605 <method name="last" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator to the last element contained in the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: This function is present only if cached_last&lt;&gt; option is true. </para></description></method>
5606 <method name="clast" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator to the last element contained in the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: This function is present only if cached_last&lt;&gt; option is true. </para></description></method>
5607 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of the elements contained in the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements contained in the list. if <classname alt="boost::intrusive::constant_time_size">constant_time_size</classname> is false. Constant time otherwise.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
5608 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the list contains no elements.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
5609 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>slist</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the elements of x and *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements of both lists. Constant-time if linear&lt;&gt; and/or cache_last&lt;&gt; options are used.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
5610 <method name="shift_backwards"><type>void</type><parameter name="n"><paramtype>size_type</paramtype><default>1</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Moves backwards all the elements, so that the first element becomes the second, the second becomes the third... the last element becomes the first one.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements plus the number shifts.</para><para><emphasis role="bold">Note</emphasis>: Iterators Does not affect the validity of iterators and references. </para></description></method>
5611 <method name="shift_forward"><type>void</type><parameter name="n"><paramtype>size_type</paramtype><default>1</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Moves forward all the elements, so that the second element becomes the first, the third becomes the second... the first element becomes the last one.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements plus the number shifts.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
5612 <method name="clone_from"><type>void</type><template>
5613           <template-type-parameter name="Cloner"/>
5614           <template-type-parameter name="Disposer"/>
5615         </template><parameter name="src"><paramtype>const <classname>slist</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws. </para></description></method>
5616 <method name="clone_from"><type>void</type><template>
5617           <template-type-parameter name="Cloner"/>
5618           <template-type-parameter name="Disposer"/>
5619         </template><parameter name="src"><paramtype><classname>slist</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws. </para></description></method>
5620 <method name="insert_after"><type>iterator</type><parameter name="prev_p"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and prev_p must point to an element contained by the list or to end().</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value after the position pointed by prev_p. No copy constructor is called.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the inserted element.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
5621 <method name="insert_after"><type>void</type><template>
5622           <template-type-parameter name="Iterator"/>
5623         </template><parameter name="prev_p"><paramtype>const_iterator</paramtype></parameter><parameter name="f"><paramtype>Iterator</paramtype></parameter><parameter name="l"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type and prev_p must point to an element contained by the list or to the end node.</para><para><emphasis role="bold">Effects</emphasis>: Inserts the [f, l) after the position prev_p.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements inserted.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
5624 <method name="insert"><type>iterator</type><parameter name="p"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and p must point to an element contained by the list or to end().</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value before the position pointed by p. No copy constructor is called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements before p. Constant-time if cache_last&lt;&gt; is true and p == end().</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
5625 <method name="insert"><type>void</type><template>
5626           <template-type-parameter name="Iterator"/>
5627         </template><parameter name="p"><paramtype>const_iterator</paramtype></parameter><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type and p must point to an element contained by the list or to the end node.</para><para><emphasis role="bold">Effects</emphasis>: Inserts the pointed by b and e before the position p. No copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements inserted plus linear to the elements before b. Linear to the number of elements to insert if cache_last&lt;&gt; option is true and p == end().</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. </para></description></method>
5628 <method name="erase_after"><type>iterator</type><parameter name="prev"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element after the element pointed by prev of the list. No destructors are called.</para><para><emphasis role="bold">Returns</emphasis>: the first element remaining beyond the removed elements, or end() if no such element exists.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased element. </para></description></method>
5629 <method name="erase_after"><type>iterator</type><parameter name="before_f"><paramtype>const_iterator</paramtype></parameter><parameter name="l"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range (before_f, l) from the list. No destructors are called.</para><para><emphasis role="bold">Returns</emphasis>: the first element remaining beyond the removed elements, or end() if no such element exists.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of erased elements if it's a safe-mode , auto-unlink value or constant-time size is activated. Constant time otherwise.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased element. </para></description></method>
5630 <method name="erase_after"><type>iterator</type><parameter name="before_f"><paramtype>const_iterator</paramtype></parameter><parameter name="l"><paramtype>const_iterator</paramtype></parameter><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range (before_f, l) from the list. n must be distance(before_f, l) - 1. No destructors are called.</para><para><emphasis role="bold">Returns</emphasis>: the first element remaining beyond the removed elements, or end() if no such element exists.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: constant-time if <classname alt="boost::intrusive::link_mode">link_mode</classname> is normal_link. Linear to the elements (l - before_f) otherwise.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased element. </para></description></method>
5631 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed by i of the list. No destructors are called.</para><para><emphasis role="bold">Returns</emphasis>: the first element remaining beyond the removed element, or end() if no such element exists.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the elements before i.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased element. </para></description></method>
5632 <method name="erase"><type>iterator</type><parameter name="f"><paramtype>const_iterator</paramtype></parameter><parameter name="l"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: f and l must be valid iterator to elements in *this.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed by b and e. No destructors are called.</para><para><emphasis role="bold">Returns</emphasis>: the first element remaining beyond the removed elements, or end() if no such element exists.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the elements before l.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. </para></description></method>
5633 <method name="erase"><type>iterator</type><parameter name="f"><paramtype>const_iterator</paramtype></parameter><parameter name="l"><paramtype>const_iterator</paramtype></parameter><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range [f, l) from the list. n must be distance(f, l). No destructors are called.</para><para><emphasis role="bold">Returns</emphasis>: the first element remaining beyond the removed elements, or end() if no such element exists.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: linear to the elements before f if <classname alt="boost::intrusive::link_mode">link_mode</classname> is normal_link and <classname alt="boost::intrusive::constant_time_size">constant_time_size</classname> is activated. Linear to the elements before l otherwise.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased element. </para></description></method>
5634 <method name="erase_after_and_dispose"><type>iterator</type><template>
5635           <template-type-parameter name="Disposer"/>
5636         </template><parameter name="prev"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element after the element pointed by prev of the list. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Returns</emphasis>: the first element remaining beyond the removed elements, or end() if no such element exists.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased element. </para></description></method>
5637 <method name="erase_after_and_dispose"><type>iterator</type><template>
5638           <template-type-parameter name="Disposer"/>
5639         </template><parameter name="before_f"><paramtype>const_iterator</paramtype></parameter><parameter name="l"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range (before_f, l) from the list. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: the first element remaining beyond the removed elements, or end() if no such element exists.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the elements (l - before_f + 1).</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased element. </para></description></method>
5640 <method name="erase_and_dispose"><type>iterator</type><template>
5641           <template-type-parameter name="Disposer"/>
5642         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed by i of the list. No destructors are called. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Returns</emphasis>: the first element remaining beyond the removed element, or end() if no such element exists.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the elements before i.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased element. </para></description></method>
5643 <method name="erase_and_dispose"><type>iterator</type><template>
5644           <template-type-parameter name="Disposer"/>
5645         </template><parameter name="f"><paramtype>const_iterator</paramtype></parameter><parameter name="l"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: f and l must be valid iterator to elements in *this. Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed by b and e. No destructors are called. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: the first element remaining beyond the removed elements, or end() if no such element exists.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of erased elements plus linear to the elements before f.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. </para></description></method>
5646 <method name="assign"><type>void</type><template>
5647           <template-type-parameter name="Iterator"/>
5648         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Clears the list and inserts the range pointed by b and e. No destructors or copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements inserted plus linear to the elements contained in the list if it's a safe-mode or auto-unlink value. Linear to the number of elements inserted in the list otherwise.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. </para></description></method>
5649 <method name="dispose_and_assign"><type>void</type><template>
5650           <template-type-parameter name="Iterator"/>
5651           <template-type-parameter name="Disposer"/>
5652         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Clears the list and inserts the range pointed by b and e. No destructors or copy constructors are called. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements inserted plus linear to the elements contained in the list.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. </para></description></method>
5653 <method name="splice_after"><type>void</type><parameter name="prev"><paramtype>const_iterator</paramtype></parameter><parameter name="x"><paramtype><classname>slist</classname> &amp;</paramtype></parameter><parameter name="l"><paramtype>const_iterator *</paramtype><default>0</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: prev must point to an element contained by this list or to the before_begin() element</para><para><emphasis role="bold">Effects</emphasis>: Transfers all the elements of list x to this list, after the the element pointed by prev. No destructors or copy constructors are called.</para><para><emphasis role="bold">Returns</emphasis>: Nothing.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: In general, linear to the elements contained in x. Constant-time if cache_last&lt;&gt; option is true and also constant-time if linear&lt;&gt; option is true "this" is empty and "l" is not used.</para><para><emphasis role="bold">Note</emphasis>: Iterators of values obtained from list x now point to elements of this list. Iterators of this list and all the references are not invalidated.</para><para><emphasis role="bold">Additional note</emphasis>: If the optional parameter "l" is provided, it will be assigned to the last spliced element or prev if x is empty. This iterator can be used as new "prev" iterator for a new splice_after call. that will splice new values after the previously spliced values. </para></description></method>
5654 <method name="splice_after"><type>void</type><parameter name="prev_pos"><paramtype>const_iterator</paramtype></parameter><parameter name="x"><paramtype><classname>slist</classname> &amp;</paramtype></parameter><parameter name="prev_ele"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: prev must point to an element contained by this list or to the before_begin() element. prev_ele must point to an element contained in list x or must be x.before_begin().</para><para><emphasis role="bold">Effects</emphasis>: Transfers the element after prev_ele, from list x to this list, after the element pointed by prev. No destructors or copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Note</emphasis>: Iterators of values obtained from list x now point to elements of this list. Iterators of this list and all the references are not invalidated. </para></description></method>
5655 <method name="splice_after"><type>void</type><parameter name="prev_pos"><paramtype>const_iterator</paramtype></parameter><parameter name="x"><paramtype><classname>slist</classname> &amp;</paramtype></parameter><parameter name="before_f"><paramtype>const_iterator</paramtype></parameter><parameter name="before_l"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: prev_pos must be a dereferenceable iterator in *this or be before_begin(), and before_f and before_l belong to x and ++before_f != x.end() &amp;&amp; before_l != x.end().</para><para><emphasis role="bold">Effects</emphasis>: Transfers the range (before_f, before_l] from list x to this list, after the element pointed by prev_pos. No destructors or copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements transferred if <classname alt="boost::intrusive::constant_time_size">constant_time_size</classname> is true. Constant-time otherwise.</para><para><emphasis role="bold">Note</emphasis>: Iterators of values obtained from list x now point to elements of this list. Iterators of this list and all the references are not invalidated. </para></description></method>
5656 <method name="splice_after"><type>void</type><parameter name="prev_pos"><paramtype>const_iterator</paramtype></parameter><parameter name="x"><paramtype><classname>slist</classname> &amp;</paramtype></parameter><parameter name="before_f"><paramtype>const_iterator</paramtype></parameter><parameter name="before_l"><paramtype>const_iterator</paramtype></parameter><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: prev_pos must be a dereferenceable iterator in *this or be before_begin(), and before_f and before_l belong to x and ++before_f != x.end() &amp;&amp; before_l != x.end() and n == distance(before_f, before_l).</para><para><emphasis role="bold">Effects</emphasis>: Transfers the range (before_f, before_l] from list x to this list, after the element pointed by p. No destructors or copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: Iterators of values obtained from list x now point to elements of this list. Iterators of this list and all the references are not invalidated. </para></description></method>
5657 <method name="splice"><type>void</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><parameter name="x"><paramtype><classname>slist</classname> &amp;</paramtype></parameter><parameter name="l"><paramtype>const_iterator *</paramtype><default>0</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: it is an iterator to an element in *this.</para><para><emphasis role="bold">Effects</emphasis>: Transfers all the elements of list x to this list, before the the element pointed by it. No destructors or copy constructors are called.</para><para><emphasis role="bold">Returns</emphasis>: Nothing.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the elements contained in x plus linear to the elements before it. Linear to the elements before it if cache_last&lt;&gt; option is true. Constant-time if cache_last&lt;&gt; option is true and it == end().</para><para><emphasis role="bold">Note</emphasis>: Iterators of values obtained from list x now point to elements of this list. Iterators of this list and all the references are not invalidated.</para><para><emphasis role="bold">Additional note</emphasis>: If the optional parameter "l" is provided, it will be assigned to the last spliced element or prev if x is empty. This iterator can be used as new "prev" iterator for a new splice_after call. that will splice new values after the previously spliced values. </para></description></method>
5658 <method name="splice"><type>void</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="x"><paramtype><classname>slist</classname> &amp;</paramtype></parameter><parameter name="elem"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: it p must be a valid iterator of *this. elem must point to an element contained in list x.</para><para><emphasis role="bold">Effects</emphasis>: Transfers the element elem, from list x to this list, before the element pointed by pos. No destructors or copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the elements before pos and before elem. Linear to the elements before elem if cache_last&lt;&gt; option is true and pos == end().</para><para><emphasis role="bold">Note</emphasis>: Iterators of values obtained from list x now point to elements of this list. Iterators of this list and all the references are not invalidated. </para></description></method>
5659 <method name="splice"><type>void</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="x"><paramtype><classname>slist</classname> &amp;</paramtype></parameter><parameter name="f"><paramtype>const_iterator</paramtype></parameter><parameter name="l"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: pos must be a dereferenceable iterator in *this and f and f belong to x and f and f a valid range on x.</para><para><emphasis role="bold">Effects</emphasis>: Transfers the range [f, l) from list x to this list, before the element pointed by pos. No destructors or copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the sum of elements before pos, f, and l plus linear to the number of elements transferred if <classname alt="boost::intrusive::constant_time_size">constant_time_size</classname> is true. Linear to the sum of elements before f, and l plus linear to the number of elements transferred if <classname alt="boost::intrusive::constant_time_size">constant_time_size</classname> is true if cache_last&lt;&gt; is true and pos == end()</para><para><emphasis role="bold">Note</emphasis>: Iterators of values obtained from list x now point to elements of this list. Iterators of this list and all the references are not invalidated. </para></description></method>
5660 <method name="splice"><type>void</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="x"><paramtype><classname>slist</classname> &amp;</paramtype></parameter><parameter name="f"><paramtype>const_iterator</paramtype></parameter><parameter name="l"><paramtype>const_iterator</paramtype></parameter><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: pos must be a dereferenceable iterator in *this and f and l belong to x and f and l a valid range on x. n == distance(f, l).</para><para><emphasis role="bold">Effects</emphasis>: Transfers the range [f, l) from list x to this list, before the element pointed by pos. No destructors or copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the sum of elements before pos, f, and l. Linear to the sum of elements before f and l if cache_last&lt;&gt; is true and pos == end().</para><para><emphasis role="bold">Note</emphasis>: Iterators of values obtained from list x now point to elements of this list. Iterators of this list and all the references are not invalidated. </para></description></method>
5661 <method name="sort"><type>void</type><template>
5662           <template-type-parameter name="Predicate"/>
5663         </template><parameter name="p"><paramtype>Predicate</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: This function sorts the list *this according to std::less&lt;value_type&gt;. The sort is stable, that is, the relative order of equivalent elements is preserved.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the predicate throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: The number of comparisons is approximately N log N, where N is the list's size.</para><para><emphasis role="bold">Note</emphasis>: Iterators and references are not invalidated </para></description></method>
5664 <method name="sort"><type>void</type><description><para><emphasis role="bold">Requires</emphasis>: p must be a comparison function that induces a strict weak ordering and both *this and x must be sorted according to that ordering The lists x and *this must be distinct.</para><para><emphasis role="bold">Effects</emphasis>: This function removes all of x's elements and inserts them in order into *this. The merge is stable; that is, if an element from *this is equivalent to one from x, then the element from *this will precede the one from x.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or std::less&lt;value_type&gt; throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: This function is linear time: it performs at most size() + x.size() - 1 comparisons.</para><para><emphasis role="bold">Note</emphasis>: Iterators and references are not invalidated. </para></description></method>
5665 <method name="merge"><type>void</type><template>
5666           <template-type-parameter name="Predicate"/>
5667         </template><parameter name="x"><paramtype><classname>slist</classname> &amp;</paramtype></parameter><parameter name="p"><paramtype>Predicate</paramtype></parameter><parameter name="l"><paramtype>const_iterator *</paramtype><default>0</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: p must be a comparison function that induces a strict weak ordering and both *this and x must be sorted according to that ordering The lists x and *this must be distinct.</para><para><emphasis role="bold">Effects</emphasis>: This function removes all of x's elements and inserts them in order into *this. The merge is stable; that is, if an element from *this is equivalent to one from x, then the element from *this will precede the one from x.</para><para><emphasis role="bold">Returns</emphasis>: Nothing.</para><para><emphasis role="bold">Throws</emphasis>: If the predicate throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: This function is linear time: it performs at most size() + x.size() - 1 comparisons.</para><para><emphasis role="bold">Note</emphasis>: Iterators and references are not invalidated.</para><para><emphasis role="bold">Additional note</emphasis>: If optional "l" argument is passed, it is assigned to an iterator to the last transferred value or end() is x is empty. </para></description></method>
5668 <method name="merge"><type>void</type><parameter name="x"><paramtype><classname>slist</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: This function removes all of x's elements and inserts them in order into *this according to std::less&lt;value_type&gt;. The merge is stable; that is, if an element from *this is equivalent to one from x, then the element from *this will precede the one from x.</para><para><emphasis role="bold">Throws</emphasis>: if std::less&lt;value_type&gt; throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: This function is linear time: it performs at most size() + x.size() - 1 comparisons.</para><para><emphasis role="bold">Note</emphasis>: Iterators and references are not invalidated </para></description></method>
5669 <method name="reverse"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Reverses the order of elements in the list.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: This function is linear to the contained elements.</para><para><emphasis role="bold">Note</emphasis>: Iterators and references are not invalidated </para></description></method>
5670 <method name="remove"><type>void</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Removes all the elements that compare equal to value. No destructors are called.</para><para><emphasis role="bold">Throws</emphasis>: If std::equal_to&lt;value_type&gt; throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time. It performs exactly size() comparisons for equality.</para><para><emphasis role="bold">Note</emphasis>: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. This function is linear time: it performs exactly size() comparisons for equality. </para></description></method>
5671 <method name="remove_and_dispose"><type>void</type><template>
5672           <template-type-parameter name="Disposer"/>
5673         </template><parameter name="value"><paramtype>const_reference</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Removes all the elements that compare equal to value. Disposer::operator()(pointer) is called for every removed element.</para><para><emphasis role="bold">Throws</emphasis>: If std::equal_to&lt;value_type&gt; throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time. It performs exactly size() comparisons for equality.</para><para><emphasis role="bold">Note</emphasis>: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. </para></description></method>
5674 <method name="remove_if"><type>void</type><template>
5675           <template-type-parameter name="Pred"/>
5676         </template><parameter name="pred"><paramtype>Pred</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Removes all the elements for which a specified predicate is satisfied. No destructors are called.</para><para><emphasis role="bold">Throws</emphasis>: If pred throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time. It performs exactly size() calls to the predicate.</para><para><emphasis role="bold">Note</emphasis>: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. </para></description></method>
5677 <method name="remove_and_dispose_if"><type>void</type><template>
5678           <template-type-parameter name="Pred"/>
5679           <template-type-parameter name="Disposer"/>
5680         </template><parameter name="pred"><paramtype>Pred</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Removes all the elements for which a specified predicate is satisfied. Disposer::operator()(pointer) is called for every removed element.</para><para><emphasis role="bold">Throws</emphasis>: If pred throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time. It performs exactly size() comparisons for equality.</para><para><emphasis role="bold">Note</emphasis>: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. </para></description></method>
5681 <method name="unique"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Removes adjacent duplicate elements or adjacent elements that are equal from the list. No destructors are called.</para><para><emphasis role="bold">Throws</emphasis>: If std::equal_to&lt;value_type&gt; throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time (size()-1) comparisons calls to pred()).</para><para><emphasis role="bold">Note</emphasis>: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. </para></description></method>
5682 <method name="unique"><type>void</type><template>
5683           <template-type-parameter name="BinaryPredicate"/>
5684         </template><parameter name="pred"><paramtype>BinaryPredicate</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Removes adjacent duplicate elements or adjacent elements that satisfy some binary predicate from the list. No destructors are called.</para><para><emphasis role="bold">Throws</emphasis>: If the predicate throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time (size()-1) comparisons equality comparisons.</para><para><emphasis role="bold">Note</emphasis>: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. </para></description></method>
5685 <method name="unique_and_dispose"><type>void</type><template>
5686           <template-type-parameter name="Disposer"/>
5687         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Removes adjacent duplicate elements or adjacent elements that satisfy some binary predicate from the list. Disposer::operator()(pointer) is called for every removed element.</para><para><emphasis role="bold">Throws</emphasis>: If std::equal_to&lt;value_type&gt; throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time (size()-1) comparisons equality comparisons.</para><para><emphasis role="bold">Note</emphasis>: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. </para></description></method>
5688 <method name="unique_and_dispose"><type>void</type><template>
5689           <template-type-parameter name="BinaryPredicate"/>
5690           <template-type-parameter name="Disposer"/>
5691         </template><parameter name="pred"><paramtype>BinaryPredicate</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Removes adjacent duplicate elements or adjacent elements that satisfy some binary predicate from the list. Disposer::operator()(pointer) is called for every removed element.</para><para><emphasis role="bold">Throws</emphasis>: If the predicate throws. Basic guarantee.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time (size()-1) comparisons equality comparisons.</para><para><emphasis role="bold">Note</emphasis>: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. </para></description></method>
5692 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be a reference to a value inserted in a list.</para><para><emphasis role="bold">Effects</emphasis>: This function returns a const_iterator pointing to the element</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: Iterators and references are not invalidated. </para></description></method>
5693 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be a const reference to a value inserted in a list.</para><para><emphasis role="bold">Effects</emphasis>: This function returns an iterator pointing to the element.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: Iterators and references are not invalidated. </para></description></method>
5694 <method name="previous"><type>iterator</type><parameter name="i"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: The iterator to the element before i in the list. Returns the end-iterator, if either i is the begin-iterator or the list is empty.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements before i. Constant if cache_last&lt;&gt; is true and i == end(). </para></description></method>
5695 <method name="previous" cv="const"><type>const_iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: The const_iterator to the element before i in the list. Returns the end-const_iterator, if either i is the begin-const_iterator or the list is empty.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements before i. Constant if cache_last&lt;&gt; is true and i == end(). </para></description></method>
5696 <method name="previous"><type>iterator</type><parameter name="prev_from"><paramtype>const_iterator</paramtype></parameter><parameter name="i"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: The iterator to the element before i in the list, starting the search on element after prev_from. Returns the end-iterator, if either i is the begin-iterator or the list is empty.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements before i. Constant if cache_last&lt;&gt; is true and i == end(). </para></description></method>
5697 <method name="previous" cv="const"><type>const_iterator</type><parameter name="prev_from"><paramtype>const_iterator</paramtype></parameter><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Returns</emphasis>: The const_iterator to the element before i in the list, starting the search on element after prev_from. Returns the end-const_iterator, if either i is the begin-const_iterator or the list is empty.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements before i. Constant if cache_last&lt;&gt; is true and i == end(). </para></description></method>
5698 <method name="check" cv="const"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Asserts the integrity of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time.</para><para><emphasis role="bold">Note</emphasis>: The method has no effect when asserts are turned off (e.g., with NDEBUG). Experimental function, interface might change in future versions. </para></description></method>
5699 </method-group>
5700 <constructor><description><para><emphasis role="bold">Effects</emphasis>: constructs an empty list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks). </para></description></constructor>
5701 <constructor specifiers="explicit"><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: constructs an empty list.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks). </para></description></constructor>
5702 <constructor><template>
5703           <template-type-parameter name="Iterator"/>
5704         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Constructs a list equal to [b ,e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in distance(b, e). No copy constructors are called.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks). </para></description></constructor>
5705 <constructor><parameter name="x"><paramtype><classname>slist</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
5706 <copy-assignment><type><classname>slist</classname> &amp;</type><parameter name="x"><paramtype><classname>slist</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
5707 <destructor><description><para><emphasis role="bold">Effects</emphasis>: If it's a safe-mode or auto-unlink value, the destructor does nothing (ie. no code is generated). Otherwise it detaches all elements from this. In this case the objects in the list are not deleted (i.e. no destructors are called), but the hooks according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are set to their default value.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements in the list, if it's a safe-mode or auto-unlink value. Otherwise constant. </para></description></destructor>
5708 <method-group name="public static functions">
5709 <method name="container_from_end_iterator" specifiers="static"><type><classname>slist</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of slist.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the slist associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5710 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>slist</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end const_iterator of slist.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the slist associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
5711 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be a reference to a value inserted in a list.</para><para><emphasis role="bold">Effects</emphasis>: This function returns a const_iterator pointing to the element</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: Iterators and references are not invalidated. This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
5712 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be a const reference to a value inserted in a list.</para><para><emphasis role="bold">Effects</emphasis>: This function returns an iterator pointing to the element.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: Iterators and references are not invalidated. This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
5713 </method-group>
5714 <method-group name="private member functions">
5715 <method name="priv_splice_after"><type>void</type><parameter name="prev_pos_n"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="x"><paramtype><classname>slist</classname> &amp;</paramtype></parameter><parameter name="before_f_n"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="before_l_n"><paramtype>const node_ptr &amp;</paramtype></parameter></method>
5716 <method name="priv_incorporate_after"><type>void</type><parameter name="prev_pos_n"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="first_n"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="before_l_n"><paramtype>const node_ptr &amp;</paramtype></parameter></method>
5717 <method name="priv_reverse"><type>void</type><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype></parameter></method>
5718 <method name="priv_reverse"><type>void</type><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype></parameter></method>
5719 <method name="priv_shift_backwards"><type>void</type><parameter name="n"><paramtype>size_type</paramtype></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype></parameter></method>
5720 <method name="priv_shift_backwards"><type>void</type><parameter name="n"><paramtype>size_type</paramtype></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype></parameter></method>
5721 <method name="priv_shift_forward"><type>void</type><parameter name="n"><paramtype>size_type</paramtype></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype></parameter></method>
5722 <method name="priv_shift_forward"><type>void</type><parameter name="n"><paramtype>size_type</paramtype></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype></parameter></method>
5723 </method-group>
5724 <method-group name="private static functions">
5725 <method name="priv_swap_cache_last" specifiers="static"><type>void</type><parameter name="this_impl"><paramtype><classname>slist</classname> *</paramtype></parameter><parameter name="other_impl"><paramtype><classname>slist</classname> *</paramtype></parameter></method>
5726 <method name="priv_swap_lists" specifiers="static"><type>void</type><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="other_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype></parameter></method>
5727 <method name="priv_swap_lists" specifiers="static"><type>void</type><parameter name="this_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="other_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype></parameter></method>
5728 <method name="priv_container_from_end_iterator" specifiers="static"><type><classname>slist</classname> &amp;</type><parameter name="end_iterator"><paramtype>const const_iterator &amp;</paramtype></parameter></method>
5729 </method-group>
5730 </class><struct name="make_slist"><template>
5731       <template-type-parameter name="T"/>
5732       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5733     </template><description><para>Helper metafunction to define a <computeroutput>slist</computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
5734 </struct>
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786 </namespace>
5787 </namespace>
5788 </header>
5789 <header name="boost/intrusive/slist_hook.hpp">
5790 <namespace name="boost">
5791 <namespace name="intrusive">
5792 <struct name="make_slist_base_hook"><template>
5793       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5794     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::slist_base_hook">slist_base_hook</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
5795 </struct><class name="slist_base_hook"><template>
5796       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5797     </template><inherit access="public">make_slist_base_hook::type&lt; O1, O2, O3 &gt;</inherit><description><para>Derive a class from <classname alt="boost::intrusive::slist_base_hook">slist_base_hook</classname> in order to store objects in in an list. <classname alt="boost::intrusive::slist_base_hook">slist_base_hook</classname> holds the data necessary to maintain the list and provides an appropriate <classname alt="boost::intrusive::value_traits">value_traits</classname> class for list.</para><para>The hook admits the following options: <computeroutput>tag&lt;&gt;</computeroutput>, <computeroutput>void_pointer&lt;&gt;</computeroutput> and <computeroutput>link_mode&lt;&gt;</computeroutput>.</para><para><computeroutput>tag&lt;&gt;</computeroutput> defines a tag to identify the node. The same tag value can be used in different classes, but if a class is derived from more than one <computeroutput><classname alt="boost::intrusive::list_base_hook">list_base_hook</classname></computeroutput>, then each <computeroutput><classname alt="boost::intrusive::list_base_hook">list_base_hook</classname></computeroutput> needs its unique tag.</para><para><computeroutput>link_mode&lt;&gt;</computeroutput> will specify the linking mode of the hook (<computeroutput>normal_link</computeroutput>, <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput>).</para><para><computeroutput>void_pointer&lt;&gt;</computeroutput> is the pointer type that will be used internally in the hook and the container configured to use this hook. </para></description><method-group name="public member functions">
5798 <method name="swap_nodes"><type>void</type><parameter name="other"><paramtype><classname>slist_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swapping two nodes swaps the position of the elements related to those nodes in one or two containers. That is, if the node this is part of the element e1, the node x is part of the element e2 and both elements are included in the containers s1 and s2, then after the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 at the position of e1. If one element is not in a container, then after the swap-operation the other element is not in a container. Iterators to e1 and e2 related to those nodes are invalidated.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5799 <method name="is_linked" cv="const"><type>bool</type><description><para><emphasis role="bold">Precondition</emphasis>: <classname alt="boost::intrusive::link_mode">link_mode</classname> must be <computeroutput>safe_link</computeroutput> or <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: true, if the node belongs to a container, false otherwise. This function can be used to test whether <computeroutput>slist::iterator_to</computeroutput> will return a valid iterator.</para><para><emphasis role="bold">Complexity</emphasis>: Constant </para></description></method>
5800 <method name="unlink"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Removes the node if it's inserted in a container. This function is only allowed if <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5801 </method-group>
5802 <constructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></constructor>
5803 <constructor><parameter name=""><paramtype>const <classname>slist_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing a copy-constructor makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></constructor>
5804 <copy-assignment><type><classname>slist_base_hook</classname> &amp;</type><parameter name=""><paramtype>const <classname>slist_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Empty function. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing an assignment operator makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></copy-assignment>
5805 <destructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>normal_link</computeroutput>, the destructor does nothing (ie. no code is generated). If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>safe_link</computeroutput> and the object is stored in an slist an assertion is raised. If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> and <computeroutput>is_linked()</computeroutput> is true, the node is unlinked.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
5806 </class><struct name="make_slist_member_hook"><template>
5807       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5808     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::slist_member_hook">slist_member_hook</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
5809 </struct><class name="slist_member_hook"><template>
5810       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5811     </template><inherit access="public">make_slist_member_hook::type&lt; O1, O2, O3 &gt;</inherit><description><para>Put a public data member <classname alt="boost::intrusive::slist_member_hook">slist_member_hook</classname> in order to store objects of this class in an list. <classname alt="boost::intrusive::slist_member_hook">slist_member_hook</classname> holds the data necessary for maintaining the list and provides an appropriate <classname alt="boost::intrusive::value_traits">value_traits</classname> class for list.</para><para>The hook admits the following options: <computeroutput>void_pointer&lt;&gt;</computeroutput> and <computeroutput>link_mode&lt;&gt;</computeroutput>.</para><para><computeroutput>link_mode&lt;&gt;</computeroutput> will specify the linking mode of the hook (<computeroutput>normal_link</computeroutput>, <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput>).</para><para><computeroutput>void_pointer&lt;&gt;</computeroutput> is the pointer type that will be used internally in the hook and the container configured to use this hook. </para></description><method-group name="public member functions">
5812 <method name="swap_nodes"><type>void</type><parameter name="other"><paramtype><classname>slist_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swapping two nodes swaps the position of the elements related to those nodes in one or two containers. That is, if the node this is part of the element e1, the node x is part of the element e2 and both elements are included in the containers s1 and s2, then after the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 at the position of e1. If one element is not in a container, then after the swap-operation the other element is not in a container. Iterators to e1 and e2 related to those nodes are invalidated.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5813 <method name="is_linked" cv="const"><type>bool</type><description><para><emphasis role="bold">Precondition</emphasis>: <classname alt="boost::intrusive::link_mode">link_mode</classname> must be <computeroutput>safe_link</computeroutput> or <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: true, if the node belongs to a container, false otherwise. This function can be used to test whether <computeroutput>slist::iterator_to</computeroutput> will return a valid iterator.</para><para><emphasis role="bold">Note</emphasis>: If this member is called when the value is inserted in a slist with the option linear&lt;true&gt;, this function will return "false" for the last element, as it is not linked to anything (the next element is null), so use with care.</para><para><emphasis role="bold">Complexity</emphasis>: Constant </para></description></method>
5814 <method name="unlink"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Removes the node if it's inserted in a container. This function is only allowed if <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5815 </method-group>
5816 <constructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></constructor>
5817 <constructor><parameter name=""><paramtype>const <classname>slist_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing a copy-constructor makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></constructor>
5818 <copy-assignment><type><classname>slist_member_hook</classname> &amp;</type><parameter name=""><paramtype>const <classname>slist_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Empty function. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing an assignment operator makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></copy-assignment>
5819 <destructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>normal_link</computeroutput>, the destructor does nothing (ie. no code is generated). If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>safe_link</computeroutput> and the object is stored in an slist an assertion is raised. If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> and <computeroutput>is_linked()</computeroutput> is true, the node is unlinked.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
5820 </class>
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872 </namespace>
5873 </namespace>
5874 </header>
5875 <header name="boost/intrusive/splay_set.hpp">
5876 <namespace name="boost">
5877 <namespace name="intrusive">
5878 <class name="splay_set"><template>
5879       <template-type-parameter name="T"/>
5880       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
5881     </template><description><para>The class template <classname alt="boost::intrusive::splay_set">splay_set</classname> is an intrusive container, that mimics most of the interface of std::set as described in the C++ standard.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput> and <computeroutput>compare&lt;&gt;</computeroutput>. </para></description><typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
5882 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
5883 <typedef name="key_of_value"><type>implementation_defined::key_of_value</type></typedef>
5884 <typedef name="value_traits"><type>implementation_defined::value_traits</type></typedef>
5885 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
5886 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
5887 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
5888 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
5889 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
5890 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
5891 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
5892 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
5893 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
5894 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
5895 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
5896 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
5897 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
5898 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
5899 <typedef name="node"><type>implementation_defined::node</type></typedef>
5900 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
5901 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
5902 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
5903 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
5904 <method-group name="public member functions">
5905 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5906 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5907 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5908 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5909 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5910 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5911 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5912 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5913 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5914 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5915 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5916 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5917 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5918 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5919 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5920 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
5921 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
5922 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5923 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
5924 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>splay_set</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two containers.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
5925 <method name="clone_from"><type>void</type><template>
5926           <template-type-parameter name="Cloner"/>
5927           <template-type-parameter name="Disposer"/>
5928         </template><parameter name="src"><paramtype>const <classname>splay_set</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. Additional notes: it also copies the alpha factor from the source container. </para></description></method>
5929 <method name="clone_from"><type>void</type><template>
5930           <template-type-parameter name="Cloner"/>
5931           <template-type-parameter name="Disposer"/>
5932         </template><parameter name="src"><paramtype><classname>splay_set</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: This version can modify the source container, useful to implement move semantics. </para></description></method>
5933 <method name="insert"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container if the value is not already present.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
5934 <method name="insert"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert x into the container, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time (two comparisons in the worst case) if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
5935 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
5936 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
5937 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
5938           <template-type-parameter name="KeyType"/>
5939           <template-type-parameter name="KeyTypeKeyCompare"/>
5940         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
5941 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
5942           <template-type-parameter name="KeyType"/>
5943           <template-type-parameter name="KeyTypeKeyCompare"/>
5944         </template><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the constructing that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that key to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This can give a total constant-time complexity to the insertion: check(O(1)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
5945 <method name="insert"><type>void</type><template>
5946           <template-type-parameter name="Iterator"/>
5947         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert each element of a range into the container.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
5948 <method name="insert_commit"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue of type value_type. commit_data must have been obtained from a previous call to "insert_check". No objects should have been inserted or erased from the container between the "insert_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the container using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the newly inserted object.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
5949 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
5950 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
5951 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
5952 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
5953 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
5954 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
5955 <method name="erase"><type>size_type</type><template>
5956           <template-type-parameter name="KeyType"/>
5957           <template-type-parameter name="KeyTypeKeyCompare"/>
5958         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
5959 <method name="erase_and_dispose"><type>iterator</type><template>
5960           <template-type-parameter name="Disposer"/>
5961         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
5962 <method name="erase_and_dispose"><type>iterator</type><template>
5963           <template-type-parameter name="Disposer"/>
5964         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
5965 <method name="erase_and_dispose"><type>size_type</type><template>
5966           <template-type-parameter name="Disposer"/>
5967         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
5968 <method name="erase_and_dispose"><type>size_type</type><template>
5969           <template-type-parameter name="KeyType"/>
5970           <template-type-parameter name="KeyTypeKeyCompare"/>
5971           <template-type-parameter name="Disposer"/>
5972         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk) and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
5973 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
5974 <method name="clear_and_dispose"><type>void</type><template>
5975           <template-type-parameter name="Disposer"/>
5976         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
5977 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
5978 <method name="count" cv="const"><type>size_type</type><template>
5979           <template-type-parameter name="KeyType"/>
5980           <template-type-parameter name="KeyTypeKeyCompare"/>
5981         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
5982 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
5983 <method name="count" cv="const"><type>size_type</type><template>
5984           <template-type-parameter name="KeyType"/>
5985           <template-type-parameter name="KeyTypeKeyCompare"/>
5986         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
5987 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: non-const function, splaying is performed. </para></description></method>
5988 <method name="lower_bound"><type>iterator</type><template>
5989           <template-type-parameter name="KeyType"/>
5990           <template-type-parameter name="KeyTypeKeyCompare"/>
5991         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "key" </para></description></method>
5992 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
5993 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
5994           <template-type-parameter name="KeyType"/>
5995           <template-type-parameter name="KeyTypeKeyCompare"/>
5996         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
5997 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "value" </para></description></method>
5998 <method name="upper_bound"><type>iterator</type><template>
5999           <template-type-parameter name="KeyType"/>
6000           <template-type-parameter name="KeyTypeKeyCompare"/>
6001         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "key" </para></description></method>
6002 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6003 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
6004           <template-type-parameter name="KeyType"/>
6005           <template-type-parameter name="KeyTypeKeyCompare"/>
6006         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6007 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "value" </para></description></method>
6008 <method name="find"><type>iterator</type><template>
6009           <template-type-parameter name="KeyType"/>
6010           <template-type-parameter name="KeyTypeKeyCompare"/>
6011         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "key" </para></description></method>
6012 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6013 <method name="find" cv="const"><type>const_iterator</type><template>
6014           <template-type-parameter name="KeyType"/>
6015           <template-type-parameter name="KeyTypeKeyCompare"/>
6016         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6017 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
6018 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
6019           <template-type-parameter name="KeyType"/>
6020           <template-type-parameter name="KeyTypeKeyCompare"/>
6021         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
6022 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
6023 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
6024           <template-type-parameter name="KeyType"/>
6025           <template-type-parameter name="KeyTypeKeyCompare"/>
6026         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
6027 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
6028 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
6029           <template-type-parameter name="KeyType"/>
6030           <template-type-parameter name="KeyTypeKeyCompare"/>
6031         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
6032 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
6033 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
6034           <template-type-parameter name="KeyType"/>
6035           <template-type-parameter name="KeyTypeKeyCompare"/>
6036         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
6037 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6038 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6039 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
6040 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
6041 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
6042 <method name="splay_up"><type>void</type><parameter name="i"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: i must be a valid iterator of *this.</para><para><emphasis role="bold">Effects</emphasis>: Rearranges the container so that the element pointed by i is placed as the root of the tree, improving future searches of this value.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6043 <method name="splay_down"><type>iterator</type><template>
6044           <template-type-parameter name="KeyType"/>
6045           <template-type-parameter name="KeyTypeKeyCompare"/>
6046         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Rearranges the container so that if *this stores an element with a key equivalent to value the element is placed as the root of the tree. If the element is not present returns the last node compared with the key. If the tree is empty, end() is returned.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized logarithmic.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the new root of the tree, end() if the tree is empty.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor throws. </para></description></method>
6047 <method name="splay_down"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Rearranges the container so that if *this stores an element with a key equivalent to value the element is placed as the root of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized logarithmic.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the new root of the tree, end() if the tree is empty.</para><para><emphasis role="bold">Throws</emphasis>: If the predicate throws. </para></description></method>
6048 <method name="rebalance"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Rebalances the tree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear. </para></description></method>
6049 <method name="rebalance_subtree"><type>iterator</type><parameter name="root"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: old_root is a node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Rebalances the subtree rooted at old_root.</para><para><emphasis role="bold">Returns</emphasis>: The new root of the subtree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the elements in the subtree. </para></description></method>
6050 <method name="merge"><type>void</type><template>
6051           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
6052         </template><parameter name="source"><paramtype><classname>splay_set</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
6053 <method name="merge"><type>void</type><template>
6054           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
6055         </template><parameter name="source"><paramtype><classname>splay_multiset</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
6056 </method-group>
6057 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
6058 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container with given comparison and traits.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
6059 <constructor><template>
6060           <template-type-parameter name="Iterator"/>
6061         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare object throws. Basic guarantee. </para></description></constructor>
6062 <constructor><parameter name="x"><paramtype><classname>splay_set</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
6063 <copy-assignment><type><classname>splay_set</classname> &amp;</type><parameter name="x"><paramtype><classname>splay_set</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
6064 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
6065 <method-group name="public static functions">
6066 <method name="container_from_end_iterator" specifiers="static"><type><classname>splay_set</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
6067 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>splay_set</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
6068 <method name="container_from_iterator" specifiers="static"><type><classname>splay_set</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
6069 <method name="container_from_iterator" specifiers="static"><type>const <classname>splay_set</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
6070 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
6071 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
6072 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
6073 </method-group>
6074 </class><struct name="make_splay_set"><template>
6075       <template-type-parameter name="T"/>
6076       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
6077     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::splay_set">splay_set</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
6078 </struct><class name="splay_multiset"><template>
6079       <template-type-parameter name="T"/>
6080       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
6081     </template><description><para>The class template <classname alt="boost::intrusive::splay_multiset">splay_multiset</classname> is an intrusive container, that mimics most of the interface of std::multiset as described in the C++ standard.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput> and <computeroutput>compare&lt;&gt;</computeroutput>. </para></description><typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
6082 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
6083 <typedef name="key_of_value"><type>implementation_defined::key_of_value</type></typedef>
6084 <typedef name="value_traits"><type>implementation_defined::value_traits</type></typedef>
6085 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
6086 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
6087 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
6088 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
6089 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
6090 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
6091 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
6092 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
6093 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
6094 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
6095 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
6096 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
6097 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
6098 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
6099 <typedef name="node"><type>implementation_defined::node</type></typedef>
6100 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
6101 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
6102 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
6103 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
6104 <method-group name="public member functions">
6105 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6106 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6107 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6108 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6109 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6110 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6111 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6112 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6113 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6114 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6115 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6116 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6117 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6118 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6119 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6120 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
6121 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
6122 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6123 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6124 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>splay_multiset</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two containers.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
6125 <method name="clone_from"><type>void</type><template>
6126           <template-type-parameter name="Cloner"/>
6127           <template-type-parameter name="Disposer"/>
6128         </template><parameter name="src"><paramtype>const <classname>splay_multiset</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. Additional notes: it also copies the alpha factor from the source container. </para></description></method>
6129 <method name="clone_from"><type>void</type><template>
6130           <template-type-parameter name="Cloner"/>
6131           <template-type-parameter name="Disposer"/>
6132         </template><parameter name="src"><paramtype><classname>splay_multiset</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: This version can modify the source container, useful to implement move semantics. </para></description></method>
6133 <method name="insert"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container before the upper bound.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
6134 <method name="insert"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator.</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case)</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
6135 <method name="insert"><type>void</type><template>
6136           <template-type-parameter name="Iterator"/>
6137         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Inserts a each element of a range into the container before the upper bound of the key of each element.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
6138 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
6139 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
6140 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
6141 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6142 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6143 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6144 <method name="erase"><type>size_type</type><template>
6145           <template-type-parameter name="KeyType"/>
6146           <template-type-parameter name="KeyTypeKeyCompare"/>
6147         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6148 <method name="erase_and_dispose"><type>iterator</type><template>
6149           <template-type-parameter name="Disposer"/>
6150         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
6151 <method name="erase_and_dispose"><type>iterator</type><template>
6152           <template-type-parameter name="Disposer"/>
6153         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
6154 <method name="erase_and_dispose"><type>size_type</type><template>
6155           <template-type-parameter name="Disposer"/>
6156         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6157 <method name="erase_and_dispose"><type>size_type</type><template>
6158           <template-type-parameter name="KeyType"/>
6159           <template-type-parameter name="KeyTypeKeyCompare"/>
6160           <template-type-parameter name="Disposer"/>
6161         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk) and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
6162 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6163 <method name="clear_and_dispose"><type>void</type><template>
6164           <template-type-parameter name="Disposer"/>
6165         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
6166 <method name="count"><type>size_type</type><parameter name=""><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: non-const function, splaying is performed. </para></description></method>
6167 <method name="count"><type>size_type</type><template>
6168           <template-type-parameter name="KeyType"/>
6169           <template-type-parameter name="KeyTypeKeyCompare"/>
6170         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6171 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: non-const function, splaying is performed. </para></description></method>
6172 <method name="lower_bound"><type>iterator</type><template>
6173           <template-type-parameter name="KeyType"/>
6174           <template-type-parameter name="KeyTypeKeyCompare"/>
6175         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "key" </para></description></method>
6176 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6177 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
6178           <template-type-parameter name="KeyType"/>
6179           <template-type-parameter name="KeyTypeKeyCompare"/>
6180         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6181 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "value" </para></description></method>
6182 <method name="upper_bound"><type>iterator</type><template>
6183           <template-type-parameter name="KeyType"/>
6184           <template-type-parameter name="KeyTypeKeyCompare"/>
6185         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "key" </para></description></method>
6186 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6187 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
6188           <template-type-parameter name="KeyType"/>
6189           <template-type-parameter name="KeyTypeKeyCompare"/>
6190         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6191 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "value" </para></description></method>
6192 <method name="find"><type>iterator</type><template>
6193           <template-type-parameter name="KeyType"/>
6194           <template-type-parameter name="KeyTypeKeyCompare"/>
6195         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "key" </para></description></method>
6196 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6197 <method name="find" cv="const"><type>const_iterator</type><template>
6198           <template-type-parameter name="KeyType"/>
6199           <template-type-parameter name="KeyTypeKeyCompare"/>
6200         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6201 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "value" </para></description></method>
6202 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
6203           <template-type-parameter name="KeyType"/>
6204           <template-type-parameter name="KeyTypeKeyCompare"/>
6205         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "key" </para></description></method>
6206 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6207 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
6208           <template-type-parameter name="KeyType"/>
6209           <template-type-parameter name="KeyTypeKeyCompare"/>
6210         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6211 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower_value"><paramtype>const_reference</paramtype></parameter><parameter name="upper_value"><paramtype>const_reference</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
6212 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
6213           <template-type-parameter name="KeyType"/>
6214           <template-type-parameter name="KeyTypeKeyCompare"/>
6215         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
6216 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_value"><paramtype>const_reference</paramtype></parameter><parameter name="upper_value"><paramtype>const_reference</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
6217 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
6218           <template-type-parameter name="KeyType"/>
6219           <template-type-parameter name="KeyTypeKeyCompare"/>
6220         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
6221 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6222 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6223 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
6224 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
6225 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
6226 <method name="splay_up"><type>void</type><parameter name="i"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: i must be a valid iterator of *this.</para><para><emphasis role="bold">Effects</emphasis>: Rearranges the container so that the element pointed by i is placed as the root of the tree, improving future searches of this value.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6227 <method name="splay_down"><type>iterator</type><template>
6228           <template-type-parameter name="KeyType"/>
6229           <template-type-parameter name="KeyTypeKeyCompare"/>
6230         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Rearranges the container so that if *this stores an element with a key equivalent to value the element is placed as the root of the tree. If the element is not present returns the last node compared with the key. If the tree is empty, end() is returned.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized logarithmic.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the new root of the tree, end() if the tree is empty.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor throws. </para></description></method>
6231 <method name="splay_down"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Rearranges the container so that if *this stores an element with a key equivalent to value the element is placed as the root of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized logarithmic.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the new root of the tree, end() if the tree is empty.</para><para><emphasis role="bold">Throws</emphasis>: If the predicate throws. </para></description></method>
6232 <method name="rebalance"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Rebalances the tree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear. </para></description></method>
6233 <method name="rebalance_subtree"><type>iterator</type><parameter name="root"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: old_root is a node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Rebalances the subtree rooted at old_root.</para><para><emphasis role="bold">Returns</emphasis>: The new root of the subtree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the elements in the subtree. </para></description></method>
6234 <method name="merge"><type>void</type><template>
6235           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
6236         </template><parameter name="source"><paramtype><classname>splay_multiset</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Extracts each element in source and insert it into a using the comparison object of *this.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
6237 <method name="merge"><type>void</type><template>
6238           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
6239         </template><parameter name="source"><paramtype><classname>splay_set</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Extracts each element in source and insert it into a using the comparison object of *this.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
6240 </method-group>
6241 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
6242 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container with given comparison and traits.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
6243 <constructor><template>
6244           <template-type-parameter name="Iterator"/>
6245         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare object throws. Basic guarantee. </para></description></constructor>
6246 <constructor><parameter name="x"><paramtype><classname>splay_multiset</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
6247 <copy-assignment><type><classname>splay_multiset</classname> &amp;</type><parameter name="x"><paramtype><classname>splay_multiset</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
6248 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
6249 <method-group name="public static functions">
6250 <method name="container_from_end_iterator" specifiers="static"><type><classname>splay_multiset</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
6251 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>splay_multiset</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
6252 <method name="container_from_iterator" specifiers="static"><type><classname>splay_multiset</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
6253 <method name="container_from_iterator" specifiers="static"><type>const <classname>splay_multiset</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
6254 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
6255 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
6256 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
6257 </method-group>
6258 </class><struct name="make_splay_multiset"><template>
6259       <template-type-parameter name="T"/>
6260       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
6261     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::splay_multiset">splay_multiset</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
6262 </struct>
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304 <function name="operator!="><type>bool</type><template>
6305           <template-type-parameter name="T"/>
6306           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
6307         </template><parameter name="x"><paramtype>const <classname>splay_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>splay_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
6308 <function name="operator&gt;"><type>bool</type><template>
6309           <template-type-parameter name="T"/>
6310           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
6311         </template><parameter name="x"><paramtype>const <classname>splay_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>splay_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
6312 <function name="operator&lt;="><type>bool</type><template>
6313           <template-type-parameter name="T"/>
6314           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
6315         </template><parameter name="x"><paramtype>const <classname>splay_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>splay_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
6316 <function name="operator&gt;="><type>bool</type><template>
6317           <template-type-parameter name="T"/>
6318           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
6319         </template><parameter name="x"><paramtype>const <classname>splay_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>splay_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
6320 <function name="swap"><type>void</type><template>
6321           <template-type-parameter name="T"/>
6322           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
6323         </template><parameter name="x"><paramtype><classname>splay_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype><classname>splay_set</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
6324 <function name="operator!="><type>bool</type><template>
6325           <template-type-parameter name="T"/>
6326           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
6327         </template><parameter name="x"><paramtype>const <classname>splay_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>splay_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
6328 <function name="operator&gt;"><type>bool</type><template>
6329           <template-type-parameter name="T"/>
6330           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
6331         </template><parameter name="x"><paramtype>const <classname>splay_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>splay_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
6332 <function name="operator&lt;="><type>bool</type><template>
6333           <template-type-parameter name="T"/>
6334           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
6335         </template><parameter name="x"><paramtype>const <classname>splay_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>splay_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
6336 <function name="operator&gt;="><type>bool</type><template>
6337           <template-type-parameter name="T"/>
6338           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
6339         </template><parameter name="x"><paramtype>const <classname>splay_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>splay_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
6340 <function name="swap"><type>void</type><template>
6341           <template-type-parameter name="T"/>
6342           <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
6343         </template><parameter name="x"><paramtype><classname>splay_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter><parameter name="y"><paramtype><classname>splay_multiset</classname>&lt; T, Options...&gt; &amp;</paramtype></parameter></function>
6344 </namespace>
6345 </namespace>
6346 </header>
6347 <header name="boost/intrusive/splaytree.hpp">
6348 <namespace name="boost">
6349 <namespace name="intrusive">
6350 <class name="splaytree"><template>
6351       <template-type-parameter name="T"/>
6352       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
6353     </template><description><para>The class template splaytree is an intrusive splay tree container that is used to construct intrusive <classname alt="boost::intrusive::splay_set">splay_set</classname> and <classname alt="boost::intrusive::splay_multiset">splay_multiset</classname> containers. The no-throw guarantee holds only, if the key_compare object doesn't throw.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput> and <computeroutput>compare&lt;&gt;</computeroutput>. </para></description><typedef name="value_traits"><type>ValueTraits</type></typedef>
6354 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
6355 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
6356 <typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
6357 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
6358 <typedef name="key_of_value"><type>implementation_defined::key_of_value</type></typedef>
6359 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
6360 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
6361 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
6362 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
6363 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
6364 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
6365 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
6366 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
6367 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
6368 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
6369 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
6370 <typedef name="node"><type>implementation_defined::node</type></typedef>
6371 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
6372 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
6373 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
6374 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
6375 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
6376 <method-group name="public member functions">
6377 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6378 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6379 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6380 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6381 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6382 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6383 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6384 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6385 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6386 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6387 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6388 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6389 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6390 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6391 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6392 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
6393 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
6394 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6395 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6396 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>splaytree</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two containers.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
6397 <method name="clone_from"><type>void</type><template>
6398           <template-type-parameter name="Cloner"/>
6399           <template-type-parameter name="Disposer"/>
6400         </template><parameter name="src"><paramtype>const <classname>splaytree</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. Additional notes: it also copies the alpha factor from the source container. </para></description></method>
6401 <method name="clone_from"><type>void</type><template>
6402           <template-type-parameter name="Cloner"/>
6403           <template-type-parameter name="Disposer"/>
6404         </template><parameter name="src"><paramtype><classname>splaytree</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: This version can modify the source container, useful to implement move semantics. </para></description></method>
6405 <method name="insert_equal"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container before the upper bound.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
6406 <method name="insert_equal"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator.</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case)</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
6407 <method name="insert_equal"><type>void</type><template>
6408           <template-type-parameter name="Iterator"/>
6409         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Inserts a each element of a range into the container before the upper bound of the key of each element.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
6410 <method name="insert_unique"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container if the value is not already present.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
6411 <method name="insert_unique"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert x into the container, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time (two comparisons in the worst case) if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
6412 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
6413 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee. </para></description></method>
6414 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
6415           <template-type-parameter name="KeyType"/>
6416           <template-type-parameter name="KeyTypeKeyCompare"/>
6417         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
6418 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
6419           <template-type-parameter name="KeyType"/>
6420           <template-type-parameter name="KeyTypeKeyCompare"/>
6421         </template><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. The difference is that comp compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp ordering function throws. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the constructing that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that key to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This can give a total constant-time complexity to the insertion: check(O(1)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
6422 <method name="insert_unique_commit"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue of type value_type. commit_data must have been obtained from a previous call to "insert_check". No objects should have been inserted or erased from the container between the "insert_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the container using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the newly inserted object.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
6423 <method name="insert_unique"><type>void</type><template>
6424           <template-type-parameter name="Iterator"/>
6425         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert each element of a range into the container.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by value_comp().</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
6426 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
6427 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
6428 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
6429 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6430 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6431 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6432 <method name="erase"><type>size_type</type><template>
6433           <template-type-parameter name="KeyType"/>
6434           <template-type-parameter name="KeyTypeKeyCompare"/>
6435         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6436 <method name="erase_and_dispose"><type>iterator</type><template>
6437           <template-type-parameter name="Disposer"/>
6438         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
6439 <method name="erase_and_dispose"><type>iterator</type><template>
6440           <template-type-parameter name="Disposer"/>
6441         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
6442 <method name="erase_and_dispose"><type>size_type</type><template>
6443           <template-type-parameter name="Disposer"/>
6444         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6445 <method name="erase_and_dispose"><type>size_type</type><template>
6446           <template-type-parameter name="KeyType"/>
6447           <template-type-parameter name="KeyTypeKeyCompare"/>
6448           <template-type-parameter name="Disposer"/>
6449         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk) and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
6450 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6451 <method name="clear_and_dispose"><type>void</type><template>
6452           <template-type-parameter name="Disposer"/>
6453         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
6454 <method name="count"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: non-const function, splaying is performed. </para></description></method>
6455 <method name="count"><type>size_type</type><template>
6456           <template-type-parameter name="KeyType"/>
6457           <template-type-parameter name="KeyTypeKeyCompare"/>
6458         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: non-const function, splaying is performed. </para></description></method>
6459 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6460 <method name="count" cv="const"><type>size_type</type><template>
6461           <template-type-parameter name="KeyType"/>
6462           <template-type-parameter name="KeyTypeKeyCompare"/>
6463         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6464 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: non-const function, splaying is performed. </para></description></method>
6465 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6466 <method name="lower_bound"><type>iterator</type><template>
6467           <template-type-parameter name="KeyType"/>
6468           <template-type-parameter name="KeyTypeKeyCompare"/>
6469         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "key" </para></description></method>
6470 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
6471           <template-type-parameter name="KeyType"/>
6472           <template-type-parameter name="KeyTypeKeyCompare"/>
6473         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6474 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "value" </para></description></method>
6475 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6476 <method name="upper_bound"><type>iterator</type><template>
6477           <template-type-parameter name="KeyType"/>
6478           <template-type-parameter name="KeyTypeKeyCompare"/>
6479         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "key" </para></description></method>
6480 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
6481           <template-type-parameter name="KeyType"/>
6482           <template-type-parameter name="KeyTypeKeyCompare"/>
6483         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6484 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "value" </para></description></method>
6485 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6486 <method name="find"><type>iterator</type><template>
6487           <template-type-parameter name="KeyType"/>
6488           <template-type-parameter name="KeyTypeKeyCompare"/>
6489         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "key" </para></description></method>
6490 <method name="find" cv="const"><type>const_iterator</type><template>
6491           <template-type-parameter name="KeyType"/>
6492           <template-type-parameter name="KeyTypeKeyCompare"/>
6493         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6494 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "value" </para></description></method>
6495 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6496 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
6497           <template-type-parameter name="KeyType"/>
6498           <template-type-parameter name="KeyTypeKeyCompare"/>
6499         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: non-const function, splaying is performed for the first element of the equal range of "key" </para></description></method>
6500 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
6501           <template-type-parameter name="KeyType"/>
6502           <template-type-parameter name="KeyTypeKeyCompare"/>
6503         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. Additional note: const function, no splaying is performed </para></description></method>
6504 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
6505 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
6506           <template-type-parameter name="KeyType"/>
6507           <template-type-parameter name="KeyTypeKeyCompare"/>
6508         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
6509 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
6510 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
6511           <template-type-parameter name="KeyType"/>
6512           <template-type-parameter name="KeyTypeKeyCompare"/>
6513         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
6514 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6515 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6516 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
6517 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
6518 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
6519 <method name="merge_unique"><type>void</type><template>
6520           <template-type-parameter name="T"/>
6521           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
6522         </template><parameter name=""><paramtype><classname>splaytree</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
6523 <method name="merge_equal"><type>void</type><template>
6524           <template-type-parameter name="T"/>
6525           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
6526         </template><parameter name=""><paramtype><classname>splaytree</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Extracts each element in source and insert it into a using the comparison object of *this.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
6527 <method name="splay_up"><type>void</type><parameter name="i"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: i must be a valid iterator of *this.</para><para><emphasis role="bold">Effects</emphasis>: Rearranges the container so that the element pointed by i is placed as the root of the tree, improving future searches of this value.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6528 <method name="splay_down"><type>iterator</type><template>
6529           <template-type-parameter name="KeyType"/>
6530           <template-type-parameter name="KeyTypeKeyCompare"/>
6531         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Rearranges the container so that if *this stores an element with a key equivalent to value the element is placed as the root of the tree. If the element is not present returns the last node compared with the key. If the tree is empty, end() is returned.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized logarithmic.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the new root of the tree, end() if the tree is empty.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor throws. </para></description></method>
6532 <method name="splay_down"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Rearranges the container so that if *this stores an element with a key equivalent to value the element is placed as the root of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized logarithmic.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the new root of the tree, end() if the tree is empty.</para><para><emphasis role="bold">Throws</emphasis>: If the predicate throws. </para></description></method>
6533 <method name="rebalance"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Rebalances the tree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear. </para></description></method>
6534 <method name="rebalance_subtree"><type>iterator</type><parameter name="root"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: old_root is a node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Rebalances the subtree rooted at old_root.</para><para><emphasis role="bold">Returns</emphasis>: The new root of the subtree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the elements in the subtree. </para></description></method>
6535 </method-group>
6536 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
6537 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container with given comparison and traits.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the key_compare object throws. Basic guarantee. </para></description></constructor>
6538 <constructor><template>
6539           <template-type-parameter name="Iterator"/>
6540         </template><parameter name="unique"><paramtype>bool</paramtype></parameter><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare object throws. Basic guarantee. </para></description></constructor>
6541 <constructor><parameter name="x"><paramtype><classname>splaytree</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
6542 <copy-assignment><type><classname>splaytree</classname> &amp;</type><parameter name="x"><paramtype><classname>splaytree</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
6543 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
6544 <method-group name="public static functions">
6545 <method name="container_from_end_iterator" specifiers="static"><type><classname>splaytree</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
6546 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>splaytree</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
6547 <method name="container_from_iterator" specifiers="static"><type><classname>splaytree</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
6548 <method name="container_from_iterator" specifiers="static"><type>const <classname>splaytree</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
6549 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
6550 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
6551 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
6552 </method-group>
6553 </class><struct name="make_splaytree"><template>
6554       <template-type-parameter name="T"/>
6555       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
6556     </template><description><para>Helper metafunction to define a <computeroutput>splaytree</computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
6557 </struct>
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609 </namespace>
6610 </namespace>
6611 </header>
6612 <header name="boost/intrusive/splaytree_algorithms.hpp">
6613 <namespace name="boost">
6614 <namespace name="intrusive">
6615 <class name="splaytree_algorithms"><template>
6616       <template-type-parameter name="NodeTraits"/>
6617     </template><description><para>A splay tree is an implementation of a binary search tree. The tree is self balancing using the splay algorithm as described in</para><para>"Self-Adjusting Binary Search Trees by Daniel Dominic Sleator and Robert Endre Tarjan AT&amp;T Bell Laboratories, Murray Hill, NJ Journal of the ACM, Vol 32, no 3, July 1985, pp 652-686</para><para><classname alt="boost::intrusive::splaytree_algorithms">splaytree_algorithms</classname> is configured with a NodeTraits class, which encapsulates the information about the node to be manipulated. NodeTraits must support the following interface:</para><para><emphasis role="bold">Typedefs</emphasis>:</para><para><computeroutput>node</computeroutput>: The type of the node that forms the binary search tree</para><para><computeroutput>node_ptr</computeroutput>: A pointer to a node</para><para><computeroutput>const_node_ptr</computeroutput>: A pointer to a const node</para><para><emphasis role="bold">Static functions</emphasis>:</para><para><computeroutput>static node_ptr get_parent(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_parent(node_ptr n, node_ptr parent);</computeroutput></para><para><computeroutput>static node_ptr get_left(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_left(node_ptr n, node_ptr left);</computeroutput></para><para><computeroutput>static node_ptr get_right(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_right(node_ptr n, node_ptr right);</computeroutput> </para></description><typedef name="node"><type>NodeTraits::node</type></typedef>
6618 <typedef name="node_traits"><type>NodeTraits</type></typedef>
6619 <typedef name="node_ptr"><type>NodeTraits::node_ptr</type></typedef>
6620 <typedef name="const_node_ptr"><type>NodeTraits::const_node_ptr</type></typedef>
6621 <typedef name="insert_commit_data"><description><para>This type is the information that will be filled by insert_unique_check </para></description><type>bstree_algo::insert_commit_data</type></typedef>
6622 <method-group name="public static functions">
6623 <method name="get_header" specifiers="static"><type>node_ptr</type><parameter name="n"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node of the tree or a header node.</para><para><emphasis role="bold">Effects</emphasis>: Returns the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6624 <method name="begin_node" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'header' is the header node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns the first node of the tree, the header if the tree is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6625 <method name="end_node" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'header' is the header node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6626 <method name="swap_tree" specifiers="static"><type>void</type><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the header nodes of two trees.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two trees. After the function header1 will contain links to the second tree and header2 will have links to the first tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6627 <method name="swap_nodes" specifiers="static"><type>void</type><parameter name="node1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="node2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node1 and node2 can't be header nodes of two trees.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two nodes. After the function node1 will be inserted in the position node2 before the function. node2 will be inserted in the position node1 had before the function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if node1 and node2 are not equivalent according to the ordering rules.</para><para>Experimental function </para></description></method>
6628 <method name="swap_nodes" specifiers="static"><type>void</type><parameter name="node1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="node2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node1 and node2 can't be header nodes of two trees with header header1 and header2.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two nodes. After the function node1 will be inserted in the position node2 before the function. node2 will be inserted in the position node1 had before the function.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if node1 and node2 are not equivalent according to the ordering rules.</para><para>Experimental function </para></description></method>
6629 <method name="replace_node" specifiers="static"><type>void</type><parameter name="node_to_be_replaced"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node_to_be_replaced must be inserted in a tree and new_node must not be inserted in a tree.</para><para><emphasis role="bold">Effects</emphasis>: Replaces node_to_be_replaced in its position in the tree with new_node. The tree does not need to be rebalanced</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if new_node is not equivalent to node_to_be_replaced according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing and comparison is needed. Experimental function </para></description></method>
6630 <method name="replace_node" specifiers="static"><type>void</type><parameter name="node_to_be_replaced"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node_to_be_replaced must be inserted in a tree with header "header" and new_node must not be inserted in a tree.</para><para><emphasis role="bold">Effects</emphasis>: Replaces node_to_be_replaced in its position in the tree with new_node. The tree does not need to be rebalanced</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if new_node is not equivalent to node_to_be_replaced according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. Experimental function </para></description></method>
6631 <method name="unlink" specifiers="static"><type>void</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node is a tree node but not the header.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the node and rebalances the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6632 <method name="unlink_leftmost_without_rebalance" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header is the header of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the tree, and updates the header link to the new leftmost node.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the tree and the tree can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the tree. </para></description></method>
6633 <method name="unique" specifiers="static"><type>bool</type><parameter name="node"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node of the tree or a node initialized by init(...) or init_node.</para><para><emphasis role="bold">Effects</emphasis>: Returns true if the node is initialized by init() or init_node().</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6634 <method name="size" specifiers="static"><type>std::size_t</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node is a node of the tree but it's not the header.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of nodes of the subtree.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6635 <method name="next_node" specifiers="static"><type>node_ptr</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node from the tree except the header.</para><para><emphasis role="bold">Effects</emphasis>: Returns the next node of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6636 <method name="prev_node" specifiers="static"><type>node_ptr</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node from the tree except the leftmost node.</para><para><emphasis role="bold">Effects</emphasis>: Returns the previous node of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6637 <method name="init" specifiers="static"><type>void</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' must not be part of any tree.</para><para><emphasis role="bold">Effects</emphasis>: After the function unique(node) == true.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Nodes</emphasis>: If node is inserted in a tree, this function corrupts the tree. </para></description></method>
6638 <method name="init_header" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node must not be part of any tree.</para><para><emphasis role="bold">Effects</emphasis>: Initializes the header to represent an empty tree. unique(header) == true.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Nodes</emphasis>: If node is inserted in a tree, this function corrupts the tree. </para></description></method>
6639 <method name="erase" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header must be the header of a tree, z a node of that tree and z != header.</para><para><emphasis role="bold">Effects</emphasis>: Erases node "z" from the tree with header "header".</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. Additional notes: the previous node of z is splayed to speed up range deletions. </para></description></method>
6640 <method name="transfer_unique" specifiers="static"><type>bool</type><template>
6641           <template-type-parameter name="NodePtrCompare"/>
6642         </template><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the headers of trees tree1 and tree2 respectively, z a non-header node of tree1. NodePtrCompare is the comparison function of tree1..</para><para><emphasis role="bold">Effects</emphasis>: Transfers node "z" from tree1 to tree2 if tree1 does not contain a node that is equivalent to z.</para><para><emphasis role="bold">Returns</emphasis>: True if the node was trasferred, false otherwise.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison throws. </para></description></method>
6643 <method name="transfer_equal" specifiers="static"><type>void</type><template>
6644           <template-type-parameter name="NodePtrCompare"/>
6645         </template><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the headers of trees tree1 and tree2 respectively, z a non-header node of tree1. NodePtrCompare is the comparison function of tree1..</para><para><emphasis role="bold">Effects</emphasis>: Transfers node "z" from tree1 to tree2.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison throws. </para></description></method>
6646 <method name="clone" specifiers="static"><type>void</type><template>
6647           <template-type-parameter name="Cloner"/>
6648           <template-type-parameter name="Disposer"/>
6649         </template><parameter name="source_header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="target_header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "cloner" must be a function object taking a node_ptr and returning a new cloned node of it. "disposer" must take a node_ptr and shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: First empties target tree calling <computeroutput>void disposer::operator()(const node_ptr &amp;)</computeroutput> for every node of the tree except the header.</para><para>Then, duplicates the entire tree pointed by "source_header" cloning each source node with <computeroutput>node_ptr Cloner::operator()(const node_ptr &amp;)</computeroutput> to obtain the nodes of the target tree. If "cloner" throws, the cloned target nodes are disposed using <computeroutput>void disposer(const node_ptr &amp;)</computeroutput>.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of element of the source tree plus the number of elements of tree target tree when calling this function.</para><para><emphasis role="bold">Throws</emphasis>: If cloner functor throws. If this happens target nodes are disposed. </para></description></method>
6650 <method name="clear_and_dispose" specifiers="static"><type>void</type><template>
6651           <template-type-parameter name="Disposer"/>
6652         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "disposer" must be an object function taking a node_ptr parameter and shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Empties the target tree calling <computeroutput>void disposer::operator()(const node_ptr &amp;)</computeroutput> for every node of the tree except the header.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of element of the source tree plus the. number of elements of tree target tree when calling this function.</para><para><emphasis role="bold">Throws</emphasis>: If cloner functor throws. If this happens target nodes are disposed. </para></description></method>
6653 <method name="count" specifiers="static"><type>std::size_t</type><template>
6654           <template-type-parameter name="KeyType"/>
6655           <template-type-parameter name="KeyNodePtrCompare"/>
6656         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements with a key equivalent to "key" according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. Additional notes: an element with key <computeroutput>key</computeroutput> is splayed. </para></description></method>
6657 <method name="count" specifiers="static"><type>std::size_t</type><template>
6658           <template-type-parameter name="KeyType"/>
6659           <template-type-parameter name="KeyNodePtrCompare"/>
6660         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements with a key equivalent to "key" according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. Additional note: no splaying is performed </para></description></method>
6661 <method name="lower_bound" specifiers="static"><type>node_ptr</type><template>
6662           <template-type-parameter name="KeyType"/>
6663           <template-type-parameter name="KeyNodePtrCompare"/>
6664         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is not less than "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. Additional notes: the first node of the range is splayed. </para></description></method>
6665 <method name="lower_bound" specifiers="static"><type>node_ptr</type><template>
6666           <template-type-parameter name="KeyType"/>
6667           <template-type-parameter name="KeyNodePtrCompare"/>
6668         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is not less than "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. Additional note: no splaying is performed </para></description></method>
6669 <method name="upper_bound" specifiers="static"><type>node_ptr</type><template>
6670           <template-type-parameter name="KeyType"/>
6671           <template-type-parameter name="KeyNodePtrCompare"/>
6672         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is greater than "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. Additional notes: the first node of the range is splayed. </para></description></method>
6673 <method name="upper_bound" specifiers="static"><type>node_ptr</type><template>
6674           <template-type-parameter name="KeyType"/>
6675           <template-type-parameter name="KeyNodePtrCompare"/>
6676         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is greater than "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. Additional note: no splaying is performed </para></description></method>
6677 <method name="find" specifiers="static"><type>node_ptr</type><template>
6678           <template-type-parameter name="KeyType"/>
6679           <template-type-parameter name="KeyNodePtrCompare"/>
6680         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is equivalent to "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. Additional notes: the found node of the lower bound is splayed. </para></description></method>
6681 <method name="find" specifiers="static"><type>node_ptr</type><template>
6682           <template-type-parameter name="KeyType"/>
6683           <template-type-parameter name="KeyNodePtrCompare"/>
6684         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is equivalent to "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. Additional note: no splaying is performed </para></description></method>
6685 <method name="equal_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
6686           <template-type-parameter name="KeyType"/>
6687           <template-type-parameter name="KeyNodePtrCompare"/>
6688         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair of node_ptr delimiting a range containing all elements that are equivalent to "key" according to "comp" or an empty range that indicates the position where those elements would be if there are no equivalent elements.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. Additional notes: the first node of the range is splayed. </para></description></method>
6689 <method name="equal_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
6690           <template-type-parameter name="KeyType"/>
6691           <template-type-parameter name="KeyNodePtrCompare"/>
6692         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair of node_ptr delimiting a range containing all elements that are equivalent to "key" according to "comp" or an empty range that indicates the position where those elements would be if there are no equivalent elements.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. Additional note: no splaying is performed </para></description></method>
6693 <method name="lower_bound_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
6694           <template-type-parameter name="KeyType"/>
6695           <template-type-parameter name="KeyNodePtrCompare"/>
6696         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair of node_ptr delimiting a range containing the first element that is equivalent to "key" according to "comp" or an empty range that indicates the position where that element would be if there are no equivalent elements.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. Additional notes: the first node of the range is splayed. </para></description></method>
6697 <method name="lower_bound_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
6698           <template-type-parameter name="KeyType"/>
6699           <template-type-parameter name="KeyNodePtrCompare"/>
6700         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair of node_ptr delimiting a range containing the first element that is equivalent to "key" according to "comp" or an empty range that indicates the position where that element would be if there are no equivalent elements.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. Additional note: no splaying is performed </para></description></method>
6701 <method name="bounded_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
6702           <template-type-parameter name="KeyType"/>
6703           <template-type-parameter name="KeyNodePtrCompare"/>
6704         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. 'lower_key' must not be greater than 'upper_key' according to 'comp'. If 'lower_key' == 'upper_key', ('left_closed' || 'right_closed') must be true.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change. Additional notes: the first node of the range is splayed. </para></description></method>
6705 <method name="bounded_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
6706           <template-type-parameter name="KeyType"/>
6707           <template-type-parameter name="KeyNodePtrCompare"/>
6708         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. 'lower_key' must not be greater than 'upper_key' according to 'comp'. If 'lower_key' == 'upper_key', ('left_closed' || 'right_closed') must be true.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change. Additional note: no splaying is performed </para></description></method>
6709 <method name="insert_equal_upper_bound" specifiers="static"><type>node_ptr</type><template>
6710           <template-type-parameter name="NodePtrCompare"/>
6711         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "h" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before the upper bound according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. Additional note: the inserted node is splayed </para></description></method>
6712 <method name="insert_equal_lower_bound" specifiers="static"><type>node_ptr</type><template>
6713           <template-type-parameter name="NodePtrCompare"/>
6714         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "h" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before the lower bound according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. Additional note: the inserted node is splayed </para></description></method>
6715 <method name="insert_equal" specifiers="static"><type>node_ptr</type><template>
6716           <template-type-parameter name="NodePtrCompare"/>
6717         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="hint"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs. "hint" is node from the "header"'s tree.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case).</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if new_node is inserted immediately before "hint".</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. Additional note: the inserted node is splayed </para></description></method>
6718 <method name="insert_before" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="pos"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "pos" must be a valid iterator or header (end) node. "pos" must be an iterator pointing to the successor to "new_node" once inserted according to the order of already inserted nodes. This function does not check "pos" and this precondition must be guaranteed by the caller.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: If "pos" is not the successor of the newly inserted "new_node" tree invariants might be broken. Additional note: the inserted node is splayed </para></description></method>
6719 <method name="push_back" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "new_node" must be, according to the used ordering no less than the greatest inserted key.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: If "new_node" is less than the greatest inserted key tree invariants are broken. This function is slightly faster than using "insert_before". Additional note: the inserted node is splayed </para></description></method>
6720 <method name="push_front" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "new_node" must be, according to the used ordering, no greater than the lowest inserted key.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: If "new_node" is greater than the lowest inserted key tree invariants are broken. This function is slightly faster than using "insert_before". Additional note: the inserted node is splayed </para></description></method>
6721 <method name="insert_unique_check" specifiers="static"><type>std::pair&lt; node_ptr, bool &gt;</type><template>
6722           <template-type-parameter name="KeyType"/>
6723           <template-type-parameter name="KeyNodePtrCompare"/>
6724         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares KeyType with a node_ptr.</para><para><emphasis role="bold">Effects</emphasis>: Checks if there is an equivalent node to "key" in the tree according to "comp" and obtains the needed information to realize a constant-time node insertion if there is no equivalent node.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing a node_ptr to the already present node and false. If there is not equivalent key can be inserted returns true in the returned pair's boolean and fills "commit_data" that is meant to be used with the "insert_commit" function to achieve a constant-time insertion function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a node is expensive and the user does not want to have two equivalent nodes in the tree: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the node and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the node and use "insert_commit" to insert the node in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_unique_commit" only if no more objects are inserted or erased from the set. Additional note: nodes with the given key are splayed </para></description></method>
6725 <method name="insert_unique_check" specifiers="static"><type>std::pair&lt; node_ptr, bool &gt;</type><template>
6726           <template-type-parameter name="KeyType"/>
6727           <template-type-parameter name="KeyNodePtrCompare"/>
6728         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="hint"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares KeyType with a node_ptr. "hint" is node from the "header"'s tree.</para><para><emphasis role="bold">Effects</emphasis>: Checks if there is an equivalent node to "key" in the tree according to "comp" using "hint" as a hint to where it should be inserted and obtains the needed information to realize a constant-time node insertion if there is no equivalent node. If "hint" is the upper_bound the function has constant time complexity (two comparisons in the worst case).</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing a node_ptr to the already present node and false. If there is not equivalent key can be inserted returns true in the returned pair's boolean and fills "commit_data" that is meant to be used with the "insert_commit" function to achieve a constant-time insertion function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic, but it is amortized constant time if new_node should be inserted immediately before "hint".</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a node is expensive and the user does not want to have two equivalent nodes in the tree: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the node and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the node and use "insert_commit" to insert the node in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_unique_commit" only if no more objects are inserted or erased from the set. Additional note: nodes with the given key are splayed </para></description></method>
6729 <method name="insert_unique_commit" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_value"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "commit_data" must have been obtained from a previous call to "insert_unique_check". No objects should have been inserted or erased from the set between the "insert_unique_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node in the set using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_unique_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
6730 <method name="is_header" specifiers="static"><type>bool</type><parameter name="p"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: p is a node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns true if p is the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6731 <method name="rebalance" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header must be the header of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Rebalances the tree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear. </para></description></method>
6732 <method name="rebalance_subtree" specifiers="static"><type>node_ptr</type><parameter name="old_root"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: old_root is a node of a tree. It shall not be null.</para><para><emphasis role="bold">Effects</emphasis>: Rebalances the subtree rooted at old_root.</para><para><emphasis role="bold">Returns</emphasis>: The new root of the subtree.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Linear. </para></description></method>
6733 <method name="splay_up" specifiers="static"><type>void</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter></method>
6734 <method name="splay_down" specifiers="static"><type>node_ptr</type><template>
6735           <template-type-parameter name="KeyType"/>
6736           <template-type-parameter name="KeyNodePtrCompare"/>
6737         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="pfound"><paramtype>bool *</paramtype><default>0</default></parameter></method>
6738 </method-group>
6739 </class>
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791 </namespace>
6792 </namespace>
6793 </header>
6794 <header name="boost/intrusive/treap.hpp">
6795 <namespace name="boost">
6796 <namespace name="intrusive">
6797 <class name="treap"><template>
6798       <template-type-parameter name="T"/>
6799       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
6800     </template><description><para>The class template treap is an intrusive treap container that is used to construct intrusive set and multiset containers. The no-throw guarantee holds only, if the key_compare object and priority_compare object don't throw.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput>, <computeroutput>compare&lt;&gt;</computeroutput> and <computeroutput>priority_compare&lt;&gt;</computeroutput> </para></description><typedef name="value_traits"><type>ValueTraits</type></typedef>
6801 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
6802 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
6803 <typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
6804 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
6805 <typedef name="key_of_value"><type>implementation_defined::key_of_value</type></typedef>
6806 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
6807 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
6808 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
6809 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
6810 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
6811 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
6812 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
6813 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
6814 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
6815 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
6816 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
6817 <typedef name="node"><type>implementation_defined::node</type></typedef>
6818 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
6819 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
6820 <typedef name="node_algorithms"><type>implementation_defined</type></typedef>
6821 <typedef name="priority_compare"><type>implementation_defined</type></typedef>
6822 <typedef name="key_node_prio_comp_t"><type><emphasis>unspecified</emphasis></type></typedef>
6823 <typedef name="insert_commit_data"><type>node_algorithms::insert_commit_data</type></typedef>
6824 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
6825 <data-member name="stateful_value_traits" specifiers="static"><type>const bool</type></data-member>
6826 <data-member name="safemode_or_autounlink" specifiers="static"><type>const bool</type></data-member>
6827 <method-group name="public member functions">
6828 <method name="key_node_prio_comp" cv="const"><type><emphasis>unspecified</emphasis></type><template>
6829           <template-type-parameter name="KeyPrioComp"/>
6830         </template><parameter name="keypriocomp"><paramtype>KeyPrioComp</paramtype></parameter></method>
6831 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6832 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6833 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6834 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6835 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6836 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6837 <method name="top"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the highest priority object of the treap.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6838 <method name="top" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the highest priority object of the treap..</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6839 <method name="ctop" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the highest priority object of the treap..</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6840 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6841 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6842 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6843 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6844 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6845 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6846 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6847 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6848 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6849 <method name="rtop"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the highest priority object of the reversed treap.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6850 <method name="rtop" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the highest priority objec of the reversed treap.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6851 <method name="crtop" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the highest priority object of the reversed treap.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6852 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
6853 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
6854 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6855 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6856 <method name="priority_comp" cv="const"><type>priority_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the priority_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If priority_compare copy-constructor throws. </para></description></method>
6857 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>treap</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two treaps.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
6858 <method name="clone_from"><type>void</type><template>
6859           <template-type-parameter name="Cloner"/>
6860           <template-type-parameter name="Disposer"/>
6861         </template><parameter name="src"><paramtype>const <classname>treap</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. </para></description></method>
6862 <method name="clone_from"><type>void</type><template>
6863           <template-type-parameter name="Cloner"/>
6864           <template-type-parameter name="Disposer"/>
6865         </template><parameter name="src"><paramtype><classname>treap</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. </para></description></method>
6866 <method name="insert_equal"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container before the upper bound.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare or priority_compare functions throw. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
6867 <method name="insert_equal"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator.</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case)</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare or priority_compare functions throw. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
6868 <method name="insert_equal"><type>void</type><template>
6869           <template-type-parameter name="Iterator"/>
6870         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Inserts a each element of a range into the container before the upper bound of the key of each element.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by key_comp().</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare or priority_compare functions throw. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
6871 <method name="insert_unique"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container if the value is not already present.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare or priority_compare functions throw. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
6872 <method name="insert_unique"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert x into the container, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time (two comparisons in the worst case) if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare or priority_compare functions throw. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
6873 <method name="insert_unique"><type>void</type><template>
6874           <template-type-parameter name="Iterator"/>
6875         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert each element of a range into the container.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by key_comp().</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare or priority_compare functions throw. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
6876 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison or predicate functions throw. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
6877 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison or predicate functions throw. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the constructing that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that key to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This can give a total constant-time complexity to the insertion: check(O(1)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
6878 <method name="insert_unique_check"><type>std::pair&lt; iterator BOOST_INTRUSIVE_I bool &gt;</type><template>
6879           <template-type-parameter name="KeyType"/>
6880           <template-type-parameter name="KeyTypeKeyCompare"/>
6881           <template-type-parameter name="KeyValuePrioCompare"/>
6882         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="key_value_pcomp"><paramtype>KeyValuePrioCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. key_value_pcomp must be a comparison function that induces the same strict weak ordering as priority_compare. The difference is that key_value_pcomp and comp compare an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp or key_value_pcomp ordering functions throw. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
6883 <method name="insert_unique_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
6884           <template-type-parameter name="KeyType"/>
6885           <template-type-parameter name="KeyTypeKeyCompare"/>
6886           <template-type-parameter name="KeyValuePrioCompare"/>
6887         </template><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="key_value_pcomp"><paramtype>KeyValuePrioCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. key_value_pcomp must be a comparison function that induces the same strict weak ordering as priority_compare. The difference is that key_value_pcomp and comp compare an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp or key_value_pcomp ordering functions throw. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the constructing that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that key to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This can give a total constant-time complexity to the insertion: check(O(1)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
6888 <method name="insert_unique_commit"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue of type value_type. commit_data must have been obtained from a previous call to "insert_check". No objects should have been inserted or erased from the container between the "insert_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the <classname alt="boost::intrusive::avl_set">avl_set</classname> using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the newly inserted object.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
6889 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: If the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
6890 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: If the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
6891 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: If the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
6892 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6893 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6894 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6895 <method name="erase"><type>size_type</type><template>
6896           <template-type-parameter name="KeyType"/>
6897           <template-type-parameter name="KeyTypeKeyCompare"/>
6898         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Equivalent guarantee to <emphasis>while(beg != end) erase(beg++);</emphasis></para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6899 <method name="erase_and_dispose"><type>iterator</type><template>
6900           <template-type-parameter name="Disposer"/>
6901         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
6902 <method name="erase_and_dispose"><type>iterator</type><template>
6903           <template-type-parameter name="Disposer"/>
6904         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
6905 <method name="erase_and_dispose"><type>size_type</type><template>
6906           <template-type-parameter name="Disposer"/>
6907         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: if the priority_compare function throws then weak guarantee and heap invariants are broken. The safest thing would be to clear or destroy the container.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6908 <method name="erase_and_dispose"><type>size_type</type><template>
6909           <template-type-parameter name="KeyType"/>
6910           <template-type-parameter name="KeyTypeKeyCompare"/>
6911           <template-type-parameter name="Disposer"/>
6912         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: if the priority_compare function throws then weak guarantee and heap invariants are broken. The safest thing would be to clear or destroy the container.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
6913 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
6914 <method name="clear_and_dispose"><type>void</type><template>
6915           <template-type-parameter name="Disposer"/>
6916         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
6917 <method name="merge_unique"><type>void</type><template>
6918           <template-type-parameter name="T"/>
6919           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
6920         </template><parameter name=""><paramtype><classname>sgtree</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
6921 <method name="while"><type/><parameter name=""><paramtype>it!</paramtype><default>itend</default></parameter></method>
6922 <method name="merge_equal"><type>void</type><template>
6923           <template-type-parameter name="T"/>
6924           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
6925         </template><parameter name=""><paramtype><classname>sgtree</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Extracts each element in source and insert it into a using the comparison object of *this.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
6926 <method name="while"><type/><parameter name=""><paramtype>it!</paramtype><default>itend</default></parameter></method>
6927 <method name="check" cv="const"><type>void</type><template>
6928           <template-type-parameter name="ExtraChecker"/>
6929         </template><parameter name="extra_checker"><paramtype>ExtraChecker</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Asserts the integrity of the container with additional checks provided by the user.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time.</para><para><emphasis role="bold">Note</emphasis>: The method might not have effect when asserts are turned off (e.g., with NDEBUG). Experimental function, interface might change in future versions. </para></description></method>
6930 <method name="check" cv="const"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Asserts the integrity of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time.</para><para><emphasis role="bold">Note</emphasis>: The method has no effect when asserts are turned off (e.g., with NDEBUG). Experimental function, interface might change in future versions. </para></description></method>
6931 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
6932 <method name="count" cv="const"><type>size_type</type><template>
6933           <template-type-parameter name="KeyType"/>
6934           <template-type-parameter name="KeyTypeKeyCompare"/>
6935         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
6936 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
6937 <method name="lower_bound"><type>iterator</type><template>
6938           <template-type-parameter name="KeyType"/>
6939           <template-type-parameter name="KeyTypeKeyCompare"/>
6940         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
6941 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
6942 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
6943           <template-type-parameter name="KeyType"/>
6944           <template-type-parameter name="KeyTypeKeyCompare"/>
6945         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
6946 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
6947 <method name="upper_bound"><type>iterator</type><template>
6948           <template-type-parameter name="KeyType"/>
6949           <template-type-parameter name="KeyTypeKeyCompare"/>
6950         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
6951 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
6952 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
6953           <template-type-parameter name="KeyType"/>
6954           <template-type-parameter name="KeyTypeKeyCompare"/>
6955         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
6956 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
6957 <method name="find"><type>iterator</type><template>
6958           <template-type-parameter name="KeyType"/>
6959           <template-type-parameter name="KeyTypeKeyCompare"/>
6960         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
6961 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
6962 <method name="find" cv="const"><type>const_iterator</type><template>
6963           <template-type-parameter name="KeyType"/>
6964           <template-type-parameter name="KeyTypeKeyCompare"/>
6965         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
6966 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
6967 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
6968           <template-type-parameter name="KeyType"/>
6969           <template-type-parameter name="KeyTypeKeyCompare"/>
6970         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
6971 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
6972 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
6973           <template-type-parameter name="KeyType"/>
6974           <template-type-parameter name="KeyTypeKeyCompare"/>
6975         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
6976 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
6977 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
6978           <template-type-parameter name="KeyType"/>
6979           <template-type-parameter name="KeyTypeKeyCompare"/>
6980         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
6981 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
6982 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
6983           <template-type-parameter name="KeyType"/>
6984           <template-type-parameter name="KeyTypeKeyCompare"/>
6985         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
6986 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6987 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
6988 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
6989 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
6990 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
6991 </method-group>
6992 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the value_compare/priority_compare objects throw. Basic guarantee. </para></description></constructor>
6993 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="pcmp"><paramtype>const priority_compare &amp;</paramtype><default>priority_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the value_compare/priority_compare objects throw. Basic guarantee. </para></description></constructor>
6994 <constructor><template>
6995           <template-type-parameter name="Iterator"/>
6996         </template><parameter name="unique"><paramtype>bool</paramtype></parameter><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="pcmp"><paramtype>const priority_compare &amp;</paramtype><default>priority_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare/priority_compare objects throw. Basic guarantee. </para></description></constructor>
6997 <constructor><parameter name="x"><paramtype><classname>treap</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
6998 <copy-assignment><type><classname>treap</classname> &amp;</type><parameter name="x"><paramtype><classname>treap</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
6999 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
7000 <method-group name="public static functions">
7001 <method name="container_from_end_iterator" specifiers="static"><type><classname>treap</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
7002 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>treap</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
7003 <method name="container_from_iterator" specifiers="static"><type><classname>treap</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
7004 <method name="container_from_iterator" specifiers="static"><type>const <classname>treap</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
7005 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
7006 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
7007 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
7008 </method-group>
7009 </class><struct name="make_treap"><template>
7010       <template-type-parameter name="T"/>
7011       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
7012     </template><description><para>Helper metafunction to define a <computeroutput>treap</computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="packed_options"><type><classname>pack_options</classname>&lt; treap_defaults, O1, O2, O3, O4, O5, O6 &gt;::<classname>type</classname></type></typedef>
7013 <typedef name="value_traits"><type><emphasis>unspecified</emphasis></type></typedef>
7014 <typedef name="implementation_defined"><type><classname>treap</classname>&lt; value_traits, typename packed_options::key_of_value, typename packed_options::compare, typename packed_options::priority, typename packed_options::size_type, packed_options::constant_time_size, typename packed_options::header_holder_type &gt;</type></typedef>
7015 <typedef name="type"><type><classname>implementation_defined</classname></type></typedef>
7016 </struct>
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068 </namespace>
7069 </namespace>
7070 </header>
7071 <header name="boost/intrusive/treap_algorithms.hpp">
7072 <namespace name="boost">
7073 <namespace name="intrusive">
7074 <class name="treap_algorithms"><template>
7075       <template-type-parameter name="NodeTraits"/>
7076     </template><description><para><classname alt="boost::intrusive::treap_algorithms">treap_algorithms</classname> provides basic algorithms to manipulate nodes forming a treap.</para><para>(1) the header node is maintained with links not only to the root but also to the leftmost node of the tree, to enable constant time begin(), and to the rightmost node of the tree, to enable linear time performance when used with the generic set algorithms (set_union, etc.);</para><para>(2) when a node being deleted has two children its successor node is relinked into its place, rather than copied, so that the only pointers invalidated are those referring to the deleted node.</para><para><classname alt="boost::intrusive::treap_algorithms">treap_algorithms</classname> is configured with a NodeTraits class, which encapsulates the information about the node to be manipulated. NodeTraits must support the following interface:</para><para><emphasis role="bold">Typedefs</emphasis>:</para><para><computeroutput>node</computeroutput>: The type of the node that forms the treap</para><para><computeroutput>node_ptr</computeroutput>: A pointer to a node</para><para><computeroutput>const_node_ptr</computeroutput>: A pointer to a const node</para><para><emphasis role="bold">Static functions</emphasis>:</para><para><computeroutput>static node_ptr get_parent(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_parent(node_ptr n, node_ptr parent);</computeroutput></para><para><computeroutput>static node_ptr get_left(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_left(node_ptr n, node_ptr left);</computeroutput></para><para><computeroutput>static node_ptr get_right(const_node_ptr n);</computeroutput></para><para><computeroutput>static void set_right(node_ptr n, node_ptr right);</computeroutput> </para></description><struct name="insert_commit_data"><description><para>This type is the information that will be filled by insert_unique_check </para></description></struct><typedef name="node_traits"><type>NodeTraits</type></typedef>
7077 <typedef name="node"><type>NodeTraits::node</type></typedef>
7078 <typedef name="node_ptr"><type>NodeTraits::node_ptr</type></typedef>
7079 <typedef name="const_node_ptr"><type>NodeTraits::const_node_ptr</type></typedef>
7080 <method-group name="public static functions">
7081 <method name="get_header" specifiers="static"><type>node_ptr</type><parameter name="n"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node of the tree or a header node.</para><para><emphasis role="bold">Effects</emphasis>: Returns the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7082 <method name="begin_node" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'header' is the header node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns the first node of the tree, the header if the tree is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7083 <method name="end_node" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'header' is the header node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7084 <method name="swap_tree" specifiers="static"><type>void</type><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the header nodes of two trees.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two trees. After the function header1 will contain links to the second tree and header2 will have links to the first tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7085 <method name="swap_nodes" specifiers="static"><type>void</type><parameter name="node1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="node2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node1 and node2 can't be header nodes of two trees.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two nodes. After the function node1 will be inserted in the position node2 before the function. node2 will be inserted in the position node1 had before the function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if node1 and node2 are not equivalent according to the ordering rules.</para><para>Experimental function </para></description></method>
7086 <method name="swap_nodes" specifiers="static"><type>void</type><parameter name="node1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="node2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node1 and node2 can't be header nodes of two trees with header header1 and header2.</para><para><emphasis role="bold">Effects</emphasis>: Swaps two nodes. After the function node1 will be inserted in the position node2 before the function. node2 will be inserted in the position node1 had before the function.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if node1 and node2 are not equivalent according to the ordering rules.</para><para>Experimental function </para></description></method>
7087 <method name="replace_node" specifiers="static"><type>void</type><parameter name="node_to_be_replaced"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node_to_be_replaced must be inserted in a tree and new_node must not be inserted in a tree.</para><para><emphasis role="bold">Effects</emphasis>: Replaces node_to_be_replaced in its position in the tree with new_node. The tree does not need to be rebalanced</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if new_node is not equivalent to node_to_be_replaced according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing and comparison is needed. Experimental function </para></description></method>
7088 <method name="replace_node" specifiers="static"><type>void</type><parameter name="node_to_be_replaced"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node_to_be_replaced must be inserted in a tree with header "header" and new_node must not be inserted in a tree.</para><para><emphasis role="bold">Effects</emphasis>: Replaces node_to_be_replaced in its position in the tree with new_node. The tree does not need to be rebalanced</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if new_node is not equivalent to node_to_be_replaced according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. Experimental function </para></description></method>
7089 <method name="unlink" specifiers="static"><type>void</type><template>
7090           <template-type-parameter name="NodePtrPriorityCompare"/>
7091         </template><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="pcomp"><paramtype>NodePtrPriorityCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node is a tree node but not the header.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the node and rebalances the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7092 <method name="unlink_leftmost_without_rebalance" specifiers="static"><type>node_ptr</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header is the header of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the tree, and updates the header link to the new leftmost node.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the tree and the tree can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the tree. </para></description></method>
7093 <method name="unique" specifiers="static"><type>bool</type><parameter name="node"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node of the tree or a node initialized by init(...) or init_node.</para><para><emphasis role="bold">Effects</emphasis>: Returns true if the node is initialized by init() or init_node().</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7094 <method name="size" specifiers="static"><type>std::size_t</type><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node is a node of the tree but it's not the header.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of nodes of the subtree.</para><para><emphasis role="bold">Complexity</emphasis>: Linear time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7095 <method name="next_node" specifiers="static"><type>node_ptr</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node from the tree except the header.</para><para><emphasis role="bold">Effects</emphasis>: Returns the next node of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7096 <method name="prev_node" specifiers="static"><type>node_ptr</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' is a node from the tree except the leftmost node.</para><para><emphasis role="bold">Effects</emphasis>: Returns the previous node of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Average constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7097 <method name="init" specifiers="static"><type>void</type><parameter name="node"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: 'node' must not be part of any tree.</para><para><emphasis role="bold">Effects</emphasis>: After the function unique(node) == true.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Nodes</emphasis>: If node is inserted in a tree, this function corrupts the tree. </para></description></method>
7098 <method name="init_header" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: node must not be part of any tree.</para><para><emphasis role="bold">Effects</emphasis>: Initializes the header to represent an empty tree. unique(header) == true.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Nodes</emphasis>: If node is inserted in a tree, this function corrupts the tree. </para></description></method>
7099 <method name="erase" specifiers="static"><type>node_ptr</type><template>
7100           <template-type-parameter name="NodePtrPriorityCompare"/>
7101         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="pcomp"><paramtype>NodePtrPriorityCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header must be the header of a tree, z a node of that tree and z != header.</para><para><emphasis role="bold">Effects</emphasis>: Erases node "z" from the tree with header "header".</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7102 <method name="clone" specifiers="static"><type>void</type><template>
7103           <template-type-parameter name="Cloner"/>
7104           <template-type-parameter name="Disposer"/>
7105         </template><parameter name="source_header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="target_header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "cloner" must be a function object taking a node_ptr and returning a new cloned node of it. "disposer" must take a node_ptr and shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: First empties target tree calling <computeroutput>void disposer::operator()(const node_ptr &amp;)</computeroutput> for every node of the tree except the header.</para><para>Then, duplicates the entire tree pointed by "source_header" cloning each source node with <computeroutput>node_ptr Cloner::operator()(const node_ptr &amp;)</computeroutput> to obtain the nodes of the target tree. If "cloner" throws, the cloned target nodes are disposed using <computeroutput>void disposer(const node_ptr &amp;)</computeroutput>.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of element of the source tree plus the number of elements of tree target tree when calling this function.</para><para><emphasis role="bold">Throws</emphasis>: If cloner functor throws. If this happens target nodes are disposed. </para></description></method>
7106 <method name="clear_and_dispose" specifiers="static"><type>void</type><template>
7107           <template-type-parameter name="Disposer"/>
7108         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "disposer" must be an object function taking a node_ptr parameter and shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Empties the target tree calling <computeroutput>void disposer::operator()(const node_ptr &amp;)</computeroutput> for every node of the tree except the header.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of element of the source tree plus the. number of elements of tree target tree when calling this function.</para><para><emphasis role="bold">Throws</emphasis>: If cloner functor throws. If this happens target nodes are disposed. </para></description></method>
7109 <method name="lower_bound" specifiers="static"><type>node_ptr</type><template>
7110           <template-type-parameter name="KeyType"/>
7111           <template-type-parameter name="KeyNodePtrCompare"/>
7112         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is not less than "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
7113 <method name="upper_bound" specifiers="static"><type>node_ptr</type><template>
7114           <template-type-parameter name="KeyType"/>
7115           <template-type-parameter name="KeyNodePtrCompare"/>
7116         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is greater than "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
7117 <method name="find" specifiers="static"><type>node_ptr</type><template>
7118           <template-type-parameter name="KeyType"/>
7119           <template-type-parameter name="KeyNodePtrCompare"/>
7120         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns a node_ptr to the first element that is equivalent to "key" according to "comp" or "header" if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
7121 <method name="equal_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
7122           <template-type-parameter name="KeyType"/>
7123           <template-type-parameter name="KeyNodePtrCompare"/>
7124         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair of node_ptr delimiting a range containing all elements that are equivalent to "key" according to "comp" or an empty range that indicates the position where those elements would be if there are no equivalent elements.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
7125 <method name="bounded_range" specifiers="static"><type>std::pair&lt; node_ptr, node_ptr &gt;</type><template>
7126           <template-type-parameter name="KeyType"/>
7127           <template-type-parameter name="KeyNodePtrCompare"/>
7128         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. 'lower_key' must not be greater than 'upper_key' according to 'comp'. If 'lower_key' == 'upper_key', ('left_closed' || 'right_closed') must be true.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change. </para></description></method>
7129 <method name="count" specifiers="static"><type>std::size_t</type><template>
7130           <template-type-parameter name="KeyType"/>
7131           <template-type-parameter name="KeyNodePtrCompare"/>
7132         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements with a key equivalent to "key" according to "comp".</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
7133 <method name="insert_equal_upper_bound" specifiers="static"><type>node_ptr</type><template>
7134           <template-type-parameter name="NodePtrCompare"/>
7135           <template-type-parameter name="NodePtrPriorityCompare"/>
7136         </template><parameter name="h"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="pcomp"><paramtype>NodePtrPriorityCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "h" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs. NodePtrPriorityCompare is a priority function object that induces a strict weak ordering compatible with the one used to create the the tree. NodePtrPriorityCompare compares two node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before the upper bound according to "comp" and rotates the tree according to "pcomp".</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throw or "pcomp" throw. </para></description></method>
7137 <method name="insert_equal_lower_bound" specifiers="static"><type>node_ptr</type><template>
7138           <template-type-parameter name="NodePtrCompare"/>
7139           <template-type-parameter name="NodePtrPriorityCompare"/>
7140         </template><parameter name="h"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="pcomp"><paramtype>NodePtrPriorityCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "h" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs. NodePtrPriorityCompare is a priority function object that induces a strict weak ordering compatible with the one used to create the the tree. NodePtrPriorityCompare compares two node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before the upper bound according to "comp" and rotates the tree according to "pcomp".</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws. </para></description></method>
7141 <method name="insert_equal" specifiers="static"><type>node_ptr</type><template>
7142           <template-type-parameter name="NodePtrCompare"/>
7143           <template-type-parameter name="NodePtrPriorityCompare"/>
7144         </template><parameter name="h"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="hint"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="pcomp"><paramtype>NodePtrPriorityCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. NodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares two node_ptrs. "hint" is node from the "header"'s tree. NodePtrPriorityCompare is a priority function object that induces a strict weak ordering compatible with the one used to create the the tree. NodePtrPriorityCompare compares two node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case). Rotates the tree according to "pcomp".</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if new_node is inserted immediately before "hint".</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throw or "pcomp" throw. </para></description></method>
7145 <method name="insert_before" specifiers="static"><type>node_ptr</type><template>
7146           <template-type-parameter name="NodePtrPriorityCompare"/>
7147         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="pos"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="pcomp"><paramtype>NodePtrPriorityCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "pos" must be a valid node of the tree (including header end) node. "pos" must be a node pointing to the successor to "new_node" once inserted according to the order of already inserted nodes. This function does not check "pos" and this precondition must be guaranteed by the caller. NodePtrPriorityCompare is a priority function object that induces a strict weak ordering compatible with the one used to create the the tree. NodePtrPriorityCompare compares two node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node into the tree before "pos" and rotates the tree according to "pcomp".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: If "pcomp" throws, strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: If "pos" is not the successor of the newly inserted "new_node" tree invariants might be broken. </para></description></method>
7148 <method name="push_back" specifiers="static"><type>void</type><template>
7149           <template-type-parameter name="NodePtrPriorityCompare"/>
7150         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="pcomp"><paramtype>NodePtrPriorityCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "new_node" must be, according to the used ordering no less than the greatest inserted key. NodePtrPriorityCompare is a priority function object that induces a strict weak ordering compatible with the one used to create the the tree. NodePtrPriorityCompare compares two node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the tree in the last position and rotates the tree according to "pcomp".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: If "pcomp" throws, strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: If "new_node" is less than the greatest inserted key tree invariants are broken. This function is slightly faster than using "insert_before". </para></description></method>
7151 <method name="push_front" specifiers="static"><type>void</type><template>
7152           <template-type-parameter name="NodePtrPriorityCompare"/>
7153         </template><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="pcomp"><paramtype>NodePtrPriorityCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "new_node" must be, according to the used ordering, no greater than the lowest inserted key. NodePtrPriorityCompare is a priority function object that induces a strict weak ordering compatible with the one used to create the the tree. NodePtrPriorityCompare compares two node_ptrs.</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the tree in the first position and rotates the tree according to "pcomp".</para><para><emphasis role="bold">Complexity</emphasis>: Constant-time.</para><para><emphasis role="bold">Throws</emphasis>: If "pcomp" throws, strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: If "new_node" is greater than the lowest inserted key tree invariants are broken. This function is slightly faster than using "insert_before". </para></description></method>
7154 <method name="insert_unique_check" specifiers="static"><type>std::pair&lt; node_ptr, bool &gt;</type><template>
7155           <template-type-parameter name="KeyType"/>
7156           <template-type-parameter name="KeyNodePtrCompare"/>
7157           <template-type-parameter name="KeyNodePtrPrioCompare"/>
7158         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="pcomp"><paramtype>KeyNodePtrPrioCompare</paramtype></parameter><parameter name="commit_data"><paramtype><classname>insert_commit_data</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares KeyType with a node_ptr.</para><para><emphasis role="bold">Effects</emphasis>: Checks if there is an equivalent node to "key" in the tree according to "comp" and obtains the needed information to realize a constant-time node insertion if there is no equivalent node.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing a node_ptr to the already present node and false. If there is not equivalent key can be inserted returns true in the returned pair's boolean and fills "commit_data" that is meant to be used with the "insert_commit" function to achieve a constant-time insertion function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a node is expensive and the user does not want to have two equivalent nodes in the tree: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the node and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the node and use "insert_commit" to insert the node in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_unique_commit" only if no more objects are inserted or erased from the set. </para></description></method>
7159 <method name="insert_unique_check" specifiers="static"><type>std::pair&lt; node_ptr, bool &gt;</type><template>
7160           <template-type-parameter name="KeyType"/>
7161           <template-type-parameter name="KeyNodePtrCompare"/>
7162           <template-type-parameter name="KeyNodePtrPrioCompare"/>
7163         </template><parameter name="header"><paramtype>const const_node_ptr &amp;</paramtype></parameter><parameter name="hint"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyNodePtrCompare</paramtype></parameter><parameter name="pcomp"><paramtype>KeyNodePtrPrioCompare</paramtype></parameter><parameter name="commit_data"><paramtype><classname>insert_commit_data</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. KeyNodePtrCompare is a function object that induces a strict weak ordering compatible with the strict weak ordering used to create the the tree. NodePtrCompare compares KeyType with a node_ptr. "hint" is node from the "header"'s tree.</para><para><emphasis role="bold">Effects</emphasis>: Checks if there is an equivalent node to "key" in the tree according to "comp" using "hint" as a hint to where it should be inserted and obtains the needed information to realize a constant-time node insertion if there is no equivalent node. If "hint" is the upper_bound the function has constant time complexity (two comparisons in the worst case).</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing a node_ptr to the already present node and false. If there is not equivalent key can be inserted returns true in the returned pair's boolean and fills "commit_data" that is meant to be used with the "insert_commit" function to achieve a constant-time insertion function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic, but it is amortized constant time if new_node should be inserted immediately before "hint".</para><para><emphasis role="bold">Throws</emphasis>: If "comp" throws.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a node is expensive and the user does not want to have two equivalent nodes in the tree: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the node and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the node and use "insert_commit" to insert the node in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_unique_commit" only if no more objects are inserted or erased from the set. </para></description></method>
7164 <method name="insert_unique_commit" specifiers="static"><type>void</type><parameter name="header"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="new_node"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>const <classname>insert_commit_data</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "header" must be the header node of a tree. "commit_data" must have been obtained from a previous call to "insert_unique_check". No objects should have been inserted or erased from the set between the "insert_unique_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts new_node in the set using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_unique_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
7165 <method name="transfer_unique" specifiers="static"><type>bool</type><template>
7166           <template-type-parameter name="NodePtrCompare"/>
7167           <template-type-parameter name="KeyNodePtrPrioCompare"/>
7168         </template><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="pcomp"><paramtype>KeyNodePtrPrioCompare</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the headers of trees tree1 and tree2 respectively, z a non-header node of tree1. NodePtrCompare is the comparison function of tree1..</para><para><emphasis role="bold">Effects</emphasis>: Transfers node "z" from tree1 to tree2 if tree1 does not contain a node that is equivalent to z.</para><para><emphasis role="bold">Returns</emphasis>: True if the node was trasferred, false otherwise.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison throws. </para></description></method>
7169 <method name="transfer_equal" specifiers="static"><type>void</type><template>
7170           <template-type-parameter name="NodePtrCompare"/>
7171           <template-type-parameter name="KeyNodePtrPrioCompare"/>
7172         </template><parameter name="header1"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="comp"><paramtype>NodePtrCompare</paramtype></parameter><parameter name="pcomp"><paramtype>KeyNodePtrPrioCompare</paramtype></parameter><parameter name="header2"><paramtype>const node_ptr &amp;</paramtype></parameter><parameter name="z"><paramtype>const node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: header1 and header2 must be the headers of trees tree1 and tree2 respectively, z a non-header node of tree1. NodePtrCompare is the comparison function of tree1..</para><para><emphasis role="bold">Effects</emphasis>: Transfers node "z" from tree1 to tree2.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison throws. </para></description></method>
7173 <method name="is_header" specifiers="static"><type>bool</type><parameter name="p"><paramtype>const const_node_ptr &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: p is a node of a tree.</para><para><emphasis role="bold">Effects</emphasis>: Returns true if p is the header of the tree.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7174 </method-group>
7175 </class>
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227 </namespace>
7228 </namespace>
7229 </header>
7230 <header name="boost/intrusive/treap_set.hpp">
7231 <namespace name="boost">
7232 <namespace name="intrusive">
7233 <class name="treap_set"><template>
7234       <template-type-parameter name="T"/>
7235       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
7236     </template><description><para>The class template <classname alt="boost::intrusive::treap_set">treap_set</classname> is an intrusive container, that mimics most of the interface of std::set as described in the C++ standard.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput>, <computeroutput>compare&lt;&gt;</computeroutput> and <computeroutput>priority_compare&lt;&gt;</computeroutput> </para></description><typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
7237 <typedef name="value_traits"><type>implementation_defined::value_traits</type></typedef>
7238 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
7239 <typedef name="key_of_value"><type>implementation_defined::key_of_value</type></typedef>
7240 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
7241 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
7242 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
7243 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
7244 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
7245 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
7246 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
7247 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
7248 <typedef name="priority_compare"><type>implementation_defined::priority_compare</type></typedef>
7249 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
7250 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
7251 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
7252 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
7253 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
7254 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
7255 <typedef name="node"><type>implementation_defined::node</type></typedef>
7256 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
7257 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
7258 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
7259 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
7260 <method-group name="public member functions">
7261 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7262 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7263 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7264 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7265 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7266 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7267 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7268 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7269 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7270 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7271 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7272 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7273 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7274 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7275 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7276 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
7277 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
7278 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7279 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7280 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>treap_set</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two treaps.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
7281 <method name="clone_from"><type>void</type><template>
7282           <template-type-parameter name="Cloner"/>
7283           <template-type-parameter name="Disposer"/>
7284         </template><parameter name="src"><paramtype>const <classname>treap_set</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. </para></description></method>
7285 <method name="clone_from"><type>void</type><template>
7286           <template-type-parameter name="Cloner"/>
7287           <template-type-parameter name="Disposer"/>
7288         </template><parameter name="src"><paramtype><classname>treap_set</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. </para></description></method>
7289 <method name="top"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the highest priority object of the treap.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7290 <method name="top" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the highest priority object of the treap..</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7291 <method name="ctop" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the highest priority object of the treap..</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7292 <method name="rtop"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the highest priority object of the reversed treap.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7293 <method name="rtop" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the highest priority objec of the reversed treap.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7294 <method name="crtop" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the highest priority object of the reversed treap.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7295 <method name="priority_comp" cv="const"><type>priority_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the highest priority object of the reversed treap.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7296 <method name="insert"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container if the value is not already present.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare or priority_compare functions throw. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
7297 <method name="insert"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert x into the container, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time (two comparisons in the worst case) if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare or priority_compare functions throw. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
7298 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison or predicate functions throw. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
7299 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison or predicate functions throw. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the constructing that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that key to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This can give a total constant-time complexity to the insertion: check(O(1)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
7300 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
7301           <template-type-parameter name="KeyType"/>
7302           <template-type-parameter name="KeyTypeKeyCompare"/>
7303           <template-type-parameter name="KeyValuePrioCompare"/>
7304         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="key_value_pcomp"><paramtype>KeyValuePrioCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. key_value_pcomp must be a comparison function that induces the same strict weak ordering as priority_compare. The difference is that key_value_pcomp and comp compare an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the comp or key_value_pcomp ordering functions throw. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This gives a total logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
7305 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
7306           <template-type-parameter name="KeyType"/>
7307           <template-type-parameter name="KeyTypeKeyCompare"/>
7308           <template-type-parameter name="KeyValuePrioCompare"/>
7309         </template><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="key_value_pcomp"><paramtype>KeyValuePrioCompare</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: comp must be a comparison function that induces the same strict weak ordering as key_compare. key_value_pcomp must be a comparison function that induces the same strict weak ordering as priority_compare. The difference is that key_value_pcomp and comp compare an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the container, using a user provided key instead of the value itself, using "hint" as a hint to where it will be inserted.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it's amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the comp or key_value_pcomp ordering functions throw. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the constructing that is used to impose the order is much cheaper to construct than the value_type and this function offers the possibility to use that key to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time. This can give a total constant-time complexity to the insertion: check(O(1)) + commit(O(1)).</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the container. </para></description></method>
7310 <method name="insert"><type>void</type><template>
7311           <template-type-parameter name="Iterator"/>
7312         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Tries to insert each element of a range into the container.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by key_comp().</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare or priority_compare functions throw. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
7313 <method name="insert_commit"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue of type value_type. commit_data must have been obtained from a previous call to "insert_check". No objects should have been inserted or erased from the container between the "insert_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the <classname alt="boost::intrusive::avl_set">avl_set</classname> using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the newly inserted object.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls. </para></description></method>
7314 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: If the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
7315 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: If the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
7316 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: If the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
7317 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7318 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7319 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7320 <method name="erase"><type>size_type</type><template>
7321           <template-type-parameter name="KeyType"/>
7322           <template-type-parameter name="KeyTypeKeyCompare"/>
7323         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Equivalent guarantee to <emphasis>while(beg != end) erase(beg++);</emphasis></para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7324 <method name="erase_and_dispose"><type>iterator</type><template>
7325           <template-type-parameter name="Disposer"/>
7326         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
7327 <method name="erase_and_dispose"><type>iterator</type><template>
7328           <template-type-parameter name="Disposer"/>
7329         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
7330 <method name="erase_and_dispose"><type>size_type</type><template>
7331           <template-type-parameter name="Disposer"/>
7332         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: if the priority_compare function throws then weak guarantee and heap invariants are broken. The safest thing would be to clear or destroy the container.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7333 <method name="erase_and_dispose"><type>size_type</type><template>
7334           <template-type-parameter name="KeyType"/>
7335           <template-type-parameter name="KeyTypeKeyCompare"/>
7336           <template-type-parameter name="Disposer"/>
7337         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: if the priority_compare function throws then weak guarantee and heap invariants are broken. The safest thing would be to clear or destroy the container.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
7338 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7339 <method name="clear_and_dispose"><type>void</type><template>
7340           <template-type-parameter name="Disposer"/>
7341         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
7342 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7343 <method name="count" cv="const"><type>size_type</type><template>
7344           <template-type-parameter name="KeyType"/>
7345           <template-type-parameter name="KeyTypeKeyCompare"/>
7346         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
7347 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7348 <method name="lower_bound"><type>iterator</type><template>
7349           <template-type-parameter name="KeyType"/>
7350           <template-type-parameter name="KeyTypeKeyCompare"/>
7351         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7352 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7353 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
7354           <template-type-parameter name="KeyType"/>
7355           <template-type-parameter name="KeyTypeKeyCompare"/>
7356         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7357 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7358 <method name="upper_bound"><type>iterator</type><template>
7359           <template-type-parameter name="KeyType"/>
7360           <template-type-parameter name="KeyTypeKeyCompare"/>
7361         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
7362 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7363 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
7364           <template-type-parameter name="KeyType"/>
7365           <template-type-parameter name="KeyTypeKeyCompare"/>
7366         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
7367 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7368 <method name="find"><type>iterator</type><template>
7369           <template-type-parameter name="KeyType"/>
7370           <template-type-parameter name="KeyTypeKeyCompare"/>
7371         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
7372 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7373 <method name="find" cv="const"><type>const_iterator</type><template>
7374           <template-type-parameter name="KeyType"/>
7375           <template-type-parameter name="KeyTypeKeyCompare"/>
7376         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
7377 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7378 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
7379           <template-type-parameter name="KeyType"/>
7380           <template-type-parameter name="KeyTypeKeyCompare"/>
7381         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
7382 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7383 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
7384           <template-type-parameter name="KeyType"/>
7385           <template-type-parameter name="KeyTypeKeyCompare"/>
7386         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
7387 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
7388 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
7389           <template-type-parameter name="KeyType"/>
7390           <template-type-parameter name="KeyTypeKeyCompare"/>
7391         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
7392 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
7393 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
7394           <template-type-parameter name="KeyType"/>
7395           <template-type-parameter name="KeyTypeKeyCompare"/>
7396         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
7397 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7398 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7399 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
7400 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
7401 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
7402 <method name="merge"><type>void</type><template>
7403           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
7404         </template><parameter name="source"><paramtype><classname>treap_set</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
7405 <method name="merge"><type>void</type><template>
7406           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
7407         </template><parameter name="source"><paramtype><classname>treap_multiset</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
7408 </method-group>
7409 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the value_compare/priority_compare objects throw. Basic guarantee. </para></description></constructor>
7410 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="pcmp"><paramtype>const priority_compare &amp;</paramtype><default>priority_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the value_compare/priority_compare objects throw. Basic guarantee. </para></description></constructor>
7411 <constructor><template>
7412           <template-type-parameter name="Iterator"/>
7413         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="pcmp"><paramtype>const priority_compare &amp;</paramtype><default>priority_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare/priority_compare objects throw. Basic guarantee. </para></description></constructor>
7414 <constructor><parameter name="x"><paramtype><classname>treap_set</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
7415 <copy-assignment><type><classname>treap_set</classname> &amp;</type><parameter name="x"><paramtype><classname>treap_set</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
7416 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
7417 <method-group name="public static functions">
7418 <method name="container_from_end_iterator" specifiers="static"><type><classname>treap_set</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
7419 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>treap_set</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
7420 <method name="container_from_iterator" specifiers="static"><type><classname>treap_set</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
7421 <method name="container_from_iterator" specifiers="static"><type>const <classname>treap_set</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
7422 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
7423 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
7424 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
7425 </method-group>
7426 </class><struct name="make_treap_set"><template>
7427       <template-type-parameter name="T"/>
7428       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
7429     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::treap_set">treap_set</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="packed_options"><type><classname>pack_options</classname>&lt; treap_defaults, O1, O2, O3, O4, O5, O6 &gt;::<classname>type</classname></type></typedef>
7430 <typedef name="value_traits"><type><emphasis>unspecified</emphasis></type></typedef>
7431 <typedef name="implementation_defined"><type><classname>treap_set</classname>&lt; value_traits, typename packed_options::key_of_value, typename packed_options::compare, typename packed_options::priority, typename packed_options::size_type, packed_options::constant_time_size, typename packed_options::header_holder_type &gt;</type></typedef>
7432 <typedef name="type"><type><classname>implementation_defined</classname></type></typedef>
7433 </struct><class name="treap_multiset"><template>
7434       <template-type-parameter name="T"/>
7435       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
7436     </template><description><para>The class template <classname alt="boost::intrusive::treap_multiset">treap_multiset</classname> is an intrusive container, that mimics most of the interface of std::treap_multiset as described in the C++ standard.</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput>, <computeroutput>compare&lt;&gt;</computeroutput> and <computeroutput>priority_compare&lt;&gt;</computeroutput> </para></description><typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
7437 <typedef name="value_traits"><type>implementation_defined::value_traits</type></typedef>
7438 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
7439 <typedef name="key_of_value"><type>implementation_defined::key_of_value</type></typedef>
7440 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
7441 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
7442 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
7443 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
7444 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
7445 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
7446 <typedef name="value_compare"><type>implementation_defined::value_compare</type></typedef>
7447 <typedef name="key_compare"><type>implementation_defined::key_compare</type></typedef>
7448 <typedef name="priority_compare"><type>implementation_defined::priority_compare</type></typedef>
7449 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
7450 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
7451 <typedef name="reverse_iterator"><type>implementation_defined::reverse_iterator</type></typedef>
7452 <typedef name="const_reverse_iterator"><type>implementation_defined::const_reverse_iterator</type></typedef>
7453 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
7454 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
7455 <typedef name="node"><type>implementation_defined::node</type></typedef>
7456 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
7457 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
7458 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
7459 <data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
7460 <method-group name="public member functions">
7461 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7462 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7463 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7464 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7465 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7466 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7467 <method name="rbegin"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7468 <method name="rbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7469 <method name="crbegin" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the beginning of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7470 <method name="rend"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7471 <method name="rend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7472 <method name="crend" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the end of the reversed container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7473 <method name="root"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a iterator pointing to the root node of the container or end() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7474 <method name="root" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7475 <method name="croot" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the root node of the container or cend() if not present.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7476 <method name="key_comp" cv="const"><type>key_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_compare copy-constructor throws. </para></description></method>
7477 <method name="value_comp" cv="const"><type>value_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the value_compare object used by the container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_compare copy-constructor throws. </para></description></method>
7478 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7479 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the container.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if constant-time size option is disabled. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7480 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>treap_multiset</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swaps the contents of two treaps.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the comparison functor's swap call throws. </para></description></method>
7481 <method name="clone_from"><type>void</type><template>
7482           <template-type-parameter name="Cloner"/>
7483           <template-type-parameter name="Disposer"/>
7484         </template><parameter name="src"><paramtype>const <classname>treap_multiset</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. </para></description></method>
7485 <method name="clone_from"><type>void</type><template>
7486           <template-type-parameter name="Cloner"/>
7487           <template-type-parameter name="Disposer"/>
7488         </template><parameter name="src"><paramtype><classname>treap_multiset</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw. Cloner should yield to nodes equivalent to the original nodes.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. Copies the predicate from the source container.</para><para>If cloner throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner throws or predicate copy assignment throws. Basic guarantee. </para></description></method>
7489 <method name="top"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the highest priority object of the treap.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7490 <method name="top" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the highest priority object of the treap..</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7491 <method name="ctop" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the highest priority object of the treap..</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7492 <method name="rtop"><type>reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a reverse_iterator pointing to the highest priority object of the reversed treap.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7493 <method name="rtop" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the highest priority objec of the reversed treap.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7494 <method name="crtop" cv="const"><type>const_reverse_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the highest priority object of the reversed treap.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7495 <method name="priority_comp" cv="const"><type>priority_compare</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_reverse_iterator pointing to the highest priority object of the reversed treap.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7496 <method name="insert"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts value into the container before the upper bound.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for insert element is at most logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare or priority_compare functions throw. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
7497 <method name="insert"><type>iterator</type><parameter name="hint"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and "hint" must be a valid iterator.</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container, using "hint" as a hint to where it will be inserted. If "hint" is the upper_bound the insertion takes constant time (two comparisons in the worst case)</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic in general, but it is amortized constant time if t is inserted immediately before hint.</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare or priority_compare functions throw. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
7498 <method name="insert"><type>void</type><template>
7499           <template-type-parameter name="Iterator"/>
7500         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Inserts a each element of a range into the container before the upper bound of the key of each element.</para><para><emphasis role="bold">Complexity</emphasis>: Insert range is in general O(N * log(N)), where N is the size of the range. However, it is linear in N if the range is already sorted by key_comp().</para><para><emphasis role="bold">Throws</emphasis>: If the internal key_compare or priority_compare functions throw. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
7501 <method name="insert_before"><type>iterator</type><parameter name="pos"><paramtype>const_iterator</paramtype></parameter><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, "pos" must be a valid iterator (or end) and must be the succesor of value once inserted according to the predicate</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container before "pos".</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: If the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if "pos" is not the successor of "value" container ordering invariant will be broken. This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
7502 <method name="push_back"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no less than the greatest inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the last position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: If the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is less than the greatest inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
7503 <method name="push_front"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue, and it must be no greater than the minimum inserted key</para><para><emphasis role="bold">Effects</emphasis>: Inserts x into the container in the first position.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: If the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: This function does not check preconditions so if value is greater than the minimum inserted key container ordering invariant will be broken. This function is slightly more efficient than using "insert_before". This is a low-level function to be used only for performance reasons by advanced users. </para></description></method>
7504 <method name="erase"><type>iterator</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7505 <method name="erase"><type>iterator</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7506 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7507 <method name="erase"><type>size_type</type><template>
7508           <template-type-parameter name="KeyType"/>
7509           <template-type-parameter name="KeyTypeKeyCompare"/>
7510         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp".</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Equivalent guarantee to <emphasis>while(beg != end) erase(beg++);</emphasis></para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7511 <method name="erase_and_dispose"><type>iterator</type><template>
7512           <template-type-parameter name="Disposer"/>
7513         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase element is constant time.</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
7514 <method name="erase_and_dispose"><type>iterator</type><template>
7515           <template-type-parameter name="Disposer"/>
7516         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity for erase range is at most O(log(size() + N)), where N is the number of elements in the range.</para><para><emphasis role="bold">Throws</emphasis>: if the internal priority_compare function throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
7517 <method name="erase_and_dispose"><type>size_type</type><template>
7518           <template-type-parameter name="Disposer"/>
7519         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: if the priority_compare function throws then weak guarantee and heap invariants are broken. The safest thing would be to clear or destroy the container.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7520 <method name="erase_and_dispose"><type>size_type</type><template>
7521           <template-type-parameter name="KeyType"/>
7522           <template-type-parameter name="KeyTypeKeyCompare"/>
7523           <template-type-parameter name="Disposer"/>
7524         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "comp". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: O(log(size() + N).</para><para><emphasis role="bold">Throws</emphasis>: if the priority_compare function throws then weak guarantee and heap invariants are broken. The safest thing would be to clear or destroy the container.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
7525 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7526 <method name="clear_and_dispose"><type>void</type><template>
7527           <template-type-parameter name="Disposer"/>
7528         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements calling disposer(p) for each node to be erased. <emphasis role="bold">Complexity</emphasis>: Average complexity for is at most O(log(size() + N)), where N is the number of elements in the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. Calls N times to disposer functor. </para></description></method>
7529 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given value.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7530 <method name="count" cv="const"><type>size_type</type><template>
7531           <template-type-parameter name="KeyType"/>
7532           <template-type-parameter name="KeyTypeKeyCompare"/>
7533         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic to the number of elements contained plus lineal to number of objects with the given key.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
7534 <method name="lower_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7535 <method name="lower_bound"><type>iterator</type><template>
7536           <template-type-parameter name="KeyType"/>
7537           <template-type-parameter name="KeyTypeKeyCompare"/>
7538         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7539 <method name="lower_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7540 <method name="lower_bound" cv="const"><type>const_iterator</type><template>
7541           <template-type-parameter name="KeyType"/>
7542           <template-type-parameter name="KeyTypeKeyCompare"/>
7543         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is not less than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7544 <method name="upper_bound"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7545 <method name="upper_bound"><type>iterator</type><template>
7546           <template-type-parameter name="KeyType"/>
7547           <template-type-parameter name="KeyTypeKeyCompare"/>
7548         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
7549 <method name="upper_bound" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7550 <method name="upper_bound" cv="const"><type>const_iterator</type><template>
7551           <template-type-parameter name="KeyType"/>
7552           <template-type-parameter name="KeyTypeKeyCompare"/>
7553         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Returns an iterator to the first element whose key is greater than k according to comp or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
7554 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7555 <method name="find"><type>iterator</type><template>
7556           <template-type-parameter name="KeyType"/>
7557           <template-type-parameter name="KeyTypeKeyCompare"/>
7558         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
7559 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7560 <method name="find" cv="const"><type>const_iterator</type><template>
7561           <template-type-parameter name="KeyType"/>
7562           <template-type-parameter name="KeyTypeKeyCompare"/>
7563         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), and nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is k or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
7564 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7565 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
7566           <template-type-parameter name="KeyType"/>
7567           <template-type-parameter name="KeyTypeKeyCompare"/>
7568         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
7569 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws. </para></description></method>
7570 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
7571           <template-type-parameter name="KeyType"/>
7572           <template-type-parameter name="KeyTypeKeyCompare"/>
7573         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: key is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, key) and !comp(key, nk), with comp(nk, key) implying !comp(key, nk), with nk the key_type of a value_type inserted into <computeroutput>*this</computeroutput>.</para><para><emphasis role="bold">Effects</emphasis>: Finds a range containing all elements whose key is k or an empty range that indicates the position where those elements would be if they there is no elements with key k.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws. </para></description></method>
7574 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
7575 <method name="bounded_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
7576           <template-type-parameter name="KeyType"/>
7577           <template-type-parameter name="KeyTypeKeyCompare"/>
7578         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
7579 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="lower_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to key_compare. [key_comp()(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!key_comp()(upper_key, lower_key) &amp;&amp; !key_comp()(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise</para><para>second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>key_compare</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_value and upper_value.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
7580 <method name="bounded_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
7581           <template-type-parameter name="KeyType"/>
7582           <template-type-parameter name="KeyTypeKeyCompare"/>
7583         </template><parameter name="lower_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="upper_key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="comp"><paramtype>KeyTypeKeyCompare</paramtype></parameter><parameter name="left_closed"><paramtype>bool</paramtype></parameter><parameter name="right_closed"><paramtype>bool</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: <computeroutput>lower_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to comp(nk, lower_key) if left_closed is true, with respect to !comp(lower_key, nk) otherwise.</para><para><computeroutput>upper_key</computeroutput> is a value such that <computeroutput>*this</computeroutput> is partitioned with respect to !comp(upper_key, nk) if right_closed is true, with respect to comp(nk, upper_key) otherwise.</para><para><computeroutput>upper_key</computeroutput> shall not precede <computeroutput>lower_key</computeroutput> according to comp [comp(upper_key, lower_key) shall be false]</para><para>If <computeroutput>lower_key</computeroutput> is equivalent to <computeroutput>upper_key</computeroutput> [!comp(upper_key, lower_key) &amp;&amp; !comp(lower_key, upper_key)] then ('left_closed' || 'right_closed') must be false.</para><para><emphasis role="bold">Effects</emphasis>: Returns an a pair with the following criteria:</para><para>first = lower_bound(lower_key, comp) if left_closed, upper_bound(lower_key, comp) otherwise</para><para>second = upper_bound(upper_key, comp) if right_closed, lower_bound(upper_key, comp) otherwise</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic.</para><para><emphasis role="bold">Throws</emphasis>: If <computeroutput>comp</computeroutput> throws.</para><para><emphasis role="bold">Note</emphasis>: This function can be more efficient than calling upper_bound and lower_bound for lower_key and upper_key.</para><para><emphasis role="bold">Note</emphasis>: Experimental function, the interface might change in future releases. </para></description></method>
7584 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7585 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7586 <method name="unlink_leftmost_without_rebalance"><type>pointer</type><description><para><emphasis role="bold">Effects</emphasis>: Unlinks the leftmost node from the container.</para><para><emphasis role="bold">Complexity</emphasis>: Average complexity is constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function breaks the container and the container can only be used for more unlink_leftmost_without_rebalance calls. This function is normally used to achieve a step by step controlled destruction of the container. </para></description></method>
7587 <method name="replace_node"><type>void</type><parameter name="replace_this"><paramtype>iterator</paramtype></parameter><parameter name="with_this"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: replace_this must be a valid iterator of *this and with_this must not be inserted in any container.</para><para><emphasis role="bold">Effects</emphasis>: Replaces replace_this in its position in the container with with_this. The container does not need to be rebalanced.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This function will break container ordering invariants if with_this is not equivalent to *replace_this according to the ordering rules. This function is faster than erasing and inserting the node, since no rebalancing or comparison is needed. </para></description></method>
7588 <method name="remove_node"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: removes "value" from the container.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic time.</para><para><emphasis role="bold">Note</emphasis>: This static function is only usable with non-constant time size containers that have stateless comparison functors.</para><para>If the user calls this function with a constant time size container or stateful comparison functor a compilation error will be issued. </para></description></method>
7589 <method name="merge"><type>void</type><template>
7590           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
7591         </template><parameter name="source"><paramtype><classname>treap_multiset</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
7592 <method name="merge"><type>void</type><template>
7593           <template-nontype-parameter name="Options2"><type>class...</type></template-nontype-parameter>
7594         </template><parameter name="source"><paramtype><classname>treap_set</classname>&lt; T, Options2...&gt; &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "source" container's Options can only can differ in the comparison function from *this.</para><para><emphasis role="bold">Effects</emphasis>: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.</para><para><emphasis role="bold">Postcondition</emphasis>: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.</para><para><emphasis role="bold">Throws</emphasis>: Nothing unless the comparison object throws.</para><para><emphasis role="bold">Complexity</emphasis>: N log(a.size() + N) (N has the value source.size()) </para></description></method>
7595 </method-group>
7596 <constructor><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the value_compare/priority_compare objects throw. Basic guarantee. </para></description></constructor>
7597 <constructor specifiers="explicit"><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype></parameter><parameter name="pcmp"><paramtype>const priority_compare &amp;</paramtype><default>priority_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor of the value_compare/priority_compare objects throw. Basic guarantee. </para></description></constructor>
7598 <constructor><template>
7599           <template-type-parameter name="Iterator"/>
7600         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="cmp"><paramtype>const key_compare &amp;</paramtype><default>key_compare()</default></parameter><parameter name="pcmp"><paramtype>const priority_compare &amp;</paramtype><default>priority_compare()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type. cmp must be a comparison function that induces a strict weak ordering.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Linear in N if [b, e) is already sorted using comp and otherwise N * log N, where N is the distance between first and last.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor/operator() of the key_compare/priority_compare objects throw. Basic guarantee. </para></description></constructor>
7601 <constructor><parameter name="x"><paramtype><classname>treap_multiset</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
7602 <copy-assignment><type><classname>treap_multiset</classname> &amp;</type><parameter name="x"><paramtype><classname>treap_multiset</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
7603 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the set are not deleted (i.e. no destructors are called), but the nodes according to the <classname alt="boost::intrusive::value_traits">value_traits</classname> template parameter are reinitialized and thus can be reused.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
7604 <method-group name="public static functions">
7605 <method name="container_from_end_iterator" specifiers="static"><type><classname>treap_multiset</classname> &amp;</type><parameter name="end_iterator"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
7606 <method name="container_from_end_iterator" specifiers="static"><type>const <classname>treap_multiset</classname> &amp;</type><parameter name="end_iterator"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: end_iterator must be a valid end iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the end iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant. </para></description></method>
7607 <method name="container_from_iterator" specifiers="static"><type><classname>treap_multiset</classname> &amp;</type><parameter name="it"><paramtype>iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
7608 <method name="container_from_iterator" specifiers="static"><type>const <classname>treap_multiset</classname> &amp;</type><parameter name="it"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Precondition</emphasis>: it must be a valid iterator of the container.</para><para><emphasis role="bold">Effects</emphasis>: Returns a const reference to the container associated to the iterator</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Logarithmic. </para></description></method>
7609 <method name="s_iterator_to" specifiers="static"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
7610 <method name="s_iterator_to" specifiers="static"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a set of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator i belonging to the set that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
7611 <method name="init_node" specifiers="static"><type>void</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value shall not be in a container.</para><para><emphasis role="bold">Effects</emphasis>: init_node puts the hook of a value in a well-known default state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Note</emphasis>: This function puts the hook in the well-known default state used by auto_unlink and safe hooks. </para></description></method>
7612 </method-group>
7613 </class><struct name="make_treap_multiset"><template>
7614       <template-type-parameter name="T"/>
7615       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
7616     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::treap_multiset">treap_multiset</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="packed_options"><type><classname>pack_options</classname>&lt; treap_defaults, O1, O2, O3, O4, O5, O6 &gt;::<classname>type</classname></type></typedef>
7617 <typedef name="value_traits"><type><emphasis>unspecified</emphasis></type></typedef>
7618 <typedef name="implementation_defined"><type><classname>treap_multiset</classname>&lt; value_traits, typename packed_options::key_of_value, typename packed_options::compare, typename packed_options::priority, typename packed_options::size_type, packed_options::constant_time_size, typename packed_options::header_holder_type &gt;</type></typedef>
7619 <typedef name="type"><type><classname>implementation_defined</classname></type></typedef>
7620 </struct>
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672 </namespace>
7673 </namespace>
7674 </header>
7675 <header name="boost/intrusive/trivial_value_traits.hpp">
7676 <namespace name="boost">
7677 <namespace name="intrusive">
7678 <struct name="trivial_value_traits"><template>
7679       <template-type-parameter name="NodeTraits"/>
7680       <template-nontype-parameter name="LinkMode"><type>link_mode_type</type><default>safe_link</default></template-nontype-parameter>
7681     </template><description><para>This value traits template is used to create value traits from user defined node traits where value_traits::value_type and node_traits::node should be equal </para></description><typedef name="node_traits"><type>NodeTraits</type></typedef>
7682 <typedef name="node_ptr"><type>node_traits::node_ptr</type></typedef>
7683 <typedef name="const_node_ptr"><type>node_traits::const_node_ptr</type></typedef>
7684 <typedef name="value_type"><type>node_traits::node</type></typedef>
7685 <typedef name="pointer"><type>node_ptr</type></typedef>
7686 <typedef name="const_pointer"><type>const_node_ptr</type></typedef>
7687 <data-member name="link_mode" specifiers="static"><type>const link_mode_type</type></data-member>
7688 <method-group name="public static functions">
7689 <method name="to_node_ptr" specifiers="static"><type>node_ptr</type><parameter name="value"><paramtype>value_type &amp;</paramtype></parameter></method>
7690 <method name="to_node_ptr" specifiers="static"><type>const_node_ptr</type><parameter name="value"><paramtype>const value_type &amp;</paramtype></parameter></method>
7691 <method name="to_value_ptr" specifiers="static"><type>const pointer &amp;</type><parameter name="n"><paramtype>const node_ptr &amp;</paramtype></parameter></method>
7692 <method name="to_value_ptr" specifiers="static"><type>const const_pointer &amp;</type><parameter name="n"><paramtype>const const_node_ptr &amp;</paramtype></parameter></method>
7693 </method-group>
7694 </struct>
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746 </namespace>
7747 </namespace>
7748 </header>
7749 <header name="boost/intrusive/unordered_set.hpp">
7750 <namespace name="boost">
7751 <namespace name="intrusive">
7752 <class name="unordered_set"><template>
7753       <template-type-parameter name="T"/>
7754       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
7755     </template><inherit access="public">boost::intrusive::hashtable&lt; ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags|hash_bool_flags::unique_keys_pos &gt;</inherit><description><para>The class template <classname alt="boost::intrusive::unordered_set">unordered_set</classname> is an intrusive container, that mimics most of the interface of std::tr1::unordered_set as described in the C++ TR1.</para><para><classname alt="boost::intrusive::unordered_set">unordered_set</classname> is a semi-intrusive container: each object to be stored in the container must contain a proper hook, but the container also needs additional auxiliary memory to work: <classname alt="boost::intrusive::unordered_set">unordered_set</classname> needs a pointer to an array of type <computeroutput>bucket_type</computeroutput> to be passed in the constructor. This bucket array must have at least the same lifetime as the container. This makes the use of <classname alt="boost::intrusive::unordered_set">unordered_set</classname> more complicated than purely intrusive containers. <computeroutput>bucket_type</computeroutput> is default-constructible, copyable and assignable</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput>, <computeroutput>hash&lt;&gt;</computeroutput> and <computeroutput>equal&lt;&gt;</computeroutput> <computeroutput>bucket_traits&lt;&gt;</computeroutput>, <computeroutput>power_2_buckets&lt;&gt;</computeroutput> and <computeroutput>cache_begin&lt;&gt;</computeroutput>.</para><para><classname alt="boost::intrusive::unordered_set">unordered_set</classname> only provides forward iterators but it provides 4 iterator types: iterator and const_iterator to navigate through the whole container and local_iterator and const_local_iterator to navigate through the values stored in a single bucket. Local iterators are faster and smaller.</para><para>It's not recommended to use non constant-time size unordered_sets because several key functions, like "empty()", become non-constant time functions. Non constant-time size unordered_sets are mainly provided to support auto-unlink hooks.</para><para><classname alt="boost::intrusive::unordered_set">unordered_set</classname>, unlike std::unordered_set, does not make automatic rehashings nor offers functions related to a load factor. Rehashing can be explicitly requested and the user must provide a new bucket array that will be used from that moment.</para><para>Since no automatic rehashing is done, iterators are never invalidated when inserting or erasing elements. Iterators are only invalidated when rehasing. </para></description><typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
7756 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
7757 <typedef name="key_of_value"><type>implementation_defined::key_of_value</type></typedef>
7758 <typedef name="value_traits"><type>implementation_defined::value_traits</type></typedef>
7759 <typedef name="bucket_traits"><type>implementation_defined::bucket_traits</type></typedef>
7760 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
7761 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
7762 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
7763 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
7764 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
7765 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
7766 <typedef name="key_equal"><type>implementation_defined::key_equal</type></typedef>
7767 <typedef name="hasher"><type>implementation_defined::hasher</type></typedef>
7768 <typedef name="bucket_type"><type>implementation_defined::bucket_type</type></typedef>
7769 <typedef name="bucket_ptr"><type>implementation_defined::bucket_ptr</type></typedef>
7770 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
7771 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
7772 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
7773 <typedef name="local_iterator"><type>implementation_defined::local_iterator</type></typedef>
7774 <typedef name="const_local_iterator"><type>implementation_defined::const_local_iterator</type></typedef>
7775 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
7776 <typedef name="node"><type>implementation_defined::node</type></typedef>
7777 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
7778 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
7779 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
7780 <method-group name="public member functions">
7781 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time. Worst case (empty <classname alt="boost::intrusive::unordered_set">unordered_set</classname>): O(this-&gt;bucket_count())</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7782 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time. Worst case (empty <classname alt="boost::intrusive::unordered_set">unordered_set</classname>): O(this-&gt;bucket_count())</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7783 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time. Worst case (empty <classname alt="boost::intrusive::unordered_set">unordered_set</classname>): O(this-&gt;bucket_count())</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7784 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7785 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7786 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7787 <method name="hash_function" cv="const"><type>hasher</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the hasher object used by the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If hasher copy-constructor throws. </para></description></method>
7788 <method name="key_eq" cv="const"><type>key_equal</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_equal object used by the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_equal copy-constructor throws. </para></description></method>
7789 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: if constant-time size and <classname alt="boost::intrusive::cache_begin">cache_begin</classname> options are disabled, average constant time (worst case, with empty() == true: O(this-&gt;bucket_count()). Otherwise constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7790 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if <classname alt="boost::intrusive::constant_time_size">constant_time_size</classname> is false. Constant-time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7791 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>unordered_set</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: buckets must not be being used by any other resource.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty <classname alt="boost::intrusive::unordered_set">unordered_set</classname>, storing a reference to the bucket array and copies of the key_hasher and equal_func functors.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor or invocation of hash_func or equal_func throws.</para><para><emphasis role="bold">Notes</emphasis>: buckets array must be disposed only after *this is disposed. </para></description></method>
7792 <method name="clone_from"><type>void</type><template>
7793           <template-type-parameter name="Cloner"/>
7794           <template-type-parameter name="Disposer"/>
7795         </template><parameter name="src"><paramtype>const <classname>unordered_set</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw Cloner should yield to nodes that compare equal and produce the same hash than the original node.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. The hash function and the equality predicate are copied from the source.</para><para>If <classname alt="boost::intrusive::store_hash">store_hash</classname> option is true, this method does not use the hash function.</para><para>If any operation throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner or hasher throw or hash or equality predicate copying throws. Basic guarantee. </para></description></method>
7796 <method name="clone_from"><type>void</type><template>
7797           <template-type-parameter name="Cloner"/>
7798           <template-type-parameter name="Disposer"/>
7799         </template><parameter name="src"><paramtype><classname>unordered_set</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw Cloner should yield to nodes that compare equal and produce the same hash than the original node.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. The hash function and the equality predicate are copied from the source.</para><para>If <classname alt="boost::intrusive::store_hash">store_hash</classname> option is true, this method does not use the hash function.</para><para>If any operation throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner or hasher throw or hash or equality predicate copying throws. Basic guarantee. </para></description></method>
7800 <method name="insert"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Tries to inserts value into the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Returns</emphasis>: If the value is not already present inserts it and returns a pair containing the iterator to the new value and true. If there is an equivalent value returns a pair containing an iterator to the already present value and false.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
7801 <method name="insert"><type>void</type><template>
7802           <template-type-parameter name="Iterator"/>
7803         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Equivalent to this-&gt;insert_unique(t) for each element in [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(N), where N is distance(b, e). Worst case O(N*this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
7804 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hasher or key_compare throw. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the hash or the equality is much cheaper to construct than the value_type and this function offers the possibility to use that the part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time.</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para>After a successful rehashing insert_commit_data remains valid. </para></description></method>
7805 <method name="insert_check"><type>std::pair&lt; iterator, bool &gt;</type><template>
7806           <template-type-parameter name="KeyType"/>
7807           <template-type-parameter name="KeyHasher"/>
7808           <template-type-parameter name="KeyEqual"/>
7809         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hasher"><paramtype>KeyHasher</paramtype></parameter><parameter name="key_value_equal"><paramtype>KeyEqual</paramtype></parameter><parameter name="commit_data"><paramtype>insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Checks if a value can be inserted in the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>, using a user provided key instead of the value itself.</para><para><emphasis role="bold">Returns</emphasis>: If there is an equivalent value returns a pair containing an iterator to the already present value and false. If the value can be inserted returns true in the returned pair boolean and fills "commit_data" that is meant to be used with the "insert_commit" function.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal_func throw. Strong guarantee.</para><para><emphasis role="bold">Notes</emphasis>: This function is used to improve performance when constructing a value_type is expensive: if there is an equivalent value the constructed object must be discarded. Many times, the part of the node that is used to impose the hash or the equality is much cheaper to construct than the value_type and this function offers the possibility to use that the part to check if the insertion will be successful.</para><para>If the check is successful, the user can construct the value_type and use "insert_commit" to insert the object in constant-time.</para><para>"commit_data" remains valid for a subsequent "insert_commit" only if no more objects are inserted or erased from the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para>After a successful rehashing insert_commit_data remains valid. </para></description></method>
7810 <method name="insert_commit"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><parameter name="commit_data"><paramtype>const insert_commit_data &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue of type value_type. commit_data must have been obtained from a previous call to "insert_check". No objects should have been inserted or erased from the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> between the "insert_check" that filled "commit_data" and the call to "insert_commit".</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value in the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> using the information obtained from the "commit_data" that a previous "insert_check" filled.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the newly inserted object.</para><para><emphasis role="bold">Complexity</emphasis>: Constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Notes</emphasis>: This function has only sense if a "insert_check" has been previously executed to fill "commit_data". No value should be inserted or erased between the "insert_check" and "insert_commit" calls.</para><para>After a successful rehashing insert_commit_data remains valid. </para></description></method>
7811 <method name="erase"><type>void</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased element. No destructors are called. </para></description></method>
7812 <method name="erase"><type>void</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(distance(b, e)), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7813 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7814 <method name="erase"><type>size_type</type><template>
7815           <template-type-parameter name="KeyType"/>
7816           <template-type-parameter name="KeyHasher"/>
7817           <template-type-parameter name="KeyEqual"/>
7818         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements that have the same hash and compare equal with the given key.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal_func throw. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7819 <method name="erase_and_dispose"><type>void</type><template>
7820           <template-type-parameter name="Disposer"/>
7821         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
7822 <method name="erase_and_dispose"><type>void</type><template>
7823           <template-type-parameter name="Disposer"/>
7824         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(distance(b, e)), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
7825 <method name="erase_and_dispose"><type>size_type</type><template>
7826           <template-type-parameter name="Disposer"/>
7827         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7828 <method name="erase_and_dispose"><type>size_type</type><template>
7829           <template-type-parameter name="KeyType"/>
7830           <template-type-parameter name="KeyHasher"/>
7831           <template-type-parameter name="KeyEqual"/>
7832           <template-type-parameter name="Disposer"/>
7833         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "equal_func". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal_func throw. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
7834 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7835 <method name="clear_and_dispose"><type>void</type><template>
7836           <template-type-parameter name="Disposer"/>
7837         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7838 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. </para></description></method>
7839 <method name="count" cv="const"><type>size_type</type><template>
7840           <template-type-parameter name="KeyType"/>
7841           <template-type-parameter name="KeyHasher"/>
7842           <template-type-parameter name="KeyEqual"/>
7843         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal throw. </para></description></method>
7844 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element is equal to "value" or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. </para></description></method>
7845 <method name="find"><type>iterator</type><template>
7846           <template-type-parameter name="KeyType"/>
7847           <template-type-parameter name="KeyHasher"/>
7848           <template-type-parameter name="KeyEqual"/>
7849         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is "key" according to the given hash and equality functor or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal_func throw.</para><para><emphasis role="bold">Note</emphasis>: This function is used when constructing a value_type is expensive and the value_type can be compared with a cheaper key type. Usually this key is part of the value_type. </para></description></method>
7850 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. </para></description></method>
7851 <method name="find" cv="const"><type>const_iterator</type><template>
7852           <template-type-parameter name="KeyType"/>
7853           <template-type-parameter name="KeyHasher"/>
7854           <template-type-parameter name="KeyEqual"/>
7855         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is "key" according to the given hasher and equality functor or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal_func throw.</para><para><emphasis role="bold">Note</emphasis>: This function is used when constructing a value_type is expensive and the value_type can be compared with a cheaper key type. Usually this key is part of the value_type. </para></description></method>
7856 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns a range containing all elements with values equivalent to value. Returns std::make_pair(this-&gt;end(), this-&gt;end()) if no such elements exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. </para></description></method>
7857 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
7858           <template-type-parameter name="KeyType"/>
7859           <template-type-parameter name="KeyHasher"/>
7860           <template-type-parameter name="KeyEqual"/>
7861         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Returns a range containing all elements with equivalent keys. Returns std::make_pair(this-&gt;end(), this-&gt;end()) if no such elements exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(key, hash_func, equal_func)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or the equal_func throw.</para><para><emphasis role="bold">Note</emphasis>: This function is used when constructing a value_type is expensive and the value_type can be compared with a cheaper key type. Usually this key is part of the value_type. </para></description></method>
7862 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns a range containing all elements with values equivalent to value. Returns std::make_pair(this-&gt;end(), this-&gt;end()) if no such elements exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. </para></description></method>
7863 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
7864           <template-type-parameter name="KeyType"/>
7865           <template-type-parameter name="KeyHasher"/>
7866           <template-type-parameter name="KeyEqual"/>
7867         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Returns a range containing all elements with equivalent keys. Returns std::make_pair(this-&gt;end(), this-&gt;end()) if no such elements exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(key, hash_func, equal_func)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the hasher or equal_func throw.</para><para><emphasis role="bold">Note</emphasis>: This function is used when constructing a value_type is expensive and the value_type can be compared with a cheaper key type. Usually this key is part of the value_type. </para></description></method>
7868 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the internal hash function throws. </para></description></method>
7869 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the internal hash function throws. </para></description></method>
7870 <method name="local_iterator_to"><type>local_iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid local_iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7871 <method name="local_iterator_to" cv="const"><type>const_local_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid local_iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7872 <method name="bucket_count" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of buckets passed in the constructor or the last rehash function.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7873 <method name="bucket_size" cv="const"><type>size_type</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements in the nth bucket.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7874 <method name="bucket" cv="const"><type>size_type</type><parameter name="k"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the index of the bucket in which elements with keys equivalent to k would be found, if any such element existed.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the hash functor throws.</para><para><emphasis role="bold">Note</emphasis>: the return value is in the range [0, this-&gt;bucket_count()). </para></description></method>
7875 <method name="bucket" cv="const"><type>size_type</type><template>
7876           <template-type-parameter name="KeyType"/>
7877           <template-type-parameter name="KeyHasher"/>
7878         </template><parameter name="k"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para><emphasis role="bold">Effects</emphasis>: Returns the index of the bucket in which elements with keys equivalent to k would be found, if any such element existed.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If hash_func throws.</para><para><emphasis role="bold">Note</emphasis>: the return value is in the range [0, this-&gt;bucket_count()). </para></description></method>
7879 <method name="bucket_pointer" cv="const"><type>bucket_ptr</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the bucket array pointer passed in the constructor or the last rehash function.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7880 <method name="begin"><type>local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a local_iterator pointing to the beginning of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
7881 <method name="begin" cv="const"><type>const_local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a const_local_iterator pointing to the beginning of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
7882 <method name="cbegin" cv="const"><type>const_local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a const_local_iterator pointing to the beginning of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
7883 <method name="end"><type>local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a local_iterator pointing to the end of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
7884 <method name="end" cv="const"><type>const_local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a const_local_iterator pointing to the end of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
7885 <method name="cend" cv="const"><type>const_local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a const_local_iterator pointing to the end of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
7886 <method name="rehash"><type>void</type><parameter name="new_bucket_traits"><paramtype>const bucket_traits &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: new_bucket_traits can hold a pointer to a new bucket array or the same as the old bucket array with a different length. new_size is the length of the the array pointed by new_buckets. If new_bucket_traits.bucket_begin() == this-&gt;bucket_pointer() new_bucket_traits.bucket_count() can be bigger or smaller than this-&gt;bucket_count(). 'new_bucket_traits' copy constructor should not throw.</para><para><emphasis role="bold">Effects</emphasis>: If <computeroutput>new_bucket_traits.bucket_begin() == this-&gt;bucket_pointer()</computeroutput> is false, unlinks values from the old bucket and inserts then in the new one according to the hash value of values.</para><para>If <computeroutput>new_bucket_traits.bucket_begin() == this-&gt;bucket_pointer()</computeroutput> is true, the implementations avoids moving values as much as possible.</para><para>Bucket traits hold by *this is assigned from new_bucket_traits. If the container is configured as incremental&lt;&gt;, the split bucket is set to the new bucket_count().</para><para>If <classname alt="boost::intrusive::store_hash">store_hash</classname> option is true, this method does not use the hash function. If false, the implementation tries to minimize calls to the hash function (e.g. once for equivalent values if optimize_multikey&lt;true&gt; is true).</para><para>If rehash is successful updates the internal <classname alt="boost::intrusive::bucket_traits">bucket_traits</classname> with new_bucket_traits.</para><para><emphasis role="bold">Complexity</emphasis>: Average case linear in this-&gt;size(), worst case quadratic.</para><para><emphasis role="bold">Throws</emphasis>: If the hasher functor throws. Basic guarantee. </para></description></method>
7887 <method name="full_rehash"><type>void</type><description><para><emphasis role="bold">Note</emphasis>: This function is used when keys from inserted elements are changed (e.g. a language change when key is a string) but uniqueness and hash properties are preserved so a fast full rehash recovers invariants for *this without extracting and reinserting all elements again.</para><para><emphasis role="bold">Requires</emphasis>: Calls produced to the hash function should not alter the value uniqueness properties of already inserted elements. If hasher(key1) == hasher(key2) was true when elements were inserted, it shall be true during calls produced in the execution of this function.</para><para>key_equal is not called inside this function so it is assumed that key_equal(value1, value2) should produce the same results as before for inserted elements.</para><para><emphasis role="bold">Effects</emphasis>: Reprocesses all values hold by *this, recalculating their hash values and redistributing them though the buckets.</para><para>If <classname alt="boost::intrusive::store_hash">store_hash</classname> option is true, this method uses the hash function and updates the stored hash value.</para><para><emphasis role="bold">Complexity</emphasis>: Average case linear in this-&gt;size(), worst case quadratic.</para><para><emphasis role="bold">Throws</emphasis>: If the hasher functor throws. Basic guarantee. </para></description></method>
7888 <method name="incremental_rehash"><type>bool</type><parameter name="grow"><paramtype>bool</paramtype><default>true</default></parameter><description><para><emphasis role="bold">Requires</emphasis>:</para><para><emphasis role="bold">Effects</emphasis>:</para><para><emphasis role="bold">Complexity</emphasis>:</para><para><emphasis role="bold">Throws</emphasis>:</para><para><emphasis role="bold">Note</emphasis>: this method is only available if incremental&lt;true&gt; option is activated. </para></description></method>
7889 <method name="incremental_rehash"><type>bool</type><parameter name="new_bucket_traits"><paramtype>const bucket_traits &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If new_bucket_traits.bucket_count() is not this-&gt;bucket_count()/2 or this-&gt;bucket_count()*2, or this-&gt;split_bucket() != new_bucket_traits.bucket_count() returns false and does nothing.</para><para>Otherwise, copy assigns new_bucket_traits to the internal <classname alt="boost::intrusive::bucket_traits">bucket_traits</classname> and transfers all the objects from old buckets to the new ones.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to size().</para><para><emphasis role="bold">Throws</emphasis>: Nothing</para><para><emphasis role="bold">Note</emphasis>: this method is only available if incremental&lt;true&gt; option is activated. </para></description></method>
7890 <method name="split_count" cv="const"><type>size_type</type><description><para><emphasis role="bold">Requires</emphasis>: incremental&lt;&gt; option must be set</para><para><emphasis role="bold">Effects</emphasis>: returns the current split count</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing </para></description></method>
7891 </method-group>
7892 <constructor specifiers="explicit"><parameter name="b_traits"><paramtype>const bucket_traits &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>const hasher &amp;</paramtype><default>hasher()</default></parameter><parameter name="equal_func"><paramtype>const key_equal &amp;</paramtype><default>key_equal()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: buckets must not be being used by any other resource.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty <classname alt="boost::intrusive::unordered_set">unordered_set</classname>, storing a reference to the bucket array and copies of the key_hasher and equal_func functors.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor or invocation of hash_func or equal_func throws.</para><para><emphasis role="bold">Notes</emphasis>: buckets array must be disposed only after *this is disposed. </para></description></constructor>
7893 <constructor><template>
7894           <template-type-parameter name="Iterator"/>
7895         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="b_traits"><paramtype>const bucket_traits &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>const hasher &amp;</paramtype><default>hasher()</default></parameter><parameter name="equal_func"><paramtype>const key_equal &amp;</paramtype><default>key_equal()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: buckets must not be being used by any other resource and dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: If N is distance(b, e): Average case is O(N) (with a good hash function and with buckets_len &gt;= N),worst case O(N^2).</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor or invocation of hasher or key_equal throws.</para><para><emphasis role="bold">Notes</emphasis>: buckets array must be disposed only after *this is disposed. </para></description></constructor>
7896 <constructor><parameter name="x"><paramtype><classname>unordered_set</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
7897 <copy-assignment><type><classname>unordered_set</classname> &amp;</type><parameter name="x"><paramtype><classname>unordered_set</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
7898 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> are not deleted (i.e. no destructors are called).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements in the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>, if it's a safe-mode or auto-unlink value. Otherwise constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
7899 <method-group name="public static functions">
7900 <method name="s_local_iterator_to" specifiers="static"><type>local_iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid local_iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
7901 <method name="s_local_iterator_to" specifiers="static"><type>const_local_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid local_iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
7902 <method name="suggested_upper_bucket_count" specifiers="static"><type>size_type</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the nearest new bucket count optimized for the container that is bigger or equal than n. This suggestion can be used to create bucket arrays with a size that will usually improve container's performance. If such value does not exist, the higher possible value is returned.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7903 <method name="suggested_lower_bucket_count" specifiers="static"><type>size_type</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the nearest new bucket count optimized for the container that is smaller or equal than n. This suggestion can be used to create bucket arrays with a size that will usually improve container's performance. If such value does not exist, the lowest possible value is returned.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7904 </method-group>
7905 </class><struct name="make_unordered_set"><template>
7906       <template-type-parameter name="T"/>
7907       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
7908     </template><description><para>Helper metafunction to define an <computeroutput><classname alt="boost::intrusive::unordered_set">unordered_set</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
7909 </struct><class name="unordered_multiset"><template>
7910       <template-type-parameter name="T"/>
7911       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
7912     </template><inherit access="public">boost::intrusive::hashtable&lt; ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags &gt;</inherit><description><para>The class template <classname alt="boost::intrusive::unordered_multiset">unordered_multiset</classname> is an intrusive container, that mimics most of the interface of std::tr1::unordered_multiset as described in the C++ TR1.</para><para><classname alt="boost::intrusive::unordered_multiset">unordered_multiset</classname> is a semi-intrusive container: each object to be stored in the container must contain a proper hook, but the container also needs additional auxiliary memory to work: <classname alt="boost::intrusive::unordered_multiset">unordered_multiset</classname> needs a pointer to an array of type <computeroutput>bucket_type</computeroutput> to be passed in the constructor. This bucket array must have at least the same lifetime as the container. This makes the use of <classname alt="boost::intrusive::unordered_multiset">unordered_multiset</classname> more complicated than purely intrusive containers. <computeroutput>bucket_type</computeroutput> is default-constructible, copyable and assignable</para><para>The template parameter <computeroutput>T</computeroutput> is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options: <computeroutput>base_hook&lt;&gt;/member_hook&lt;&gt;/value_traits&lt;&gt;</computeroutput>, <computeroutput>constant_time_size&lt;&gt;</computeroutput>, <computeroutput>size_type&lt;&gt;</computeroutput>, <computeroutput>hash&lt;&gt;</computeroutput> and <computeroutput>equal&lt;&gt;</computeroutput> <computeroutput>bucket_traits&lt;&gt;</computeroutput>, <computeroutput>power_2_buckets&lt;&gt;</computeroutput> and <computeroutput>cache_begin&lt;&gt;</computeroutput>.</para><para><classname alt="boost::intrusive::unordered_multiset">unordered_multiset</classname> only provides forward iterators but it provides 4 iterator types: iterator and const_iterator to navigate through the whole container and local_iterator and const_local_iterator to navigate through the values stored in a single bucket. Local iterators are faster and smaller.</para><para>It's not recommended to use non constant-time size unordered_multisets because several key functions, like "empty()", become non-constant time functions. Non constant-time size unordered_multisets are mainly provided to support auto-unlink hooks.</para><para><classname alt="boost::intrusive::unordered_multiset">unordered_multiset</classname>, unlike std::unordered_set, does not make automatic rehashings nor offers functions related to a load factor. Rehashing can be explicitly requested and the user must provide a new bucket array that will be used from that moment.</para><para>Since no automatic rehashing is done, iterators are never invalidated when inserting or erasing elements. Iterators are only invalidated when rehasing. </para></description><typedef name="value_type"><type>implementation_defined::value_type</type></typedef>
7913 <typedef name="key_type"><type>implementation_defined::key_type</type></typedef>
7914 <typedef name="value_traits"><type>implementation_defined::value_traits</type></typedef>
7915 <typedef name="bucket_traits"><type>implementation_defined::bucket_traits</type></typedef>
7916 <typedef name="pointer"><type>implementation_defined::pointer</type></typedef>
7917 <typedef name="const_pointer"><type>implementation_defined::const_pointer</type></typedef>
7918 <typedef name="reference"><type>implementation_defined::reference</type></typedef>
7919 <typedef name="const_reference"><type>implementation_defined::const_reference</type></typedef>
7920 <typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
7921 <typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
7922 <typedef name="key_equal"><type>implementation_defined::key_equal</type></typedef>
7923 <typedef name="hasher"><type>implementation_defined::hasher</type></typedef>
7924 <typedef name="bucket_type"><type>implementation_defined::bucket_type</type></typedef>
7925 <typedef name="bucket_ptr"><type>implementation_defined::bucket_ptr</type></typedef>
7926 <typedef name="iterator"><type>implementation_defined::iterator</type></typedef>
7927 <typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
7928 <typedef name="insert_commit_data"><type>implementation_defined::insert_commit_data</type></typedef>
7929 <typedef name="local_iterator"><type>implementation_defined::local_iterator</type></typedef>
7930 <typedef name="const_local_iterator"><type>implementation_defined::const_local_iterator</type></typedef>
7931 <typedef name="node_traits"><type>implementation_defined::node_traits</type></typedef>
7932 <typedef name="node"><type>implementation_defined::node</type></typedef>
7933 <typedef name="node_ptr"><type>implementation_defined::node_ptr</type></typedef>
7934 <typedef name="const_node_ptr"><type>implementation_defined::const_node_ptr</type></typedef>
7935 <typedef name="node_algorithms"><type>implementation_defined::node_algorithms</type></typedef>
7936 <method-group name="public member functions">
7937 <method name="begin"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the beginning of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time. Worst case (empty <classname alt="boost::intrusive::unordered_set">unordered_set</classname>): O(this-&gt;bucket_count())</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7938 <method name="begin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time. Worst case (empty <classname alt="boost::intrusive::unordered_set">unordered_set</classname>): O(this-&gt;bucket_count())</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7939 <method name="cbegin" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the beginning of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time. Worst case (empty <classname alt="boost::intrusive::unordered_set">unordered_set</classname>): O(this-&gt;bucket_count())</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7940 <method name="end"><type>iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns an iterator pointing to the end of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7941 <method name="end" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7942 <method name="cend" cv="const"><type>const_iterator</type><description><para><emphasis role="bold">Effects</emphasis>: Returns a const_iterator pointing to the end of the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7943 <method name="hash_function" cv="const"><type>hasher</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the hasher object used by the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If hasher copy-constructor throws. </para></description></method>
7944 <method name="key_eq" cv="const"><type>key_equal</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the key_equal object used by the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If key_equal copy-constructor throws. </para></description></method>
7945 <method name="empty" cv="const"><type>bool</type><description><para><emphasis role="bold">Effects</emphasis>: Returns true if the container is empty.</para><para><emphasis role="bold">Complexity</emphasis>: if constant-time size and <classname alt="boost::intrusive::cache_begin">cache_begin</classname> options are disabled, average constant time (worst case, with empty() == true: O(this-&gt;bucket_count()). Otherwise constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7946 <method name="size" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements stored in the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to elements contained in *this if <classname alt="boost::intrusive::constant_time_size">constant_time_size</classname> is false. Constant-time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
7947 <method name="swap"><type>void</type><parameter name="other"><paramtype><classname>unordered_multiset</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: buckets must not be being used by any other resource.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty <classname alt="boost::intrusive::unordered_set">unordered_set</classname>, storing a reference to the bucket array and copies of the key_hasher and equal_func functors.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor or invocation of hash_func or equal_func throws.</para><para><emphasis role="bold">Notes</emphasis>: buckets array must be disposed only after *this is disposed. </para></description></method>
7948 <method name="clone_from"><type>void</type><template>
7949           <template-type-parameter name="Cloner"/>
7950           <template-type-parameter name="Disposer"/>
7951         </template><parameter name="src"><paramtype>const <classname>unordered_multiset</classname> &amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw Cloner should yield to nodes that compare equal and produce the same hash than the original node.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(const_reference ) and inserts them on *this. The hash function and the equality predicate are copied from the source.</para><para>If <classname alt="boost::intrusive::store_hash">store_hash</classname> option is true, this method does not use the hash function.</para><para>If any operation throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner or hasher throw or hash or equality predicate copying throws. Basic guarantee. </para></description></method>
7952 <method name="clone_from"><type>void</type><template>
7953           <template-type-parameter name="Cloner"/>
7954           <template-type-parameter name="Disposer"/>
7955         </template><parameter name="src"><paramtype><classname>unordered_multiset</classname> &amp;&amp;</paramtype></parameter><parameter name="cloner"><paramtype>Cloner</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw Cloner should yield to nodes that compare equal and produce the same hash than the original node.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements from *this calling Disposer::operator()(pointer), clones all the elements from src calling Cloner::operator()(reference) and inserts them on *this. The hash function and the equality predicate are copied from the source.</para><para>If <classname alt="boost::intrusive::store_hash">store_hash</classname> option is true, this method does not use the hash function.</para><para>If any operation throws, all cloned elements are unlinked and disposed calling Disposer::operator()(pointer).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to erased plus inserted elements.</para><para><emphasis role="bold">Throws</emphasis>: If cloner or hasher throw or hash or equality predicate copying throws. Basic guarantee. </para></description></method>
7956 <method name="insert"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue</para><para><emphasis role="bold">Effects</emphasis>: Inserts the value into the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>.</para><para><emphasis role="bold">Returns</emphasis>: An iterator to the inserted value.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. Strong guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
7957 <method name="insert"><type>void</type><template>
7958           <template-type-parameter name="Iterator"/>
7959         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Equivalent to this-&gt;insert_equal(t) for each element in [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(N), where N is distance(b, e). Worst case O(N*this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: Does not affect the validity of iterators and references. No copy-constructors are called. </para></description></method>
7960 <method name="erase"><type>void</type><parameter name="i"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased element. No destructors are called. </para></description></method>
7961 <method name="erase"><type>void</type><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(distance(b, e)), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7962 <method name="erase"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7963 <method name="erase"><type>size_type</type><template>
7964           <template-type-parameter name="KeyType"/>
7965           <template-type-parameter name="KeyHasher"/>
7966           <template-type-parameter name="KeyEqual"/>
7967         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements that have the same hash and compare equal with the given key.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal_func throw. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7968 <method name="erase_and_dispose"><type>void</type><template>
7969           <template-type-parameter name="Disposer"/>
7970         </template><parameter name="i"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the element pointed to by i. Disposer::operator()(pointer) is called for the removed element.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
7971 <method name="erase_and_dispose"><type>void</type><template>
7972           <template-type-parameter name="Disposer"/>
7973         </template><parameter name="b"><paramtype>const_iterator</paramtype></parameter><parameter name="e"><paramtype>const_iterator</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases the range pointed to by b end e. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(distance(b, e)), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
7974 <method name="erase_and_dispose"><type>size_type</type><template>
7975           <template-type-parameter name="Disposer"/>
7976         </template><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given value. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7977 <method name="erase_and_dispose"><type>size_type</type><template>
7978           <template-type-parameter name="KeyType"/>
7979           <template-type-parameter name="KeyHasher"/>
7980           <template-type-parameter name="KeyEqual"/>
7981           <template-type-parameter name="Disposer"/>
7982         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all the elements with the given key. according to the comparison functor "equal_func". Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Returns</emphasis>: The number of erased elements.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal_func throw. Basic guarantee.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators to the erased elements. </para></description></method>
7983 <method name="clear"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. if it's a safe-mode or auto-unlink value_type. Constant time otherwise.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7984 <method name="clear_and_dispose"><type>void</type><template>
7985           <template-type-parameter name="Disposer"/>
7986         </template><parameter name="disposer"><paramtype>Disposer</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: Disposer::operator()(pointer) shouldn't throw.</para><para><emphasis role="bold">Effects</emphasis>: Erases all of the elements.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements on the container. Disposer::operator()(pointer) is called for the removed elements.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: Invalidates the iterators (but not the references) to the erased elements. No destructors are called. </para></description></method>
7987 <method name="count" cv="const"><type>size_type</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. </para></description></method>
7988 <method name="count" cv="const"><type>size_type</type><template>
7989           <template-type-parameter name="KeyType"/>
7990           <template-type-parameter name="KeyHasher"/>
7991           <template-type-parameter name="KeyEqual"/>
7992         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given key</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal throw. </para></description></method>
7993 <method name="find"><type>iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element is equal to "value" or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. </para></description></method>
7994 <method name="find"><type>iterator</type><template>
7995           <template-type-parameter name="KeyType"/>
7996           <template-type-parameter name="KeyHasher"/>
7997           <template-type-parameter name="KeyEqual"/>
7998         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is "key" according to the given hash and equality functor or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal_func throw.</para><para><emphasis role="bold">Note</emphasis>: This function is used when constructing a value_type is expensive and the value_type can be compared with a cheaper key type. Usually this key is part of the value_type. </para></description></method>
7999 <method name="find" cv="const"><type>const_iterator</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of contained elements with the given value</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. </para></description></method>
8000 <method name="find" cv="const"><type>const_iterator</type><template>
8001           <template-type-parameter name="KeyType"/>
8002           <template-type-parameter name="KeyHasher"/>
8003           <template-type-parameter name="KeyEqual"/>
8004         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Finds an iterator to the first element whose key is "key" according to the given hasher and equality functor or end() if that element does not exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(1), worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or equal_func throw.</para><para><emphasis role="bold">Note</emphasis>: This function is used when constructing a value_type is expensive and the value_type can be compared with a cheaper key type. Usually this key is part of the value_type. </para></description></method>
8005 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns a range containing all elements with values equivalent to value. Returns std::make_pair(this-&gt;end(), this-&gt;end()) if no such elements exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. </para></description></method>
8006 <method name="equal_range"><type>std::pair&lt; iterator, iterator &gt;</type><template>
8007           <template-type-parameter name="KeyType"/>
8008           <template-type-parameter name="KeyHasher"/>
8009           <template-type-parameter name="KeyEqual"/>
8010         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Returns a range containing all elements with equivalent keys. Returns std::make_pair(this-&gt;end(), this-&gt;end()) if no such elements exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(key, hash_func, equal_func)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If hash_func or the equal_func throw.</para><para><emphasis role="bold">Note</emphasis>: This function is used when constructing a value_type is expensive and the value_type can be compared with a cheaper key type. Usually this key is part of the value_type. </para></description></method>
8011 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><parameter name="key"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns a range containing all elements with values equivalent to value. Returns std::make_pair(this-&gt;end(), this-&gt;end()) if no such elements exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(value)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the internal hasher or the equality functor throws. </para></description></method>
8012 <method name="equal_range" cv="const"><type>std::pair&lt; const_iterator, const_iterator &gt;</type><template>
8013           <template-type-parameter name="KeyType"/>
8014           <template-type-parameter name="KeyHasher"/>
8015           <template-type-parameter name="KeyEqual"/>
8016         </template><parameter name="key"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><parameter name="equal_func"><paramtype>KeyEqual</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para>"equal_func" must be a equality function that induces the same equality as key_equal. The difference is that "equal_func" compares an arbitrary key with the contained values.</para><para><emphasis role="bold">Effects</emphasis>: Returns a range containing all elements with equivalent keys. Returns std::make_pair(this-&gt;end(), this-&gt;end()) if no such elements exist.</para><para><emphasis role="bold">Complexity</emphasis>: Average case O(this-&gt;count(key, hash_func, equal_func)). Worst case O(this-&gt;size()).</para><para><emphasis role="bold">Throws</emphasis>: If the hasher or equal_func throw.</para><para><emphasis role="bold">Note</emphasis>: This function is used when constructing a value_type is expensive and the value_type can be compared with a cheaper key type. Usually this key is part of the value_type. </para></description></method>
8017 <method name="iterator_to"><type>iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the internal hash function throws. </para></description></method>
8018 <method name="iterator_to" cv="const"><type>const_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid const_iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the internal hash function throws. </para></description></method>
8019 <method name="local_iterator_to"><type>local_iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid local_iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
8020 <method name="local_iterator_to" cv="const"><type>const_local_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid local_iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
8021 <method name="bucket_count" cv="const"><type>size_type</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the number of buckets passed in the constructor or the last rehash function.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
8022 <method name="bucket_size" cv="const"><type>size_type</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns the number of elements in the nth bucket.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
8023 <method name="bucket" cv="const"><type>size_type</type><parameter name="k"><paramtype>const key_type &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the index of the bucket in which elements with keys equivalent to k would be found, if any such element existed.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If the hash functor throws.</para><para><emphasis role="bold">Note</emphasis>: the return value is in the range [0, this-&gt;bucket_count()). </para></description></method>
8024 <method name="bucket" cv="const"><type>size_type</type><template>
8025           <template-type-parameter name="KeyType"/>
8026           <template-type-parameter name="KeyHasher"/>
8027         </template><parameter name="k"><paramtype>const KeyType &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>KeyHasher</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: "hash_func" must be a hash function that induces the same hash values as the stored hasher. The difference is that "hash_func" hashes the given key instead of the value_type.</para><para><emphasis role="bold">Effects</emphasis>: Returns the index of the bucket in which elements with keys equivalent to k would be found, if any such element existed.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If hash_func throws.</para><para><emphasis role="bold">Note</emphasis>: the return value is in the range [0, this-&gt;bucket_count()). </para></description></method>
8028 <method name="bucket_pointer" cv="const"><type>bucket_ptr</type><description><para><emphasis role="bold">Effects</emphasis>: Returns the bucket array pointer passed in the constructor or the last rehash function.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
8029 <method name="begin"><type>local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a local_iterator pointing to the beginning of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
8030 <method name="begin" cv="const"><type>const_local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a const_local_iterator pointing to the beginning of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
8031 <method name="cbegin" cv="const"><type>const_local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a const_local_iterator pointing to the beginning of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
8032 <method name="end"><type>local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a local_iterator pointing to the end of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
8033 <method name="end" cv="const"><type>const_local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a const_local_iterator pointing to the end of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
8034 <method name="cend" cv="const"><type>const_local_iterator</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: n is in the range [0, this-&gt;bucket_count()).</para><para><emphasis role="bold">Effects</emphasis>: Returns a const_local_iterator pointing to the end of the sequence stored in the bucket n.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: [this-&gt;begin(n), this-&gt;end(n)) is a valid range containing all of the elements in the nth bucket. </para></description></method>
8035 <method name="rehash"><type>void</type><parameter name="new_bucket_traits"><paramtype>const bucket_traits &amp;</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: new_bucket_traits can hold a pointer to a new bucket array or the same as the old bucket array with a different length. new_size is the length of the the array pointed by new_buckets. If new_bucket_traits.bucket_begin() == this-&gt;bucket_pointer() new_bucket_traits.bucket_count() can be bigger or smaller than this-&gt;bucket_count(). 'new_bucket_traits' copy constructor should not throw.</para><para><emphasis role="bold">Effects</emphasis>: If <computeroutput>new_bucket_traits.bucket_begin() == this-&gt;bucket_pointer()</computeroutput> is false, unlinks values from the old bucket and inserts then in the new one according to the hash value of values.</para><para>If <computeroutput>new_bucket_traits.bucket_begin() == this-&gt;bucket_pointer()</computeroutput> is true, the implementations avoids moving values as much as possible.</para><para>Bucket traits hold by *this is assigned from new_bucket_traits. If the container is configured as incremental&lt;&gt;, the split bucket is set to the new bucket_count().</para><para>If <classname alt="boost::intrusive::store_hash">store_hash</classname> option is true, this method does not use the hash function. If false, the implementation tries to minimize calls to the hash function (e.g. once for equivalent values if optimize_multikey&lt;true&gt; is true).</para><para>If rehash is successful updates the internal <classname alt="boost::intrusive::bucket_traits">bucket_traits</classname> with new_bucket_traits.</para><para><emphasis role="bold">Complexity</emphasis>: Average case linear in this-&gt;size(), worst case quadratic.</para><para><emphasis role="bold">Throws</emphasis>: If the hasher functor throws. Basic guarantee. </para></description></method>
8036 <method name="full_rehash"><type>void</type><description><para><emphasis role="bold">Note</emphasis>: This function is used when keys from inserted elements are changed (e.g. a language change when key is a string) but uniqueness and hash properties are preserved so a fast full rehash recovers invariants for *this without extracting and reinserting all elements again.</para><para><emphasis role="bold">Requires</emphasis>: Calls produced to the hash function should not alter the value uniqueness properties of already inserted elements. If hasher(key1) == hasher(key2) was true when elements were inserted, it shall be true during calls produced in the execution of this function.</para><para>key_equal is not called inside this function so it is assumed that key_equal(value1, value2) should produce the same results as before for inserted elements.</para><para><emphasis role="bold">Effects</emphasis>: Reprocesses all values hold by *this, recalculating their hash values and redistributing them though the buckets.</para><para>If <classname alt="boost::intrusive::store_hash">store_hash</classname> option is true, this method uses the hash function and updates the stored hash value.</para><para><emphasis role="bold">Complexity</emphasis>: Average case linear in this-&gt;size(), worst case quadratic.</para><para><emphasis role="bold">Throws</emphasis>: If the hasher functor throws. Basic guarantee. </para></description></method>
8037 <method name="incremental_rehash"><type>bool</type><parameter name="grow"><paramtype>bool</paramtype><default>true</default></parameter><description><para><emphasis role="bold">Requires</emphasis>:</para><para><emphasis role="bold">Effects</emphasis>:</para><para><emphasis role="bold">Complexity</emphasis>:</para><para><emphasis role="bold">Throws</emphasis>:</para><para><emphasis role="bold">Note</emphasis>: this method is only available if incremental&lt;true&gt; option is activated. </para></description></method>
8038 <method name="incremental_rehash"><type>bool</type><parameter name="new_bucket_traits"><paramtype>const bucket_traits &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If new_bucket_traits.bucket_count() is not this-&gt;bucket_count()/2 or this-&gt;bucket_count()*2, or this-&gt;split_bucket() != new_bucket_traits.bucket_count() returns false and does nothing.</para><para>Otherwise, copy assigns new_bucket_traits to the internal <classname alt="boost::intrusive::bucket_traits">bucket_traits</classname> and transfers all the objects from old buckets to the new ones.</para><para><emphasis role="bold">Complexity</emphasis>: Linear to size().</para><para><emphasis role="bold">Throws</emphasis>: Nothing</para><para><emphasis role="bold">Note</emphasis>: this method is only available if incremental&lt;true&gt; option is activated. </para></description></method>
8039 <method name="split_count" cv="const"><type>size_type</type><description><para><emphasis role="bold">Requires</emphasis>: incremental&lt;&gt; option must be set</para><para><emphasis role="bold">Effects</emphasis>: returns the current split count</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing </para></description></method>
8040 </method-group>
8041 <constructor specifiers="explicit"><parameter name="b_traits"><paramtype>const bucket_traits &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>const hasher &amp;</paramtype><default>hasher()</default></parameter><parameter name="equal_func"><paramtype>const key_equal &amp;</paramtype><default>key_equal()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: buckets must not be being used by any other resource.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty <classname alt="boost::intrusive::unordered_set">unordered_set</classname>, storing a reference to the bucket array and copies of the key_hasher and equal_func functors.</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor or invocation of hash_func or equal_func throws.</para><para><emphasis role="bold">Notes</emphasis>: buckets array must be disposed only after *this is disposed. </para></description></constructor>
8042 <constructor><template>
8043           <template-type-parameter name="Iterator"/>
8044         </template><parameter name="b"><paramtype>Iterator</paramtype></parameter><parameter name="e"><paramtype>Iterator</paramtype></parameter><parameter name="b_traits"><paramtype>const bucket_traits &amp;</paramtype></parameter><parameter name="hash_func"><paramtype>const hasher &amp;</paramtype><default>hasher()</default></parameter><parameter name="equal_func"><paramtype>const key_equal &amp;</paramtype><default>key_equal()</default></parameter><parameter name="v_traits"><paramtype>const value_traits &amp;</paramtype><default>value_traits()</default></parameter><description><para><emphasis role="bold">Requires</emphasis>: buckets must not be being used by any other resource and dereferencing iterator must yield an lvalue of type value_type.</para><para><emphasis role="bold">Effects</emphasis>: Constructs an empty container and inserts elements from [b, e).</para><para><emphasis role="bold">Complexity</emphasis>: If N is distance(b, e): Average case is O(N) (with a good hash function and with buckets_len &gt;= N),worst case O(N^2).</para><para><emphasis role="bold">Throws</emphasis>: If value_traits::node_traits::node constructor throws (this does not happen with predefined Boost.Intrusive hooks) or the copy constructor or invocation of hasher or key_equal throws.</para><para><emphasis role="bold">Notes</emphasis>: buckets array must be disposed only after *this is disposed. </para></description></constructor>
8045 <constructor><parameter name="x"><paramtype><classname>unordered_multiset</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></constructor>
8046 <copy-assignment><type><classname>unordered_multiset</classname> &amp;</type><parameter name="x"><paramtype><classname>unordered_multiset</classname> &amp;&amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: to-do </para></description></copy-assignment>
8047 <destructor><description><para><emphasis role="bold">Effects</emphasis>: Detaches all elements from this. The objects in the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> are not deleted (i.e. no destructors are called).</para><para><emphasis role="bold">Complexity</emphasis>: Linear to the number of elements in the <classname alt="boost::intrusive::unordered_set">unordered_set</classname>, if it's a safe-mode or auto-unlink value. Otherwise constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
8048 <method-group name="public static functions">
8049 <method name="s_local_iterator_to" specifiers="static"><type>local_iterator</type><parameter name="value"><paramtype>reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid local_iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
8050 <method name="s_local_iterator_to" specifiers="static"><type>const_local_iterator</type><parameter name="value"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Requires</emphasis>: value must be an lvalue and shall be in a <classname alt="boost::intrusive::unordered_set">unordered_set</classname> of appropriate type. Otherwise the behavior is undefined.</para><para><emphasis role="bold">Effects</emphasis>: Returns: a valid local_iterator belonging to the <classname alt="boost::intrusive::unordered_set">unordered_set</classname> that points to the value</para><para><emphasis role="bold">Complexity</emphasis>: Constant.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Note</emphasis>: This static function is available only if the <emphasis>value traits</emphasis> is stateless. </para></description></method>
8051 <method name="suggested_upper_bucket_count" specifiers="static"><type>size_type</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the nearest new bucket count optimized for the container that is bigger or equal than n. This suggestion can be used to create bucket arrays with a size that will usually improve container's performance. If such value does not exist, the higher possible value is returned.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
8052 <method name="suggested_lower_bucket_count" specifiers="static"><type>size_type</type><parameter name="n"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Returns the nearest new bucket count optimized for the container that is smaller or equal than n. This suggestion can be used to create bucket arrays with a size that will usually improve container's performance. If such value does not exist, the lowest possible value is returned.</para><para><emphasis role="bold">Complexity</emphasis>: Amortized constant time.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
8053 </method-group>
8054 </class><struct name="make_unordered_multiset"><template>
8055       <template-type-parameter name="T"/>
8056       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
8057     </template><description><para>Helper metafunction to define an <computeroutput><classname alt="boost::intrusive::unordered_multiset">unordered_multiset</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
8058 </struct>
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110 </namespace>
8111 </namespace>
8112 </header>
8113 <header name="boost/intrusive/unordered_set_hook.hpp">
8114 <namespace name="boost">
8115 <namespace name="intrusive">
8116 <struct name="make_unordered_set_base_hook"><template>
8117       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
8118     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::unordered_set_base_hook">unordered_set_base_hook</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
8119 </struct><class name="unordered_set_base_hook"><template>
8120       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
8121     </template><inherit access="public">make_unordered_set_base_hook::type&lt; O1, O2, O3, O4 &gt;</inherit><description><para>Derive a class from <classname alt="boost::intrusive::unordered_set_base_hook">unordered_set_base_hook</classname> in order to store objects in in an unordered_set/unordered_multi_set. <classname alt="boost::intrusive::unordered_set_base_hook">unordered_set_base_hook</classname> holds the data necessary to maintain the unordered_set/unordered_multi_set and provides an appropriate <classname alt="boost::intrusive::value_traits">value_traits</classname> class for unordered_set/unordered_multi_set.</para><para>The hook admits the following options: <computeroutput>tag&lt;&gt;</computeroutput>, <computeroutput>void_pointer&lt;&gt;</computeroutput>, <computeroutput>link_mode&lt;&gt;</computeroutput>, <computeroutput>store_hash&lt;&gt;</computeroutput> and <computeroutput>optimize_multikey&lt;&gt;</computeroutput>.</para><para><computeroutput>tag&lt;&gt;</computeroutput> defines a tag to identify the node. The same tag value can be used in different classes, but if a class is derived from more than one <computeroutput><classname alt="boost::intrusive::list_base_hook">list_base_hook</classname></computeroutput>, then each <computeroutput><classname alt="boost::intrusive::list_base_hook">list_base_hook</classname></computeroutput> needs its unique tag.</para><para><computeroutput>void_pointer&lt;&gt;</computeroutput> is the pointer type that will be used internally in the hook and the container configured to use this hook.</para><para><computeroutput>link_mode&lt;&gt;</computeroutput> will specify the linking mode of the hook (<computeroutput>normal_link</computeroutput>, <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput>).</para><para><computeroutput>store_hash&lt;&gt;</computeroutput> will tell the hook to store the hash of the value to speed up rehashings.</para><para><computeroutput>optimize_multikey&lt;&gt;</computeroutput> will tell the hook to store a link to form a group with other value with the same value to speed up searches and insertions in unordered_multisets with a great number of with equivalent keys. </para></description><method-group name="public member functions">
8122 <method name="swap_nodes"><type>void</type><parameter name="other"><paramtype><classname>unordered_set_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swapping two nodes swaps the position of the elements related to those nodes in one or two containers. That is, if the node this is part of the element e1, the node x is part of the element e2 and both elements are included in the containers s1 and s2, then after the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 at the position of e1. If one element is not in a container, then after the swap-operation the other element is not in a container. Iterators to e1 and e2 related to those nodes are invalidated.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
8123 <method name="is_linked" cv="const"><type>bool</type><description><para><emphasis role="bold">Precondition</emphasis>: <classname alt="boost::intrusive::link_mode">link_mode</classname> must be <computeroutput>safe_link</computeroutput> or <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: true, if the node belongs to a container, false otherwise. This function can be used to test whether <computeroutput>unordered_set::iterator_to</computeroutput> will return a valid iterator.</para><para><emphasis role="bold">Complexity</emphasis>: Constant </para></description></method>
8124 <method name="unlink"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Removes the node if it's inserted in a container. This function is only allowed if <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
8125 </method-group>
8126 <constructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></constructor>
8127 <constructor><parameter name=""><paramtype>const <classname>unordered_set_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing a copy-constructor makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></constructor>
8128 <copy-assignment><type><classname>unordered_set_base_hook</classname> &amp;</type><parameter name=""><paramtype>const <classname>unordered_set_base_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Empty function. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing an assignment operator makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></copy-assignment>
8129 <destructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>normal_link</computeroutput>, the destructor does nothing (ie. no code is generated). If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>safe_link</computeroutput> and the object is stored in an <classname alt="boost::intrusive::unordered_set">unordered_set</classname> an assertion is raised. If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> and <computeroutput>is_linked()</computeroutput> is true, the node is unlinked.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
8130 </class><struct name="make_unordered_set_member_hook"><template>
8131       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
8132     </template><description><para>Helper metafunction to define a <computeroutput><classname alt="boost::intrusive::unordered_set_member_hook">unordered_set_member_hook</classname></computeroutput> that yields to the same type when the same options (either explicitly or implicitly) are used. </para></description><typedef name="type"><type>implementation_defined</type></typedef>
8133 </struct><class name="unordered_set_member_hook"><template>
8134       <template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
8135     </template><inherit access="public">make_unordered_set_member_hook::type&lt; O1, O2, O3, O4 &gt;</inherit><description><para>Put a public data member <classname alt="boost::intrusive::unordered_set_member_hook">unordered_set_member_hook</classname> in order to store objects of this class in an unordered_set/unordered_multi_set. <classname alt="boost::intrusive::unordered_set_member_hook">unordered_set_member_hook</classname> holds the data necessary for maintaining the unordered_set/unordered_multi_set and provides an appropriate <classname alt="boost::intrusive::value_traits">value_traits</classname> class for unordered_set/unordered_multi_set.</para><para>The hook admits the following options: <computeroutput>void_pointer&lt;&gt;</computeroutput>, <computeroutput>link_mode&lt;&gt;</computeroutput> and <computeroutput>store_hash&lt;&gt;</computeroutput>.</para><para><computeroutput>void_pointer&lt;&gt;</computeroutput> is the pointer type that will be used internally in the hook and the container configured to use this hook.</para><para><computeroutput>link_mode&lt;&gt;</computeroutput> will specify the linking mode of the hook (<computeroutput>normal_link</computeroutput>, <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput>).</para><para><computeroutput>store_hash&lt;&gt;</computeroutput> will tell the hook to store the hash of the value to speed up rehashings. </para></description><method-group name="public member functions">
8136 <method name="swap_nodes"><type>void</type><parameter name="other"><paramtype><classname>unordered_set_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Swapping two nodes swaps the position of the elements related to those nodes in one or two containers. That is, if the node this is part of the element e1, the node x is part of the element e2 and both elements are included in the containers s1 and s2, then after the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 at the position of e1. If one element is not in a container, then after the swap-operation the other element is not in a container. Iterators to e1 and e2 related to those nodes are invalidated.</para><para><emphasis role="bold">Complexity</emphasis>: Constant</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
8137 <method name="is_linked" cv="const"><type>bool</type><description><para><emphasis role="bold">Precondition</emphasis>: <classname alt="boost::intrusive::link_mode">link_mode</classname> must be <computeroutput>safe_link</computeroutput> or <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Returns</emphasis>: true, if the node belongs to a container, false otherwise. This function can be used to test whether <computeroutput>unordered_set::iterator_to</computeroutput> will return a valid iterator.</para><para><emphasis role="bold">Complexity</emphasis>: Constant </para></description></method>
8138 <method name="unlink"><type>void</type><description><para><emphasis role="bold">Effects</emphasis>: Removes the node if it's inserted in a container. This function is only allowed if <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput>.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></method>
8139 </method-group>
8140 <constructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></constructor>
8141 <constructor><parameter name=""><paramtype>const <classname>unordered_set_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> or <computeroutput>safe_link</computeroutput> initializes the node to an unlinked state. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing a copy-constructor makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></constructor>
8142 <copy-assignment><type><classname>unordered_set_member_hook</classname> &amp;</type><parameter name=""><paramtype>const <classname>unordered_set_member_hook</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects</emphasis>: Empty function. The argument is ignored.</para><para><emphasis role="bold">Throws</emphasis>: Nothing.</para><para><emphasis role="bold">Rationale</emphasis>: Providing an assignment operator makes classes using the hook STL-compliant without forcing the user to do some additional work. <computeroutput>swap</computeroutput> can be used to emulate move-semantics. </para></description></copy-assignment>
8143 <destructor><description><para><emphasis role="bold">Effects</emphasis>: If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>normal_link</computeroutput>, the destructor does nothing (ie. no code is generated). If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>safe_link</computeroutput> and the object is stored in an <classname alt="boost::intrusive::unordered_set">unordered_set</classname> an assertion is raised. If <classname alt="boost::intrusive::link_mode">link_mode</classname> is <computeroutput>auto_unlink</computeroutput> and <computeroutput>is_linked()</computeroutput> is true, the node is unlinked.</para><para><emphasis role="bold">Throws</emphasis>: Nothing. </para></description></destructor>
8144 </class>
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196 </namespace>
8197 </namespace>
8198 </header>
8199 </library-reference>