Boost 1.36 version of Boost.MultiIndex

passim: supressed non-ASCII chars in C++ code
bidir_node_iterator.hpp: deleted unused template parameter
bucket_array.hpp: avoided allocator<void> instantiations
hash_index_iterator.hpp: avoided allocator<void> instantiations
hash_index_node.hpp: avoided allocator<void> instantiations, renamed var
ord_index_node.hpp: avoided allocator<void> instantiations
rnd_index_loader.hpp: avoided allocator<void> instantiations
rnd_index_node.hpp: avoided allocator<void> instantiations
rnd_index_ptr_array.hpp: avoided allocator<void> instantiations
rnd_node_iterator.hpp: deleted unused template parameter
seq_index_node.hpp: avoided allocator<void> instantiations
hashed_index.hpp: rewritten modify_ so that elements with unmodified key do not change position
multi_index_container.hpp: added allocator ctor
acknowledgements.html: added acknowledgements for Boost 1.36
compiler_specifics.html: typo
hash_indices.html: documented updating functions behavior wrt unmodified keys, formatting typos
key_extraction.html: formatting typos
multi_index_container.html: added allocator ctor, formatting typos
ord_indices.html: documented updating functions behavior wrt unmodified keys, formatting typos
rnd_indices.html: formatting typos
seq_indices.html: formatting typos
release_notes.html: added release notes for Boost 1.36
hashed.cpp: blocked Boost inspect tool check for ASCII only chars
non_std_allocator.hpp: removed void specialization to verify that no allocator<void> instantiations are generated
test_copy_assignment.cpp: added test for multi_index_container allocator ctor
test_update.cpp: added test for stability of update functions wrt to unmodified keys

[SVN r46770]
This commit is contained in:
Joaquín M López Muñoz 2008-06-27 13:32:24 +00:00
parent 78f6bf5446
commit 15accb2836
161 changed files with 542 additions and 328 deletions

View File

@ -160,6 +160,18 @@ from discussions with Mat&iacute;as Capeletto. Steven Watanabe spotted an
include guard bug present from the first release of the library. include guard bug present from the first release of the library.
</p> </p>
<h2><a name="boost_1_36">Boost 1.36 release</a></h2>
<p>
Thanks to Amit Jain for reporting a problem with allocator management.
Michael Fawcett proposed the addition of an allocator constructor to
<code>multi_index_container</code>.
A report from Zachary Zhou has led to
<a href="release_notes.html#stable_update">enhancing the behavior of
hashed indices update functions</a> so that they meet some intuitive expectations.
Grzegorz Jakacki spotted some internal dead code.
</p>
<hr> <hr>
<div class="prev_link"><a href="release_notes.html"><img src="prev.gif" alt="release notes" border="0"><br> <div class="prev_link"><a href="release_notes.html"><img src="prev.gif" alt="release notes" border="0"><br>
@ -173,9 +185,9 @@ Index
<br> <br>
<p>Revised September 3rd 2007</p> <p>Revised June 25th 2008</p>
<p>&copy; Copyright 2003-2007 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz. <p>&copy; Copyright 2003-2008 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software Distributed under the Boost Software
License, Version 1.0. (See accompanying file <a href="../../../LICENSE_1_0.txt"> License, Version 1.0. (See accompanying file <a href="../../../LICENSE_1_0.txt">
LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt"> LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">

View File

@ -1012,7 +1012,7 @@ Consider a typical instantiation of <code>multi_index_container</code>:
</pre></blockquote> </pre></blockquote>
<p> <p>
Then, for instance, the type <code>employee_set::nth_type&lt;0&gt;::type</code> Then, for instance, the type <code>employee_set::nth_index&lt;0&gt;::type</code>
resolves to the following in GCC: resolves to the following in GCC:
</p> </p>
@ -1075,7 +1075,7 @@ in the final type by encapsulating it into another, shorter-named construct:
<code>employee_set_indices</code> works as a conventional <code>typedef</code> <code>employee_set_indices</code> works as a conventional <code>typedef</code>
in all respects, save for a detail: its name does not explicitly in all respects, save for a detail: its name does not explicitly
include the information contained in the <code>indexed_by</code> instantiation. include the information contained in the <code>indexed_by</code> instantiation.
Applying this technique, <code>employee_set::nth_type&lt;0&gt;::type</code> Applying this technique, <code>employee_set::nth_index&lt;0&gt;::type</code>
now becomes: now becomes:
</p> </p>
@ -1121,7 +1121,7 @@ Performance
<br> <br>
<p>Revised February 7th 2008</p> <p>Revised May 26th 2008</p>
<p>&copy; Copyright 2003-2008 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz. <p>&copy; Copyright 2003-2008 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software Distributed under the Boost Software

View File

@ -452,11 +452,11 @@ objects to which <code>*this</code> and <code>x</code> belong, respectively.<br>
<h4><a name="iterators">Iterators</a></h4> <h4><a name="iterators">Iterators</a></h4>
<code>iterator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iterator_to(const value_type&amp; x);</br> <code>iterator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iterator_to(const value_type&amp; x);<br>
const_iterator iterator_to(const value_type&amp; x)const;</code> const_iterator iterator_to(const value_type&amp; x)const;</code>
<blockquote> <blockquote>
<b>Requires:</b> <code>x</code> is a reference to an element of the container.</br> <b>Requires:</b> <code>x</code> is a reference to an element of the container.<br>
<b>Returns:</b> An iterator to <code>x</code>.<br> <b>Returns:</b> An iterator to <code>x</code>.<br>
<b>Complexity:</b> Constant.<br> <b>Complexity:</b> Constant.<br>
<b>Exception safety:</b> <code>nothrow</code>.<br> <b>Exception safety:</b> <code>nothrow</code>.<br>
@ -487,7 +487,7 @@ one element can be causing insertion not to be allowed.<br>
<code>iterator insert(iterator position,const value_type&amp; x);</code> <code>iterator insert(iterator position,const value_type&amp; x);</code>
<blockquote> <blockquote>
<b>Requires:</b> <code>position</code> is a valid iterator of the index.</br> <b>Requires:</b> <code>position</code> is a valid iterator of the index.<br>
<b>Effects:</b> Inserts <code>x</code> into the <code>multi_index_container</code> to which <b>Effects:</b> Inserts <code>x</code> into the <code>multi_index_container</code> to which
the index belongs if the index belongs if
<ul> <ul>
@ -516,7 +516,7 @@ void insert(InputIterator first,InputIterator last);</code>
<code>value_type</code> or a type convertible to <code>value_type</code>. <code>value_type</code> or a type convertible to <code>value_type</code>.
<code>first</code> and <code>last</code> are not iterators into any <code>first</code> and <code>last</code> are not iterators into any
index of the <code>multi_index_container</code> to which this index belongs. index of the <code>multi_index_container</code> to which this index belongs.
<code>last</code> is reachable from <code>first</code>.</br> <code>last</code> is reachable from <code>first</code>.<br>
<b>Effects:</b> <b>Effects:</b>
<blockquote><pre> <blockquote><pre>
<span class=identifier>iterator</span> <span class=identifier>hint</span><span class=special>=</span><span class=identifier>end</span><span class=special>();</span> <span class=identifier>iterator</span> <span class=identifier>hint</span><span class=special>=</span><span class=identifier>end</span><span class=special>();</span>
@ -532,7 +532,7 @@ index of the <code>multi_index_container</code> to which this index belongs.
<blockquote> <blockquote>
<b>Requires:</b> <code>position</code> is a valid dereferenceable iterator <b>Requires:</b> <code>position</code> is a valid dereferenceable iterator
of the index.</br> of the index.<br>
<b>Effects:</b> Deletes the element pointed to by <code>position</code>.<br> <b>Effects:</b> Deletes the element pointed to by <code>position</code>.<br>
<b>Returns:</b> An iterator pointing to the element immediately following <b>Returns:</b> An iterator pointing to the element immediately following
the one that was deleted, or <code>end()</code> the one that was deleted, or <code>end()</code>
@ -568,7 +568,7 @@ the number of elements in [<code>first</code>,<code>last</code>).<br>
<blockquote> <blockquote>
<b>Requires:</b> <code>position</code> is a valid dereferenceable iterator <b>Requires:</b> <code>position</code> is a valid dereferenceable iterator
of the index.</br> of the index.<br>
<b>Effects:</b> Assigns the value <code>x</code> to the element pointed <b>Effects:</b> Assigns the value <code>x</code> to the element pointed
to by <code>position</code> into the <code>multi_index_container</code> to which to by <code>position</code> into the <code>multi_index_container</code> to which
the index belongs if, for the value <code>x</code> the index belongs if, for the value <code>x</code>
@ -579,7 +579,8 @@ the index belongs if, for the value <code>x</code>
<code>multi_index_container</code>.</li> <code>multi_index_container</code>.</li>
</ul> </ul>
<b>Postconditions:</b> Validity of <code>position</code> is preserved <b>Postconditions:</b> Validity of <code>position</code> is preserved
in all cases.<br> in all cases. If the key of the new value is equivalent to that of the replaced value,
the position of the element does not change.<br>
<b>Returns:</b> <code>true</code> if the replacement took place, <b>Returns:</b> <code>true</code> if the replacement took place,
<code>false</code> otherwise.<br> <code>false</code> otherwise.<br>
<b>Complexity:</b> <code>O(R(n))</code>.<br> <b>Complexity:</b> <code>O(R(n))</code>.<br>
@ -596,7 +597,7 @@ belongs remains in its original state.
<a href="http://www.sgi.com/tech/stl/UnaryFunction.html"> <a href="http://www.sgi.com/tech/stl/UnaryFunction.html">
<code>Unary Function</code></a> accepting arguments of type <code>Unary Function</code></a> accepting arguments of type
<code>value_type&amp;</code>. <code>position</code> is a valid dereferenceable <code>value_type&amp;</code>. <code>position</code> is a valid dereferenceable
iterator of the index.</br> iterator of the index.<br>
<b>Effects:</b> Calls <code>mod(e)</code> where <code>e</code> is the element <b>Effects:</b> Calls <code>mod(e)</code> where <code>e</code> is the element
pointed to by <code>position</code> and rearranges <code>*position</code> into pointed to by <code>position</code> and rearranges <code>*position</code> into
all the indices of the <code>multi_index_container</code>. Rearrangement is successful if all the indices of the <code>multi_index_container</code>. Rearrangement is successful if
@ -608,7 +609,8 @@ all the indices of the <code>multi_index_container</code>. Rearrangement is succ
</ul> </ul>
If the rearrangement fails, the element is erased.<br> If the rearrangement fails, the element is erased.<br>
<b>Postconditions:</b> Validity of <code>position</code> is preserved if the <b>Postconditions:</b> Validity of <code>position</code> is preserved if the
operation succeeds.<br> operation succeeds. If the key of the modified value is equivalent to that of the original
value, the position of the element does not change.<br>
<b>Returns:</b> <code>true</code> if the operation succeeded, <code>false</code> <b>Returns:</b> <code>true</code> if the operation succeeded, <code>false</code>
otherwise.<br> otherwise.<br>
<b>Complexity:</b> <code>O(M(n))</code>.<br> <b>Complexity:</b> <code>O(M(n))</code>.<br>
@ -628,7 +630,7 @@ bool modify(iterator position,Modifier mod,Rollback back);</code>
iterator of the index. The sequence of operations <code>mod(e)</code>, iterator of the index. The sequence of operations <code>mod(e)</code>,
<code>back(e)</code>, where <code>e</code> is the element <code>back(e)</code>, where <code>e</code> is the element
pointed to by <code>position</code>, restores all keys of the element pointed to by <code>position</code>, restores all keys of the element
to their original state.</br> to their original state.<br>
<b>Effects:</b> Calls <code>mod(e)</code> where <code>e</code> is the element <b>Effects:</b> Calls <code>mod(e)</code> where <code>e</code> is the element
pointed to by <code>position</code> and tries to rearrange <code>*position</code> into pointed to by <code>position</code> and tries to rearrange <code>*position</code> into
all the indices of the <code>multi_index_container</code>. Rearrangement is successful if all the indices of the <code>multi_index_container</code>. Rearrangement is successful if
@ -641,7 +643,8 @@ all the indices of the <code>multi_index_container</code>. Rearrangement is succ
If the rearrangement fails, <code>back(e)</code> is invoked and the If the rearrangement fails, <code>back(e)</code> is invoked and the
element is kept at its original position in all indices.<br> element is kept at its original position in all indices.<br>
<b>Postconditions:</b> Validity of <code>position</code> is preserved except if <b>Postconditions:</b> Validity of <code>position</code> is preserved except if
the element is erased under the conditions described below.<br> the element is erased under the conditions described below. If the key of the modified value
is equivalent to that of the original value, the position of the element does not change.<br>
<b>Returns:</b> <code>true</code> if the operation succeeded, <code>false</code> <b>Returns:</b> <code>true</code> if the operation succeeded, <code>false</code>
otherwise.<br> otherwise.<br>
<b>Complexity:</b> <code>O(M(n))</code>.<br> <b>Complexity:</b> <code>O(M(n))</code>.<br>
@ -662,7 +665,7 @@ from <code>value_type</code>. <code>Modifier</code> is a model of
<a href="http://www.sgi.com/tech/stl/UnaryFunction.html"> <a href="http://www.sgi.com/tech/stl/UnaryFunction.html">
<code>Unary Function</code></a> accepting arguments of type <code>Unary Function</code></a> accepting arguments of type
<code>key_type&amp;</code>. <code>position</code> is a valid dereferenceable <code>key_type&amp;</code>. <code>position</code> is a valid dereferenceable
iterator of the index.</br> iterator of the index.<br>
<b>Effects:</b> Equivalent to <code>modify(position,mod')</code>, <b>Effects:</b> Equivalent to <code>modify(position,mod')</code>,
with <code>mod'</code> defined in such a way that with <code>mod'</code> defined in such a way that
<code>mod'(x)</code> is the same as <code>mod(key(x))</code>, where <code>mod'(x)</code> is the same as <code>mod(key(x))</code>, where
@ -682,7 +685,7 @@ are models of <a href="http://www.sgi.com/tech/stl/UnaryFunction.html">
iterator of the index. iterator of the index.
The sequence of operations <code>mod(k)</code>, The sequence of operations <code>mod(k)</code>,
<code>back(k)</code>, where <code>k</code> is the key of the element <code>back(k)</code>, where <code>k</code> is the key of the element
pointed to by <code>position</code>, restores k to its original state.</br> pointed to by <code>position</code>, restores k to its original state.<br>
<b>Effects:</b> Equivalent to <code>modify(position,mod',back')</code>, <b>Effects:</b> Equivalent to <code>modify(position,mod',back')</code>,
with <code>mod'</code> and <code>back</code> defined in such a way that with <code>mod'</code> and <code>back</code> defined in such a way that
<code>mod'(x)</code> is the same as <code>mod(key(x))</code> and <code>mod'(x)</code> is the same as <code>mod(key(x))</code> and
@ -774,7 +777,7 @@ In the context of a compatible extension or a compatible key, the expression
<blockquote> <blockquote>
<b>Requires:</b> <code>CompatibleKey</code> is a compatible key of <b>Requires:</b> <code>CompatibleKey</code> is a compatible key of
(<code>hasher</code>, <code>key_equal</code>).</br> (<code>hasher</code>, <code>key_equal</code>).<br>
<b>Effects:</b> Returns a pointer to an element whose key is equivalent to <b>Effects:</b> Returns a pointer to an element whose key is equivalent to
<code>x</code>, or <code>end()</code> if such an element does not exist.<br> <code>x</code>, or <code>end()</code> if such an element does not exist.<br>
<b>Complexity:</b> Average case <code>O(1)</code> (constant), worst case <b>Complexity:</b> Average case <code>O(1)</code> (constant), worst case
@ -792,7 +795,7 @@ iterator find(<br>
<blockquote> <blockquote>
<b>Requires:</b> (<code>CompatibleKey</code>, <code>CompatibleHash</code>, <b>Requires:</b> (<code>CompatibleKey</code>, <code>CompatibleHash</code>,
<code>CompatiblePred</code>) is a compatible extension of <code>CompatiblePred</code>) is a compatible extension of
(<code>hasher</code>, <code>key_equal</code>).</br> (<code>hasher</code>, <code>key_equal</code>).<br>
<b>Effects:</b> Returns a pointer to an element whose key is equivalent to <b>Effects:</b> Returns a pointer to an element whose key is equivalent to
<code>x</code>, or <code>end()</code> if such an element does not exist.<br> <code>x</code>, or <code>end()</code> if such an element does not exist.<br>
<b>Complexity:</b> Average case <code>O(1)</code> (constant), worst case <b>Complexity:</b> Average case <code>O(1)</code> (constant), worst case
@ -805,7 +808,7 @@ size_type count(const CompatibleKey&amp; x)const;
<blockquote> <blockquote>
<b>Requires:</b> <code>CompatibleKey</code> is a compatible key of <b>Requires:</b> <code>CompatibleKey</code> is a compatible key of
(<code>hasher</code>, <code>key_equal</code>).</br> (<code>hasher</code>, <code>key_equal</code>).<br>
<b>Effects:</b> Returns the number of elements with key equivalent to <code>x</code>.<br> <b>Effects:</b> Returns the number of elements with key equivalent to <code>x</code>.<br>
<b>Complexity:</b> Average case <code>O(count(x))</code>, worst case <b>Complexity:</b> Average case <code>O(count(x))</code>, worst case
<code>O(n)</code>.<br> <code>O(n)</code>.<br>
@ -822,7 +825,7 @@ size_type count(<br>
<blockquote> <blockquote>
<b>Requires:</b> (<code>CompatibleKey</code>, <code>CompatibleHash</code>, <b>Requires:</b> (<code>CompatibleKey</code>, <code>CompatibleHash</code>,
<code>CompatiblePred</code>) is a compatible extension of <code>CompatiblePred</code>) is a compatible extension of
(<code>hasher</code>, <code>key_equal</code>).</br> (<code>hasher</code>, <code>key_equal</code>).<br>
<b>Effects:</b> Returns the number of elements with key equivalent to <code>x</code>.<br> <b>Effects:</b> Returns the number of elements with key equivalent to <code>x</code>.<br>
<b>Complexity:</b> Average case <code>O(count(x,hash,eq))</code>, worst case <b>Complexity:</b> Average case <code>O(count(x,hash,eq))</code>, worst case
<code>O(n)</code>.<br> <code>O(n)</code>.<br>
@ -834,7 +837,7 @@ std::pair&lt;iterator,iterator> equal_range(const CompatibleKey&amp; x)const;
<blockquote> <blockquote>
<b>Requires:</b> <code>CompatibleKey</code> is a compatible key of <b>Requires:</b> <code>CompatibleKey</code> is a compatible key of
(<code>hasher</code>, <code>key_equal</code>).</br> (<code>hasher</code>, <code>key_equal</code>).<br>
<b>Effects:</b> Returns a range containing all elements with keys equivalent <b>Effects:</b> Returns a range containing all elements with keys equivalent
to <code>x</code> (and only those), or (<code>end()</code>,<code>end()</code>) to <code>x</code> (and only those), or (<code>end()</code>,<code>end()</code>)
if no such elements exist.<br> if no such elements exist.<br>
@ -845,7 +848,7 @@ if no such elements exist.<br>
<code>template&lt;<br> <code>template&lt;<br>
&nbsp;&nbsp;typename CompatibleKey,typename CompatibleHash, typename CompatiblePred<br> &nbsp;&nbsp;typename CompatibleKey,typename CompatibleHash, typename CompatiblePred<br>
&gt;<br> &gt;<br>
std::pair&lt;iterator,iterator> equal_range(</br> std::pair&lt;iterator,iterator> equal_range(<br>
&nbsp;&nbsp;const CompatibleKey&amp; x,<br> &nbsp;&nbsp;const CompatibleKey&amp; x,<br>
&nbsp;&nbsp;const CompatibleHash&amp; hash,const CompatiblePred&amp; eq)const; &nbsp;&nbsp;const CompatibleHash&amp; hash,const CompatiblePred&amp; eq)const;
</code> </code>
@ -853,7 +856,7 @@ std::pair&lt;iterator,iterator> equal_range(</br>
<blockquote> <blockquote>
<b>Requires:</b> (<code>CompatibleKey</code>, <code>CompatibleHash</code>, <b>Requires:</b> (<code>CompatibleKey</code>, <code>CompatibleHash</code>,
<code>CompatiblePred</code>) is a compatible extension of <code>CompatiblePred</code>) is a compatible extension of
(<code>hasher</code>, <code>key_equal</code>).</br> (<code>hasher</code>, <code>key_equal</code>).<br>
<b>Effects:</b> Returns a range containing all elements with keys equivalent <b>Effects:</b> Returns a range containing all elements with keys equivalent
to <code>x</code> (and only those), or (<code>end()</code>,<code>end()</code>) to <code>x</code> (and only those), or (<code>end()</code>,<code>end()</code>)
if no such elements exist.<br> if no such elements exist.<br>
@ -863,11 +866,11 @@ if no such elements exist.<br>
<h4><a name="bucket_interface">Bucket interface</a></h4> <h4><a name="bucket_interface">Bucket interface</a></h4>
<code>local_iterator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local_iterator_to(const value_type&amp; x);</br> <code>local_iterator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local_iterator_to(const value_type&amp; x);<br>
const_local_iterator local_iterator_to(const value_type&amp; x)const;</code> const_local_iterator local_iterator_to(const value_type&amp; x)const;</code>
<blockquote> <blockquote>
<b>Requires:</b> <code>x</code> is a reference to an element of the container.</br> <b>Requires:</b> <code>x</code> is a reference to an element of the container.<br>
<b>Returns:</b> An iterator to <code>x</code>.<br> <b>Returns:</b> An iterator to <code>x</code>.<br>
<b>Complexity:</b> Constant.<br> <b>Complexity:</b> Constant.<br>
<b>Exception safety:</b> <code>nothrow</code>.<br> <b>Exception safety:</b> <code>nothrow</code>.<br>
@ -977,9 +980,9 @@ Sequenced indices
<br> <br>
<p>Revised July 2nd 2007</p> <p>Revised June 25th 2008</p>
<p>&copy; Copyright 2003-2007 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz. <p>&copy; Copyright 2003-2008 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software Distributed under the Boost Software
License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt"> License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt">
LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt"> LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">

View File

@ -1228,7 +1228,7 @@ bool operator==(<br>
<blockquote> <blockquote>
<b>Requires:</b> <code>length(x)==length(y)</code>. The expression <b>Requires:</b> <code>length(x)==length(y)</code>. The expression
<code>x<sub>i</sub>==y<sub>i</sub></code> is valid for all <code>i</code> <code>x<sub>i</sub>==y<sub>i</sub></code> is valid for all <code>i</code>
in <code>[0,length(x))</code>.</br> in <code>[0,length(x))</code>.<br>
<b>Returns:</b> <code>true</code> if and only if <b>Returns:</b> <code>true</code> if and only if
<blockquote> <blockquote>
<code>x<sub>i</sub>==y<sub>i</sub></code> for all <code>i</code> <code>x<sub>i</sub>==y<sub>i</sub></code> for all <code>i</code>
@ -1258,7 +1258,7 @@ bool operator<(<br>
<b>Requires:</b> The expressions <b>Requires:</b> The expressions
<code>x<sub>i</sub>&lt;y<sub>i</sub></code> and <code>x<sub>i</sub>&lt;y<sub>i</sub></code> and
<code>y<sub>i</sub>&lt;x<sub>i</sub></code> are valid for all <code>i</code> <code>y<sub>i</sub>&lt;x<sub>i</sub></code> are valid for all <code>i</code>
in <code>[0,min(length(x),length(y)))</code>.</br> in <code>[0,min(length(x),length(y)))</code>.<br>
<b>Returns:</b> <code>true</code> if and only if there exists some <b>Returns:</b> <code>true</code> if and only if there exists some
<code>j</code> in the range <code>[0,min(length(x),length(y)))</code> <code>j</code> in the range <code>[0,min(length(x),length(y)))</code>
such that such that
@ -1294,7 +1294,7 @@ bool operator <b><i>OP</i></b>(<br>
<blockquote> <blockquote>
<b>Requires:</b> The expressions given below are valid (for the particular <b>Requires:</b> The expressions given below are valid (for the particular
<code><b><i>OP</i></b></code> considered.)</br> <code><b><i>OP</i></b></code> considered.)<br>
<b>Returns:</b> <code>true</code> if and only if <b>Returns:</b> <code>true</code> if and only if
<blockquote> <blockquote>
<code>!(x==y)</code> (<code><b><i>OP</i></b></code> is <code>!=</code>),<br> <code>!(x==y)</code> (<code><b><i>OP</i></b></code> is <code>!=</code>),<br>
@ -1435,7 +1435,7 @@ bool operator()(<br>
<b>Requires:</b> <code>length(x)==length(y)</code>. The expressions <b>Requires:</b> <code>length(x)==length(y)</code>. The expressions
<code>key_eqs().get&lt;i>()(x<sub>i</sub>,y<sub>i</sub>)</code> and <code>key_eqs().get&lt;i>()(x<sub>i</sub>,y<sub>i</sub>)</code> and
<code>key_eqs().get&lt;i>()(y<sub>i</sub>,x<sub>i</sub>)</code> <code>key_eqs().get&lt;i>()(y<sub>i</sub>,x<sub>i</sub>)</code>
are valid for all <code>i</code> in <code>[0,length(x))</code>.</br> are valid for all <code>i</code> in <code>[0,length(x))</code>.<br>
<b>Returns:</b> <code>true</code> if and only <b>Returns:</b> <code>true</code> if and only
<blockquote> <blockquote>
<code>key_eqs().get&lt;i>()(x<sub>i</sub>,y<sub>i</sub>)</code> <code>key_eqs().get&lt;i>()(x<sub>i</sub>,y<sub>i</sub>)</code>
@ -1683,7 +1683,7 @@ bool operator()(<br>
<code>key_comps().get&lt;i>()(x<sub>i</sub>,y<sub>i</sub>)</code> and <code>key_comps().get&lt;i>()(x<sub>i</sub>,y<sub>i</sub>)</code> and
<code>key_comps().get&lt;i>()(y<sub>i</sub>,x<sub>i</sub>)</code> <code>key_comps().get&lt;i>()(y<sub>i</sub>,x<sub>i</sub>)</code>
are valid for all <code>i</code> are valid for all <code>i</code>
in <code>[0,min(length(x),length(y)))</code>.</br> in <code>[0,min(length(x),length(y)))</code>.<br>
<b>Returns:</b> <code>true</code> if and only if there exists some <b>Returns:</b> <code>true</code> if and only if there exists some
<code>j</code> in the range <code>[0,min(length(x),length(y)))</code> <code>j</code> in the range <code>[0,min(length(x),length(y)))</code>
such that such that
@ -2263,9 +2263,9 @@ Compiler specifics
<br> <br>
<p>Revised August 2nd 2007</p> <p>Revised June 25th 2008</p>
<p>&copy; Copyright 2003-2007 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz. <p>&copy; Copyright 2003-2008 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software Distributed under the Boost Software
License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt"> License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt">
LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt"> LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">

View File

@ -278,6 +278,7 @@ operators and functions associated with the index (vg. comparison and
<span class=keyword>explicit</span> <span class=identifier>multi_index_container</span><span class=special>( <span class=keyword>explicit</span> <span class=identifier>multi_index_container</span><span class=special>(
</span><span class=keyword>const</span> <span class=identifier>ctor_args_list</span><span class=special>&amp;</span> <span class=identifier>args_list</span><span class=special>=</span><span class=identifier>ctor_args_list</span><span class=special>(), </span><span class=keyword>const</span> <span class=identifier>ctor_args_list</span><span class=special>&amp;</span> <span class=identifier>args_list</span><span class=special>=</span><span class=identifier>ctor_args_list</span><span class=special>(),
</span><span class=keyword>const</span> <span class=identifier>allocator_type</span><span class=special>&amp;</span> <span class=identifier>al</span><span class=special>=</span><span class=identifier>allocator_type</span><span class=special>());</span> </span><span class=keyword>const</span> <span class=identifier>allocator_type</span><span class=special>&amp;</span> <span class=identifier>al</span><span class=special>=</span><span class=identifier>allocator_type</span><span class=special>());</span>
<span class=keyword>explicit</span> <span class=identifier>multi_index_container</span><span class=special>(</span><span class=keyword>const</span> <span class=identifier>allocator_type</span><span class=special>&amp;</span> <span class=identifier>al</span><span class=special>);</span>
<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>InputIterator</span><span class=special>&gt;</span> <span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>InputIterator</span><span class=special>&gt;</span>
<span class=identifier>multi_index_container</span><span class=special>(</span> <span class=identifier>multi_index_container</span><span class=special>(</span>
<span class=identifier>InputIterator</span> <span class=identifier>first</span><span class=special>,</span><span class=identifier>InputIterator</span> <span class=identifier>last</span><span class=special>,</span> <span class=identifier>InputIterator</span> <span class=identifier>first</span><span class=special>,</span><span class=identifier>InputIterator</span> <span class=identifier>last</span><span class=special>,</span>
@ -609,7 +610,7 @@ the same order as they were specified.<br>
<blockquote> <blockquote>
<code>index&lt;Tag>::type</code> yields the type of the index which <code>index&lt;Tag>::type</code> yields the type of the index which
has <code>Tag</code> as an associated <a href="indices.html#tags">tag type</a>.</br> has <code>Tag</code> as an associated <a href="indices.html#tags">tag type</a>.<br>
<b>Requires:</b> Some index of the <code>multi_index_container</code> has <code>Tag</code> <b>Requires:</b> Some index of the <code>multi_index_container</code> has <code>Tag</code>
as an associated tag type. as an associated tag type.
</blockquote> </blockquote>
@ -645,7 +646,7 @@ as an associated tag type.
<h4><a name="constructors">Constructors, copy and assignment</a></h4> <h4><a name="constructors">Constructors, copy and assignment</a></h4>
<code>explicit multi_index_container(<br> <code>explicit multi_index_container(<br>
&nbsp;&nbsp;const ctor_args_list&amp; comp=ctor_args_list(),<br> &nbsp;&nbsp;const ctor_args_list&amp; args_list=ctor_args_list(),<br>
&nbsp;&nbsp;const allocator_type&amp; al=allocator_type());</code> &nbsp;&nbsp;const allocator_type&amp; al=allocator_type());</code>
<blockquote> <blockquote>
@ -654,6 +655,14 @@ specified argument list and allocator.<br>
<b>Complexity:</b> Constant. <b>Complexity:</b> Constant.
</blockquote> </blockquote>
<code>explicit multi_index_container(const allocator_type&amp; al);</code>
<blockquote>
<b>Effects:</b> Constructs an empty <code>multi_index_container</code> using the
specified allocator and the default value of <code>ctor_args_list</code>.<br>
<b>Complexity:</b> Constant.
</blockquote>
<code>template&lt;typename InputIterator><br> <code>template&lt;typename InputIterator><br>
multi_index_container(<br> multi_index_container(<br>
&nbsp;&nbsp;InputIterator first,InputIterator last,<br> &nbsp;&nbsp;InputIterator first,InputIterator last,<br>
@ -665,7 +674,7 @@ multi_index_container(<br>
<a href="http://www.sgi.com/tech/stl/InputIterator.html"> <a href="http://www.sgi.com/tech/stl/InputIterator.html">
<code>Input Iterator</code></a> over elements of type <code>Input Iterator</code></a> over elements of type
<code>Value</code> or a type convertible to <code>Value</code>. <code>Value</code> or a type convertible to <code>Value</code>.
<code>last</code> is reachable from <code>first</code>.</br> <code>last</code> is reachable from <code>first</code>.<br>
<b>Effects:</b> Constructs and empty <code>multi_index_container</code> using the <b>Effects:</b> Constructs and empty <code>multi_index_container</code> using the
specified argument list and allocator and fills it with specified argument list and allocator and fills it with
the elements in the range [<code>first</code>,<code>last</code>). the elements in the range [<code>first</code>,<code>last</code>).
@ -902,9 +911,9 @@ Index reference
<br> <br>
<p>Revised July 17th 2007</p> <p>Revised June 25th 2008</p>
<p>&copy; Copyright 2003-2007 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz. <p>&copy; Copyright 2003-2008 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software Distributed under the Boost Software
License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt"> License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt">
LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt"> LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">

View File

@ -462,11 +462,11 @@ objects to which <code>*this</code> and <code>x</code> belong, respectively.<br>
<h4><a name="iterators">Iterators</a></h4> <h4><a name="iterators">Iterators</a></h4>
<code>iterator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iterator_to(const value_type&amp; x);</br> <code>iterator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iterator_to(const value_type&amp; x);<br>
const_iterator iterator_to(const value_type&amp; x)const;</code> const_iterator iterator_to(const value_type&amp; x)const;</code>
<blockquote> <blockquote>
<b>Requires:</b> <code>x</code> is a reference to an element of the container.</br> <b>Requires:</b> <code>x</code> is a reference to an element of the container.<br>
<b>Returns:</b> An iterator to <code>x</code>.<br> <b>Returns:</b> An iterator to <code>x</code>.<br>
<b>Complexity:</b> Constant.<br> <b>Complexity:</b> Constant.<br>
<b>Exception safety:</b> <code>nothrow</code>.<br> <b>Exception safety:</b> <code>nothrow</code>.<br>
@ -497,7 +497,7 @@ one element can be causing insertion not to be allowed.<br>
<code>iterator insert(iterator position,const value_type&amp; x);</code> <code>iterator insert(iterator position,const value_type&amp; x);</code>
<blockquote> <blockquote>
<b>Requires:</b> <code>position</code> is a valid iterator of the index.</br> <b>Requires:</b> <code>position</code> is a valid iterator of the index.<br>
<b>Effects:</b> Inserts <code>x</code> into the <code>multi_index_container</code> to which <b>Effects:</b> Inserts <code>x</code> into the <code>multi_index_container</code> to which
the index belongs if the index belongs if
<ul> <ul>
@ -526,7 +526,7 @@ void insert(InputIterator first,InputIterator last);</code>
<code>value_type</code> or a type convertible to <code>value_type</code>. <code>value_type</code> or a type convertible to <code>value_type</code>.
<code>first</code> and <code>last</code> are not iterators into any <code>first</code> and <code>last</code> are not iterators into any
index of the <code>multi_index_container</code> to which this index belongs. index of the <code>multi_index_container</code> to which this index belongs.
<code>last</code> is reachable from <code>first</code>.</br> <code>last</code> is reachable from <code>first</code>.<br>
<b>Effects:</b> <b>Effects:</b>
<blockquote><pre> <blockquote><pre>
<span class=identifier>iterator</span> <span class=identifier>hint</span><span class=special>=</span><span class=identifier>end</span><span class=special>();</span> <span class=identifier>iterator</span> <span class=identifier>hint</span><span class=special>=</span><span class=identifier>end</span><span class=special>();</span>
@ -542,7 +542,7 @@ index of the <code>multi_index_container</code> to which this index belongs.
<blockquote> <blockquote>
<b>Requires:</b> <code>position</code> is a valid dereferenceable iterator <b>Requires:</b> <code>position</code> is a valid dereferenceable iterator
of the index.</br> of the index.<br>
<b>Effects:</b> Deletes the element pointed to by <code>position</code>.<br> <b>Effects:</b> Deletes the element pointed to by <code>position</code>.<br>
<b>Returns:</b> An iterator pointing to the element immediately following <b>Returns:</b> An iterator pointing to the element immediately following
the one that was deleted, or <code>end()</code> the one that was deleted, or <code>end()</code>
@ -577,7 +577,7 @@ the number of elements in [<code>first</code>,<code>last</code>).<br>
<blockquote> <blockquote>
<b>Requires:</b> <code>position</code> is a valid dereferenceable iterator <b>Requires:</b> <code>position</code> is a valid dereferenceable iterator
of the index.</br> of the index.<br>
<b>Effects:</b> Assigns the value <code>x</code> to the element pointed <b>Effects:</b> Assigns the value <code>x</code> to the element pointed
to by <code>position</code> into the <code>multi_index_container</code> to which to by <code>position</code> into the <code>multi_index_container</code> to which
the index belongs if, for the value <code>x</code> the index belongs if, for the value <code>x</code>
@ -588,7 +588,8 @@ the index belongs if, for the value <code>x</code>
<code>multi_index_container</code>.</li> <code>multi_index_container</code>.</li>
</ul> </ul>
<b>Postconditions:</b> Validity of <code>position</code> is preserved <b>Postconditions:</b> Validity of <code>position</code> is preserved
in all cases.<br> in all cases. If the key of the new value is equivalent to that of the
replaced value, the position of the element does not change.<br>
<b>Returns:</b> <code>true</code> if the replacement took place, <b>Returns:</b> <code>true</code> if the replacement took place,
<code>false</code> otherwise.<br> <code>false</code> otherwise.<br>
<b>Complexity:</b> <code>O(R(n))</code>.<br> <b>Complexity:</b> <code>O(R(n))</code>.<br>
@ -605,7 +606,7 @@ belongs remains in its original state.
<a href="http://www.sgi.com/tech/stl/UnaryFunction.html"> <a href="http://www.sgi.com/tech/stl/UnaryFunction.html">
<code>Unary Function</code></a> accepting arguments of type <code>Unary Function</code></a> accepting arguments of type
<code>value_type&amp;</code>. <code>position</code> is a valid dereferenceable <code>value_type&amp;</code>. <code>position</code> is a valid dereferenceable
iterator of the index.</br> iterator of the index.<br>
<b>Effects:</b> Calls <code>mod(e)</code> where <code>e</code> is the element <b>Effects:</b> Calls <code>mod(e)</code> where <code>e</code> is the element
pointed to by <code>position</code> and rearranges <code>*position</code> into pointed to by <code>position</code> and rearranges <code>*position</code> into
all the indices of the <code>multi_index_container</code>. Rearrangement is successful if all the indices of the <code>multi_index_container</code>. Rearrangement is successful if
@ -617,7 +618,8 @@ all the indices of the <code>multi_index_container</code>. Rearrangement is succ
</ul> </ul>
If the rearrangement fails, the element is erased.<br> If the rearrangement fails, the element is erased.<br>
<b>Postconditions:</b> Validity of <code>position</code> is preserved if the <b>Postconditions:</b> Validity of <code>position</code> is preserved if the
operation succeeds.<br> operation succeeds. If the key of the modified value is equivalent to that of the
original value, the position of the element does not change.<br>
<b>Returns:</b> <code>true</code> if the operation succeeded, <code>false</code> <b>Returns:</b> <code>true</code> if the operation succeeded, <code>false</code>
otherwise.<br> otherwise.<br>
<b>Complexity:</b> <code>O(M(n))</code>.<br> <b>Complexity:</b> <code>O(M(n))</code>.<br>
@ -637,7 +639,7 @@ bool modify(iterator position,Modifier mod,Rollback back);</code>
iterator of the index. The sequence of operations <code>mod(e)</code>, iterator of the index. The sequence of operations <code>mod(e)</code>,
<code>back(e)</code>, where <code>e</code> is the element <code>back(e)</code>, where <code>e</code> is the element
pointed to by <code>position</code>, restores all keys of the element pointed to by <code>position</code>, restores all keys of the element
to their original state.</br> to their original state.<br>
<b>Effects:</b> Calls <code>mod(e)</code> where <code>e</code> is the element <b>Effects:</b> Calls <code>mod(e)</code> where <code>e</code> is the element
pointed to by <code>position</code> and tries to rearrange <code>*position</code> into pointed to by <code>position</code> and tries to rearrange <code>*position</code> into
all the indices of the <code>multi_index_container</code>. Rearrangement is successful if all the indices of the <code>multi_index_container</code>. Rearrangement is successful if
@ -650,7 +652,9 @@ all the indices of the <code>multi_index_container</code>. Rearrangement is succ
If the rearrangement fails, <code>back(e)</code> is invoked and the If the rearrangement fails, <code>back(e)</code> is invoked and the
element is kept at its original position in all indices.<br> element is kept at its original position in all indices.<br>
<b>Postconditions:</b> Validity of <code>position</code> is preserved except if <b>Postconditions:</b> Validity of <code>position</code> is preserved except if
the element is erased under the conditions described below.<br> the element is erased under the conditions described below.
If the key of the modified value is equivalent to that of the
original value, the position of the element does not change.<br>
<b>Returns:</b> <code>true</code> if the operation succeeded, <code>false</code> <b>Returns:</b> <code>true</code> if the operation succeeded, <code>false</code>
otherwise.<br> otherwise.<br>
<b>Complexity:</b> <code>O(M(n))</code>.<br> <b>Complexity:</b> <code>O(M(n))</code>.<br>
@ -671,7 +675,7 @@ from <code>value_type</code>. <code>Modifier</code> is a model of
<a href="http://www.sgi.com/tech/stl/UnaryFunction.html"> <a href="http://www.sgi.com/tech/stl/UnaryFunction.html">
<code>Unary Function</code></a> accepting arguments of type <code>Unary Function</code></a> accepting arguments of type
<code>key_type&amp;</code>. <code>position</code> is a valid dereferenceable <code>key_type&amp;</code>. <code>position</code> is a valid dereferenceable
iterator of the index.</br> iterator of the index.<br>
<b>Effects:</b> Equivalent to <code>modify(position,mod')</code>, <b>Effects:</b> Equivalent to <code>modify(position,mod')</code>,
with <code>mod'</code> defined in such a way that with <code>mod'</code> defined in such a way that
<code>mod'(x)</code> is the same as <code>mod(key(x))</code>, where <code>mod'(x)</code> is the same as <code>mod(key(x))</code>, where
@ -691,7 +695,7 @@ are models of <a href="http://www.sgi.com/tech/stl/UnaryFunction.html">
iterator of the index. iterator of the index.
The sequence of operations <code>mod(k)</code>, The sequence of operations <code>mod(k)</code>,
<code>back(k)</code>, where <code>k</code> is the key of the element <code>back(k)</code>, where <code>k</code> is the key of the element
pointed to by <code>position</code>, restores k to its original state.</br> pointed to by <code>position</code>, restores k to its original state.<br>
<b>Effects:</b> Equivalent to <code>modify(position,mod',back')</code>, <b>Effects:</b> Equivalent to <code>modify(position,mod',back')</code>,
with <code>mod'</code> and <code>back</code> defined in such a way that with <code>mod'</code> and <code>back</code> defined in such a way that
<code>mod'(x)</code> is the same as <code>mod(key(x))</code> and <code>mod'(x)</code> is the same as <code>mod(key(x))</code> and
@ -779,7 +783,7 @@ interpretations.
<blockquote> <blockquote>
<b>Requires:</b> <code>CompatibleKey</code> is a compatible key of <b>Requires:</b> <code>CompatibleKey</code> is a compatible key of
<code>key_compare</code>.</br> <code>key_compare</code>.<br>
<b>Effects:</b> Returns a pointer to an element whose key is equivalent to <b>Effects:</b> Returns a pointer to an element whose key is equivalent to
<code>x</code>, or <code>end()</code> if such an element does not exist.<br> <code>x</code>, or <code>end()</code> if such an element does not exist.<br>
<b>Complexity:</b> <code>O(log(n))</code>.<br> <b>Complexity:</b> <code>O(log(n))</code>.<br>
@ -791,7 +795,7 @@ iterator find(const CompatibleKey&amp; x,const CompatibleCompare&amp; comp)const
<blockquote> <blockquote>
<b>Requires:</b> (<code>CompatibleKey</code>, <code>CompatibleCompare</code>) <b>Requires:</b> (<code>CompatibleKey</code>, <code>CompatibleCompare</code>)
is a compatible extension of <code>key_compare</code>.</br> is a compatible extension of <code>key_compare</code>.<br>
<b>Effects:</b> Returns a pointer to an element whose key is equivalent to <b>Effects:</b> Returns a pointer to an element whose key is equivalent to
<code>x</code>, or <code>end()</code> if such an element does not exist.<br> <code>x</code>, or <code>end()</code> if such an element does not exist.<br>
<b>Complexity:</b> <code>O(log(n))</code>.<br> <b>Complexity:</b> <code>O(log(n))</code>.<br>
@ -803,7 +807,7 @@ count(const CompatibleKey&amp; x)const;
<blockquote> <blockquote>
<b>Requires:</b> <code>CompatibleKey</code> is a compatible key of <b>Requires:</b> <code>CompatibleKey</code> is a compatible key of
<code>key_compare</code>.</br> <code>key_compare</code>.<br>
<b>Effects:</b> Returns the number of elements with key equivalent to <code>x</code>.<br> <b>Effects:</b> Returns the number of elements with key equivalent to <code>x</code>.<br>
<b>Complexity:</b> <code>O(log(n) + count(x))</code>.<br> <b>Complexity:</b> <code>O(log(n) + count(x))</code>.<br>
</blockquote> </blockquote>
@ -814,7 +818,7 @@ size_type count(const CompatibleKey&amp; x,const CompatibleCompare&amp; comp)con
<blockquote> <blockquote>
<b>Requires:</b> (<code>CompatibleKey</code>, <code>CompatibleCompare</code>) <b>Requires:</b> (<code>CompatibleKey</code>, <code>CompatibleCompare</code>)
is a compatible extension of <code>key_compare</code>.</br> is a compatible extension of <code>key_compare</code>.<br>
<b>Effects:</b> Returns the number of elements with key equivalent to <code>x</code>.<br> <b>Effects:</b> Returns the number of elements with key equivalent to <code>x</code>.<br>
<b>Complexity:</b> <code>O(log(n) + count(x,comp))</code>.<br> <b>Complexity:</b> <code>O(log(n) + count(x,comp))</code>.<br>
</blockquote> </blockquote>
@ -825,7 +829,7 @@ iterator lower_bound(const CompatibleKey&amp; x)const;
<blockquote> <blockquote>
<b>Requires:</b> <code>CompatibleKey</code> is a compatible key of <b>Requires:</b> <code>CompatibleKey</code> is a compatible key of
<code>key_compare</code>.</br> <code>key_compare</code>.<br>
<b>Effects:</b> Returns an iterator pointing to the first element with <b>Effects:</b> Returns an iterator pointing to the first element with
key not less than <code>x</code>, or <code>end()</code> if such an element does key not less than <code>x</code>, or <code>end()</code> if such an element does
not exist.<br> not exist.<br>
@ -838,7 +842,7 @@ iterator lower_bound(const CompatibleKey&amp; x,const CompatibleCompare&amp; com
<blockquote> <blockquote>
<b>Requires:</b> (<code>CompatibleKey</code>, <code>CompatibleCompare</code>) <b>Requires:</b> (<code>CompatibleKey</code>, <code>CompatibleCompare</code>)
is a compatible extension of <code>key_compare</code>.</br> is a compatible extension of <code>key_compare</code>.<br>
<b>Effects:</b> Returns an iterator pointing to the first element with <b>Effects:</b> Returns an iterator pointing to the first element with
key not less than <code>x</code>, or <code>end()</code> if such an element does key not less than <code>x</code>, or <code>end()</code> if such an element does
not exist.<br> not exist.<br>
@ -851,7 +855,7 @@ iterator upper_bound(const CompatibleKey&amp; x)const;
<blockquote> <blockquote>
<b>Requires:</b> <code>CompatibleKey</code> is a compatible key of <b>Requires:</b> <code>CompatibleKey</code> is a compatible key of
<code>key_compare</code>.</br> <code>key_compare</code>.<br>
<b>Effects:</b> Returns an iterator pointing to the first element with <b>Effects:</b> Returns an iterator pointing to the first element with
key greater than <code>x</code>, or <code>end()</code> if such an element does key greater than <code>x</code>, or <code>end()</code> if such an element does
not exist.<br> not exist.<br>
@ -864,7 +868,7 @@ iterator upper_bound(const CompatibleKey&amp; x,const CompatibleCompare&amp; com
<blockquote> <blockquote>
<b>Requires:</b> (<code>CompatibleKey</code>, <code>CompatibleCompare</code>) <b>Requires:</b> (<code>CompatibleKey</code>, <code>CompatibleCompare</code>)
is a compatible extension of <code>key_compare</code>.</br> is a compatible extension of <code>key_compare</code>.<br>
<b>Effects:</b> Returns an iterator pointing to the first element with <b>Effects:</b> Returns an iterator pointing to the first element with
key greater than <code>x</code>, or <code>end()</code> if such an element does key greater than <code>x</code>, or <code>end()</code> if such an element does
not exist.<br> not exist.<br>
@ -878,19 +882,19 @@ std::pair&lt;iterator,iterator> equal_range(<br>
<blockquote> <blockquote>
<b>Requires:</b> <code>CompatibleKey</code> is a compatible key of <b>Requires:</b> <code>CompatibleKey</code> is a compatible key of
<code>key_compare</code>.</br> <code>key_compare</code>.<br>
<b>Effects:</b> Equivalent to <code>make_pair(lower_bound(x),upper_bound(x))</code>.<br> <b>Effects:</b> Equivalent to <code>make_pair(lower_bound(x),upper_bound(x))</code>.<br>
<b>Complexity:</b> <code>O(log(n))</code>.<br> <b>Complexity:</b> <code>O(log(n))</code>.<br>
</blockquote> </blockquote>
<code>template&lt;typename CompatibleKey,typename CompatibleCompare><br> <code>template&lt;typename CompatibleKey,typename CompatibleCompare><br>
std::pair&lt;iterator,iterator> equal_range(</br> std::pair&lt;iterator,iterator> equal_range(<br>
&nbsp;&nbsp;const CompatibleKey&amp; x,const CompatibleCompare&amp; comp)const; &nbsp;&nbsp;const CompatibleKey&amp; x,const CompatibleCompare&amp; comp)const;
</code> </code>
<blockquote> <blockquote>
<b>Requires:</b> (<code>CompatibleKey</code>, <code>CompatibleCompare</code>) <b>Requires:</b> (<code>CompatibleKey</code>, <code>CompatibleCompare</code>)
is a compatible extension of <code>key_compare</code>.</br> is a compatible extension of <code>key_compare</code>.<br>
<b>Effects:</b> Equivalent to <b>Effects:</b> Equivalent to
<code>make_pair(lower_bound(x,comp),upper_bound(x,comp))</code>.<br> <code>make_pair(lower_bound(x,comp),upper_bound(x,comp))</code>.<br>
<b>Complexity:</b> <code>O(log(n))</code>.<br> <b>Complexity:</b> <code>O(log(n))</code>.<br>
@ -942,7 +946,7 @@ std::pair&lt;iterator,iterator> range(<br>
<blockquote> <blockquote>
<b>Requires:</b> <code>LowerBounder</code> and <code>UpperBounder</code> are <b>Requires:</b> <code>LowerBounder</code> and <code>UpperBounder</code> are
a lower and upper bounder of <code>key_compare</code>, respectively.</br> a lower and upper bounder of <code>key_compare</code>, respectively.<br>
<b>Effects:</b> Returns a pair of iterators pointing to the beginning and one <b>Effects:</b> Returns a pair of iterators pointing to the beginning and one
past the end of the subsequence of elements satisfying <code>lower</code> and past the end of the subsequence of elements satisfying <code>lower</code> and
<code>upper</code> simultaneously. If no such elements exist, the iterators <code>upper</code> simultaneously. If no such elements exist, the iterators
@ -1018,9 +1022,9 @@ Hashed indices
<br> <br>
<p>Revised July 2nd 2007</p> <p>Revised June 25th 2008</p>
<p>&copy; Copyright 2003-2007 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz. <p>&copy; Copyright 2003-2008 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software Distributed under the Boost Software
License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt"> License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt">
LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt"> LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">

View File

@ -454,7 +454,7 @@ void assign(InputIterator first,InputIterator last);</code>
<code>value_type</code> or a type convertible to <code>value_type</code>. <code>value_type</code> or a type convertible to <code>value_type</code>.
<code>first</code> and <code>last</code> are not iterators into any <code>first</code> and <code>last</code> are not iterators into any
index of the <code>multi_index_container</code> to which this index belongs. index of the <code>multi_index_container</code> to which this index belongs.
<code>last</code> is reachable from <code>first</code>.</br> <code>last</code> is reachable from <code>first</code>.<br>
<b>Effects:</b> <b>Effects:</b>
<blockquote><pre> <blockquote><pre>
<span class=identifier>clear</span><span class=special>();</span> <span class=identifier>clear</span><span class=special>();</span>
@ -474,11 +474,11 @@ index of the <code>multi_index_container</code> to which this index belongs.
<h4><a name="iterators">Iterators</a></h4> <h4><a name="iterators">Iterators</a></h4>
<code>iterator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iterator_to(const value_type&amp; x);</br> <code>iterator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iterator_to(const value_type&amp; x);<br>
const_iterator iterator_to(const value_type&amp; x)const;</code> const_iterator iterator_to(const value_type&amp; x)const;</code>
<blockquote> <blockquote>
<b>Requires:</b> <code>x</code> is a reference to an element of the container.</br> <b>Requires:</b> <code>x</code> is a reference to an element of the container.<br>
<b>Returns:</b> An iterator to <code>x</code>.<br> <b>Returns:</b> An iterator to <code>x</code>.<br>
<b>Complexity:</b> Constant.<br> <b>Complexity:</b> Constant.<br>
<b>Exception safety:</b> <code>nothrow</code>.<br> <b>Exception safety:</b> <code>nothrow</code>.<br>
@ -555,7 +555,7 @@ Note that more than one element can be causing insertion not to be allowed.<br>
<code>std::pair&lt;iterator,bool> insert(iterator position,const value_type&amp; x);</code> <code>std::pair&lt;iterator,bool> insert(iterator position,const value_type&amp; x);</code>
<blockquote> <blockquote>
<b>Requires:</b> <code>position</code> is a valid iterator of the index.</br> <b>Requires:</b> <code>position</code> is a valid iterator of the index.<br>
<b>Effects:</b> Inserts <code>x</code> before <code>position</code> if insertion <b>Effects:</b> Inserts <code>x</code> before <code>position</code> if insertion
is allowed by all other indices of the <code>multi_index_container</code>.<br> is allowed by all other indices of the <code>multi_index_container</code>.<br>
<b>Returns:</b> The return value is a pair <code>p</code>. <code>p.second</code> <b>Returns:</b> The return value is a pair <code>p</code>. <code>p.second</code>
@ -570,7 +570,7 @@ Note that more than one element can be causing insertion not to be allowed.<br>
<code>void insert(iterator position,size_type m,const value_type&amp; x);</code> <code>void insert(iterator position,size_type m,const value_type&amp; x);</code>
<blockquote> <blockquote>
<b>Requires:</b> <code>position</code> is a valid iterator of the index.</br> <b>Requires:</b> <code>position</code> is a valid iterator of the index.<br>
<b>Effects:</b> <b>Effects:</b>
<blockquote><pre> <blockquote><pre>
<span class=keyword>for</span><span class=special>(</span><span class=identifier>size_type</span> <span class=identifier>i</span><span class=special>=</span><span class=number>0</span><span class=special>;</span><span class=identifier>i</span><span class=special>&lt;</span><span class=identifier>m</span><span class=special>;++</span><span class=identifier>i</span><span class=special>)</span><span class=identifier>insert</span><span class=special>(</span><span class=identifier>position</span><span class=special>,</span><span class=identifier>x</span><span class=special>);</span> <span class=keyword>for</span><span class=special>(</span><span class=identifier>size_type</span> <span class=identifier>i</span><span class=special>=</span><span class=number>0</span><span class=special>;</span><span class=identifier>i</span><span class=special>&lt;</span><span class=identifier>m</span><span class=special>;++</span><span class=identifier>i</span><span class=special>)</span><span class=identifier>insert</span><span class=special>(</span><span class=identifier>position</span><span class=special>,</span><span class=identifier>x</span><span class=special>);</span>
@ -589,7 +589,7 @@ void insert(iterator position,InputIterator first,InputIterator last);</code>
<code>value_type</code> or a type convertible to <code>value_type</code>. <code>value_type</code> or a type convertible to <code>value_type</code>.
<code>first</code> and <code>last</code> are not iterators into any <code>first</code> and <code>last</code> are not iterators into any
index of the <code>multi_index_container</code> to which this index belongs. index of the <code>multi_index_container</code> to which this index belongs.
<code>last</code> is reachable from <code>first</code>.</br> <code>last</code> is reachable from <code>first</code>.<br>
<b>Effects:</b> <b>Effects:</b>
<blockquote><pre> <blockquote><pre>
<span class=keyword>while</span><span class=special>(</span><span class=identifier>first</span><span class=special>!=</span><span class=identifier>last</span><span class=special>)</span><span class=identifier>insert</span><span class=special>(</span><span class=identifier>position</span><span class=special>,*</span><span class=identifier>first</span><span class=special>++);</span> <span class=keyword>while</span><span class=special>(</span><span class=identifier>first</span><span class=special>!=</span><span class=identifier>last</span><span class=special>)</span><span class=identifier>insert</span><span class=special>(</span><span class=identifier>position</span><span class=special>,*</span><span class=identifier>first</span><span class=special>++);</span>
@ -604,7 +604,7 @@ where <code>m</code> is the number of elements in
<blockquote> <blockquote>
<b>Requires:</b> <code>position</code> is a valid dereferenceable iterator <b>Requires:</b> <code>position</code> is a valid dereferenceable iterator
of the index.</br> of the index.<br>
<b>Effects:</b> Deletes the element pointed to by <code>position</code>.<br> <b>Effects:</b> Deletes the element pointed to by <code>position</code>.<br>
<b>Returns:</b> An iterator pointing to the element immediately following <b>Returns:</b> An iterator pointing to the element immediately following
the one that was deleted, or <code>end()</code> the one that was deleted, or <code>end()</code>
@ -629,7 +629,7 @@ the number of elements in [<code>first</code>,<code>last</code>).<br>
<blockquote> <blockquote>
<b>Requires:</b> <code>position</code> is a valid dereferenceable iterator <b>Requires:</b> <code>position</code> is a valid dereferenceable iterator
of the index.</br> of the index.<br>
<b>Effects:</b> Assigns the value <code>x</code> to the element pointed <b>Effects:</b> Assigns the value <code>x</code> to the element pointed
to by <code>position</code> into the <code>multi_index_container</code> to which to by <code>position</code> into the <code>multi_index_container</code> to which
the index belongs if replacing is allowed by all other indices of the the index belongs if replacing is allowed by all other indices of the
@ -652,7 +652,7 @@ belongs remains in its original state.
<a href="http://www.sgi.com/tech/stl/UnaryFunction.html"> <a href="http://www.sgi.com/tech/stl/UnaryFunction.html">
<code>Unary Function</code></a> accepting arguments of type <code>Unary Function</code></a> accepting arguments of type
<code>value_type&amp;</code>. <code>position</code> is a valid dereferenceable <code>value_type&amp;</code>. <code>position</code> is a valid dereferenceable
iterator of the index.</br> iterator of the index.<br>
<b>Effects:</b> Calls <code>mod(e)</code> where <code>e</code> is the element <b>Effects:</b> Calls <code>mod(e)</code> where <code>e</code> is the element
pointed to by <code>position</code> and rearranges <code>*position</code> into pointed to by <code>position</code> and rearranges <code>*position</code> into
all the indices of the <code>multi_index_container</code>. Rearrangement on all the indices of the <code>multi_index_container</code>. Rearrangement on
@ -680,7 +680,7 @@ bool modify(iterator position,Modifier mod,Rollback back);</code>
iterator of the index. The sequence of operations <code>mod(e)</code>, iterator of the index. The sequence of operations <code>mod(e)</code>,
<code>back(e)</code>, where <code>e</code> is the element <code>back(e)</code>, where <code>e</code> is the element
pointed to by <code>position</code>, restores all keys of the element pointed to by <code>position</code>, restores all keys of the element
to their original state.</br> to their original state.<br>
<b>Effects:</b> Calls <code>mod(e)</code> where <code>e</code> is the element <b>Effects:</b> Calls <code>mod(e)</code> where <code>e</code> is the element
pointed to by <code>position</code> and tries to rearrange <code>*position</code> into pointed to by <code>position</code> and tries to rearrange <code>*position</code> into
all the indices of the <code>multi_index_container</code>. Rearrangement on all the indices of the <code>multi_index_container</code>. Rearrangement on
@ -713,7 +713,7 @@ of sequenced indices, but the associated complexity bounds differ in general.
<blockquote> <blockquote>
<b>Requires:</b> <code>position</code> is a valid iterator of the index. <b>Requires:</b> <code>position</code> is a valid iterator of the index.
<code>&amp;x!=this</code>.</br> <code>&amp;x!=this</code>.<br>
<b>Effects:</b> Inserts the contents of <code>x</code> before <code>position</code>, <b>Effects:</b> Inserts the contents of <code>x</code> before <code>position</code>,
in the same order as they were in <code>x</code>. Those elements succesfully in the same order as they were in <code>x</code>. Those elements succesfully
inserted are erased from <code>x</code>.<br> inserted are erased from <code>x</code>.<br>
@ -999,9 +999,9 @@ Key extraction
<br> <br>
<p>Revised July 2nd 2007</p> <p>Revised June 25th 2008</p>
<p>&copy; Copyright 2003-2007 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz. <p>&copy; Copyright 2003-2008 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software Distributed under the Boost Software
License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt"> License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt">
LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt"> LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">

View File

@ -428,7 +428,7 @@ void assign(InputIterator first,InputIterator last);</code>
<code>value_type</code> or a type convertible to <code>value_type</code>. <code>value_type</code> or a type convertible to <code>value_type</code>.
<code>first</code> and <code>last</code> are not iterators into any <code>first</code> and <code>last</code> are not iterators into any
index of the <code>multi_index_container</code> to which this index belongs. index of the <code>multi_index_container</code> to which this index belongs.
<code>last</code> is reachable from <code>first</code>.</br> <code>last</code> is reachable from <code>first</code>.<br>
<b>Effects:</b> <b>Effects:</b>
<blockquote><pre> <blockquote><pre>
<span class=identifier>clear</span><span class=special>();</span> <span class=identifier>clear</span><span class=special>();</span>
@ -448,11 +448,11 @@ index of the <code>multi_index_container</code> to which this index belongs.
<h4><a name="iterators">Iterators</a></h4> <h4><a name="iterators">Iterators</a></h4>
<code>iterator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iterator_to(const value_type&amp; x);</br> <code>iterator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iterator_to(const value_type&amp; x);<br>
const_iterator iterator_to(const value_type&amp; x)const;</code> const_iterator iterator_to(const value_type&amp; x)const;</code>
<blockquote> <blockquote>
<b>Requires:</b> <code>x</code> is a reference to an element of the container.</br> <b>Requires:</b> <code>x</code> is a reference to an element of the container.<br>
<b>Returns:</b> An iterator to <code>x</code>.<br> <b>Returns:</b> An iterator to <code>x</code>.<br>
<b>Complexity:</b> Constant.<br> <b>Complexity:</b> Constant.<br>
<b>Exception safety:</b> <code>nothrow</code>.<br> <b>Exception safety:</b> <code>nothrow</code>.<br>
@ -509,7 +509,7 @@ Note that more than one element can be causing insertion not to be allowed.<br>
<code>std::pair&lt;iterator,bool> insert(iterator position,const value_type&amp; x);</code> <code>std::pair&lt;iterator,bool> insert(iterator position,const value_type&amp; x);</code>
<blockquote> <blockquote>
<b>Requires:</b> <code>position</code> is a valid iterator of the index.</br> <b>Requires:</b> <code>position</code> is a valid iterator of the index.<br>
<b>Effects:</b> Inserts <code>x</code> before <code>position</code> if insertion <b>Effects:</b> Inserts <code>x</code> before <code>position</code> if insertion
is allowed by all other indices of the <code>multi_index_container</code>.<br> is allowed by all other indices of the <code>multi_index_container</code>.<br>
<b>Returns:</b> The return value is a pair <code>p</code>. <code>p.second</code> <b>Returns:</b> The return value is a pair <code>p</code>. <code>p.second</code>
@ -524,7 +524,7 @@ Note that more than one element can be causing insertion not to be allowed.<br>
<code>void insert(iterator position,size_type n,const value_type&amp; x);</code> <code>void insert(iterator position,size_type n,const value_type&amp; x);</code>
<blockquote> <blockquote>
<b>Requires:</b> <code>position</code> is a valid iterator of the index.</br> <b>Requires:</b> <code>position</code> is a valid iterator of the index.<br>
<b>Effects:</b> <b>Effects:</b>
<blockquote><pre> <blockquote><pre>
<span class=keyword>for</span><span class=special>(</span><span class=identifier>size_type</span> <span class=identifier>i</span><span class=special>=</span><span class=number>0</span><span class=special>;</span><span class=identifier>i</span><span class=special>&lt;</span><span class=identifier>n</span><span class=special>;++</span><span class=identifier>i</span><span class=special>)</span><span class=identifier>insert</span><span class=special>(</span><span class=identifier>position</span><span class=special>,</span><span class=identifier>x</span><span class=special>);</span> <span class=keyword>for</span><span class=special>(</span><span class=identifier>size_type</span> <span class=identifier>i</span><span class=special>=</span><span class=number>0</span><span class=special>;</span><span class=identifier>i</span><span class=special>&lt;</span><span class=identifier>n</span><span class=special>;++</span><span class=identifier>i</span><span class=special>)</span><span class=identifier>insert</span><span class=special>(</span><span class=identifier>position</span><span class=special>,</span><span class=identifier>x</span><span class=special>);</span>
@ -542,7 +542,7 @@ void insert(iterator position,InputIterator first,InputIterator last);</code>
<code>value_type</code> or a type convertible to <code>value_type</code>. <code>value_type</code> or a type convertible to <code>value_type</code>.
<code>first</code> and <code>last</code> are not iterators into any <code>first</code> and <code>last</code> are not iterators into any
index of the <code>multi_index_container</code> to which this index belongs. index of the <code>multi_index_container</code> to which this index belongs.
<code>last</code> is reachable from <code>first</code>.</br> <code>last</code> is reachable from <code>first</code>.<br>
<b>Effects:</b> <b>Effects:</b>
<blockquote><pre> <blockquote><pre>
<span class=keyword>while</span><span class=special>(</span><span class=identifier>first</span><span class=special>!=</span><span class=identifier>last</span><span class=special>)</span><span class=identifier>insert</span><span class=special>(</span><span class=identifier>position</span><span class=special>,*</span><span class=identifier>first</span><span class=special>++);</span> <span class=keyword>while</span><span class=special>(</span><span class=identifier>first</span><span class=special>!=</span><span class=identifier>last</span><span class=special>)</span><span class=identifier>insert</span><span class=special>(</span><span class=identifier>position</span><span class=special>,*</span><span class=identifier>first</span><span class=special>++);</span>
@ -556,7 +556,7 @@ number of elements in [<code>first</code>,<code>last</code>).<br>
<blockquote> <blockquote>
<b>Requires:</b> <code>position</code> is a valid dereferenceable iterator <b>Requires:</b> <code>position</code> is a valid dereferenceable iterator
of the index.</br> of the index.<br>
<b>Effects:</b> Deletes the element pointed to by <code>position</code>.<br> <b>Effects:</b> Deletes the element pointed to by <code>position</code>.<br>
<b>Returns:</b> An iterator pointing to the element immediately following <b>Returns:</b> An iterator pointing to the element immediately following
the one that was deleted, or <code>end()</code> the one that was deleted, or <code>end()</code>
@ -581,7 +581,7 @@ the number of elements in [<code>first</code>,<code>last</code>).<br>
<blockquote> <blockquote>
<b>Requires:</b> <code>position</code> is a valid dereferenceable iterator <b>Requires:</b> <code>position</code> is a valid dereferenceable iterator
of the index.</br> of the index.<br>
<b>Effects:</b> Assigns the value <code>x</code> to the element pointed <b>Effects:</b> Assigns the value <code>x</code> to the element pointed
to by <code>position</code> into the <code>multi_index_container</code> to which to by <code>position</code> into the <code>multi_index_container</code> to which
the index belongs if replacing is allowed by all other indices of the the index belongs if replacing is allowed by all other indices of the
@ -604,7 +604,7 @@ belongs remains in its original state.
<a href="http://www.sgi.com/tech/stl/UnaryFunction.html"> <a href="http://www.sgi.com/tech/stl/UnaryFunction.html">
<code>Unary Function</code></a> accepting arguments of type <code>Unary Function</code></a> accepting arguments of type
<code>value_type&amp;</code>. <code>position</code> is a valid dereferenceable <code>value_type&amp;</code>. <code>position</code> is a valid dereferenceable
iterator of the index.</br> iterator of the index.<br>
<b>Effects:</b> Calls <code>mod(e)</code> where <code>e</code> is the element <b>Effects:</b> Calls <code>mod(e)</code> where <code>e</code> is the element
pointed to by <code>position</code> and rearranges <code>*position</code> into pointed to by <code>position</code> and rearranges <code>*position</code> into
all the indices of the <code>multi_index_container</code>. Rearrangement on sequenced all the indices of the <code>multi_index_container</code>. Rearrangement on sequenced
@ -632,7 +632,7 @@ bool modify(iterator position,Modifier mod,Rollback back);</code>
iterator of the index. The sequence of operations <code>mod(e)</code>, iterator of the index. The sequence of operations <code>mod(e)</code>,
<code>back(e)</code>, where <code>e</code> is the element <code>back(e)</code>, where <code>e</code> is the element
pointed to by <code>position</code>, restores all keys of the element pointed to by <code>position</code>, restores all keys of the element
to their original state.</br> to their original state.<br>
<b>Effects:</b> Calls <code>mod(e)</code> where <code>e</code> is the element <b>Effects:</b> Calls <code>mod(e)</code> where <code>e</code> is the element
pointed to by <code>position</code> and tries to rearrange <code>*position</code> into pointed to by <code>position</code> and tries to rearrange <code>*position</code> into
all the indices of the <code>multi_index_container</code>. Rearrangement on sequenced all the indices of the <code>multi_index_container</code>. Rearrangement on sequenced
@ -667,7 +667,7 @@ same <code>multi_index_container</code>.
<blockquote> <blockquote>
<b>Requires:</b> <code>position</code> is a valid iterator of the index. <b>Requires:</b> <code>position</code> is a valid iterator of the index.
<code>&amp;x!=this</code>.</br> <code>&amp;x!=this</code>.<br>
<b>Effects:</b> Inserts the contents of <code>x</code> before <code>position</code>, <b>Effects:</b> Inserts the contents of <code>x</code> before <code>position</code>,
in the same order as they were in <code>x</code>. Those elements succesfully in the same order as they were in <code>x</code>. Those elements succesfully
inserted are erased from <code>x</code>.<br> inserted are erased from <code>x</code>.<br>
@ -954,9 +954,9 @@ Random access indices
<br> <br>
<p>Revised July 2nd 2007</p> <p>Revised June 25th 2008</p>
<p>&copy; Copyright 2003-2007 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz. <p>&copy; Copyright 2003-2008 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software Distributed under the Boost Software
License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt"> License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt">
LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt"> LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">

View File

@ -31,12 +31,30 @@ Acknowledgements
<h2>Contents</h2> <h2>Contents</h2>
<ul> <ul>
<li><a href="#boost_1_36">Boost 1.36 release</a></li>
<li><a href="#boost_1_35">Boost 1.35 release</a></li> <li><a href="#boost_1_35">Boost 1.35 release</a></li>
<li><a href="#boost_1_34">Boost 1.34 release</a></li> <li><a href="#boost_1_34">Boost 1.34 release</a></li>
<li><a href="#boost_1_33_1">Boost 1.33.1 release</a></li> <li><a href="#boost_1_33_1">Boost 1.33.1 release</a></li>
<li><a href="#boost_1_33">Boost 1.33 release</a></li> <li><a href="#boost_1_33">Boost 1.33 release</a></li>
</ul> </ul>
<h2><a name="boost_1_36">Boost 1.36 release</a></h2>
<p>
<ul>
<a name="stable_update">
<li>On prior versions of the library, the <a href="tutorial/indices.html#hash_updating">update
member functions</a> of hashed indices could alter the position of an element even if the
associated key did not change with the update. This is legal but probably unexpected behavior.
The functions have been rewritten to provide the additional guarantee that elements with
unmodified key will not change position in hashed indices, just as always was the case with
ordered indices. These guarantees are now documented in the reference.</li>
<li>Added the constructor <code>multi_index_container::multi_index_container(const allocator_type&amp;)</code>
to mimic the equivalent interface in STL sequence containers.
<li>Maintenance fixes.</li>
</ul>
</p>
<h2><a name="boost_1_35">Boost 1.35 release</a></h2> <h2><a name="boost_1_35">Boost 1.35 release</a></h2>
<p> <p>
@ -205,9 +223,9 @@ Acknowledgements
<br> <br>
<p>Revised October 11th 2007</p> <p>Revised June 25th 2008</p>
<p>&copy; Copyright 2003-2007 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz. <p>&copy; Copyright 2003-2008 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software Distributed under the Boost Software
License, Version 1.0. (See accompanying file <a href="../../../LICENSE_1_0.txt"> License, Version 1.0. (See accompanying file <a href="../../../LICENSE_1_0.txt">
LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt"> LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex basic example. /* Boost.MultiIndex basic example.
* *
* Copyright 2003-2005 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex example of a bidirectional map. /* Boost.MultiIndex example of a bidirectional map.
* *
* Copyright 2003-2005 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex example: complex searches and foreign keys. /* Boost.MultiIndex example: complex searches and foreign keys.
* *
* Copyright 2003-2005 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex example of composite keys. /* Boost.MultiIndex example of composite keys.
* *
* Copyright 2003-2007 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex example of functions used as key extractors. /* Boost.MultiIndex example of functions used as key extractors.
* *
* Copyright 2003-2007 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex example of use of hashed indices. /* Boost.MultiIndex example of use of hashed indices.
* *
* Copyright 2003-2005 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)
@ -66,6 +66,8 @@ typedef boost::tokenizer<boost::char_separator<char> > text_tokenizer;
int main() int main()
{ {
/* boostinspect:noascii */
std::string text= std::string text=
"En un lugar de la Mancha, de cuyo nombre no quiero acordarme, no ha " "En un lugar de la Mancha, de cuyo nombre no quiero acordarme, no ha "
"mucho tiempo que vivía un hidalgo de los de lanza en astillero, adarga " "mucho tiempo que vivía un hidalgo de los de lanza en astillero, adarga "

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex example of use of Boost.Interprocess allocators. /* Boost.MultiIndex example of use of Boost.Interprocess allocators.
* *
* Copyright 2003-2007 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex example of use of multi_index_container::ctor_args_list. /* Boost.MultiIndex example of use of multi_index_container::ctor_args_list.
* *
* Copyright 2003-2004 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex example of use of random access indices. /* Boost.MultiIndex example of use of random access indices.
* *
* Copyright 2003-2006 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex example of use of rearrange facilities. /* Boost.MultiIndex example of use of rearrange facilities.
* *
* Copyright 2003-2006 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex example of use of sequenced indices. /* Boost.MultiIndex example of use of sequenced indices.
* *
* Copyright 2003-2005 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex example of serialization of a MRU list. /* Boost.MultiIndex example of serialization of a MRU list.
* *
* Copyright 2003-2006 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2006 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaquín M López Muńoz. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)
@ -31,10 +31,10 @@ namespace detail{
* iterators (ordered and sequenced indices.) * iterators (ordered and sequenced indices.)
*/ */
template<typename Node,typename Derived=mpl::na> template<typename Node>
class bidir_node_iterator: class bidir_node_iterator:
public bidirectional_iterator_helper< public bidirectional_iterator_helper<
bidir_node_iterator<Node,Derived>, bidir_node_iterator<Node>,
typename Node::value_type, typename Node::value_type,
std::ptrdiff_t, std::ptrdiff_t,
const typename Node::value_type*, const typename Node::value_type*,
@ -96,10 +96,10 @@ private:
Node* node; Node* node;
}; };
template<typename Node,typename Derived> template<typename Node>
bool operator==( bool operator==(
const bidir_node_iterator<Node,Derived>& x, const bidir_node_iterator<Node>& x,
const bidir_node_iterator<Node,Derived>& y) const bidir_node_iterator<Node>& y)
{ {
return x.get_node()==y.get_node(); return x.get_node()==y.get_node();
} }

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaquín M López Muñoz. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)
@ -90,7 +90,7 @@ class bucket_array:public bucket_array_base
hashed_index_node_impl< hashed_index_node_impl<
typename boost::detail::allocator::rebind_to< typename boost::detail::allocator::rebind_to<
Allocator, Allocator,
void char
>::type >::type
> >
>::type node_impl_type; >::type node_impl_type;

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2006 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaquín M López Muñoz. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)
@ -30,10 +30,10 @@ namespace detail{
/* Iterator class for hashed indices. /* Iterator class for hashed indices.
*/ */
template<typename Node,typename BucketArray,typename Derived=mpl::na> template<typename Node,typename BucketArray>
class hashed_index_iterator: class hashed_index_iterator:
public forward_iterator_helper< public forward_iterator_helper<
hashed_index_iterator<Node,BucketArray,Derived>, hashed_index_iterator<Node,BucketArray>,
typename Node::value_type, typename Node::value_type,
std::ptrdiff_t, std::ptrdiff_t,
const typename Node::value_type*, const typename Node::value_type*,
@ -94,10 +94,10 @@ private:
BucketArray* buckets; BucketArray* buckets;
}; };
template<typename Node,typename BucketArray,typename Derived> template<typename Node,typename BucketArray>
bool operator==( bool operator==(
const hashed_index_iterator<Node,BucketArray,Derived>& x, const hashed_index_iterator<Node,BucketArray>& x,
const hashed_index_iterator<Node,BucketArray,Derived>& y) const hashed_index_iterator<Node,BucketArray>& y)
{ {
return x.get_node()==y.get_node(); return x.get_node()==y.get_node();
} }

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaquín M López Muñoz. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)
@ -47,12 +47,12 @@ struct hashed_index_node_impl
/* algorithmic stuff */ /* algorithmic stuff */
static void increment(pointer& x,pointer bbegin,pointer bbend) static void increment(pointer& x,pointer bbegin,pointer bend)
{ {
std::less_equal<pointer> leq; std::less_equal<pointer> leq;
x=x->next(); x=x->next();
if(leq(bbegin,x)&&leq(x,bbend)){ /* bucket node */ if(leq(bbegin,x)&&leq(x,bend)){ /* bucket node */
do{ do{
++x; ++x;
}while(x->next()==x); }while(x->next()==x);
@ -96,7 +96,7 @@ struct hashed_index_node_trampoline:
hashed_index_node_impl< hashed_index_node_impl<
typename boost::detail::allocator::rebind_to< typename boost::detail::allocator::rebind_to<
typename Super::allocator_type, typename Super::allocator_type,
void char
>::type >::type
> >
>::type >::type
@ -106,7 +106,7 @@ struct hashed_index_node_trampoline:
hashed_index_node_impl< hashed_index_node_impl<
typename boost::detail::allocator::rebind_to< typename boost::detail::allocator::rebind_to<
typename Super::allocator_type, typename Super::allocator_type,
void char
>::type >::type
> >
>::type impl_type; >::type impl_type;

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaquín M López Muñoz. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)
@ -562,7 +562,7 @@ struct ordered_index_node_trampoline:
ordered_index_node_impl< ordered_index_node_impl<
typename boost::detail::allocator::rebind_to< typename boost::detail::allocator::rebind_to<
typename Super::allocator_type, typename Super::allocator_type,
void char
>::type >::type
> >
>::type >::type
@ -572,7 +572,7 @@ struct ordered_index_node_trampoline:
ordered_index_node_impl< ordered_index_node_impl<
typename boost::detail::allocator::rebind_to< typename boost::detail::allocator::rebind_to<
typename Super::allocator_type, typename Super::allocator_type,
void char
>::type >::type
> >
>::type impl_type; >::type impl_type;

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaquín M López Muñoz. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)
@ -50,7 +50,7 @@ protected:
random_access_index_node_impl< random_access_index_node_impl<
typename boost::detail::allocator::rebind_to< typename boost::detail::allocator::rebind_to<
Allocator, Allocator,
void char
>::type >::type
> >
>::type node_impl_type; >::type node_impl_type;

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaquín M López Muñoz. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)
@ -186,7 +186,7 @@ struct random_access_index_node_trampoline:
random_access_index_node_impl< random_access_index_node_impl<
typename boost::detail::allocator::rebind_to< typename boost::detail::allocator::rebind_to<
typename Super::allocator_type, typename Super::allocator_type,
void char
>::type >::type
> >
>::type >::type
@ -196,7 +196,7 @@ struct random_access_index_node_trampoline:
random_access_index_node_impl< random_access_index_node_impl<
typename boost::detail::allocator::rebind_to< typename boost::detail::allocator::rebind_to<
typename Super::allocator_type, typename Super::allocator_type,
void char
>::type >::type
> >
>::type impl_type; >::type impl_type;

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaquín M López Muñoz. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)
@ -38,7 +38,7 @@ class random_access_index_ptr_array:private noncopyable
random_access_index_node_impl< random_access_index_node_impl<
typename boost::detail::allocator::rebind_to< typename boost::detail::allocator::rebind_to<
Allocator, Allocator,
void char
>::type >::type
> >
>::type node_impl_type; >::type node_impl_type;

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaquín M López Muńoz. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)
@ -29,10 +29,10 @@ namespace detail{
/* Iterator class for node-based indices with random access iterators. */ /* Iterator class for node-based indices with random access iterators. */
template<typename Node,typename Derived=mpl::na> template<typename Node>
class rnd_node_iterator: class rnd_node_iterator:
public random_access_iterator_helper< public random_access_iterator_helper<
rnd_node_iterator<Node,Derived>, rnd_node_iterator<Node>,
typename Node::value_type, typename Node::value_type,
std::ptrdiff_t, std::ptrdiff_t,
const typename Node::value_type*, const typename Node::value_type*,
@ -106,26 +106,26 @@ private:
Node* node; Node* node;
}; };
template<typename Node,typename Derived> template<typename Node>
bool operator==( bool operator==(
const rnd_node_iterator<Node,Derived>& x, const rnd_node_iterator<Node>& x,
const rnd_node_iterator<Node,Derived>& y) const rnd_node_iterator<Node>& y)
{ {
return x.get_node()==y.get_node(); return x.get_node()==y.get_node();
} }
template<typename Node,typename Derived> template<typename Node>
bool operator<( bool operator<(
const rnd_node_iterator<Node,Derived>& x, const rnd_node_iterator<Node>& x,
const rnd_node_iterator<Node,Derived>& y) const rnd_node_iterator<Node>& y)
{ {
return Node::distance(x.get_node(),y.get_node())>0; return Node::distance(x.get_node(),y.get_node())>0;
} }
template<typename Node,typename Derived> template<typename Node>
std::ptrdiff_t operator-( std::ptrdiff_t operator-(
const rnd_node_iterator<Node,Derived>& x, const rnd_node_iterator<Node>& x,
const rnd_node_iterator<Node,Derived>& y) const rnd_node_iterator<Node>& y)
{ {
return Node::distance(y.get_node(),x.get_node()); return Node::distance(y.get_node(),x.get_node());
} }

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2006 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2006 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaquín M López Muñoz. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)
@ -141,7 +141,7 @@ struct sequenced_index_node_trampoline:
sequenced_index_node_impl< sequenced_index_node_impl<
typename boost::detail::allocator::rebind_to< typename boost::detail::allocator::rebind_to<
typename Super::allocator_type, typename Super::allocator_type,
void char
>::type >::type
> >
>::type >::type
@ -151,7 +151,7 @@ struct sequenced_index_node_trampoline:
sequenced_index_node_impl< sequenced_index_node_impl<
typename boost::detail::allocator::rebind_to< typename boost::detail::allocator::rebind_to<
typename Super::allocator_type, typename Super::allocator_type,
void char
>::type >::type
> >
>::type impl_type; >::type impl_type;

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaquín M López Muñoz. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)
@ -808,14 +808,21 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
bool modify_(node_type* x) bool modify_(node_type* x)
{ {
unlink(x);
std::size_t buc; std::size_t buc;
node_impl_pointer pos; bool b;
BOOST_TRY BOOST_TRY{
{
buc=find_bucket(x->value()); buc=find_bucket(x->value());
pos=buckets.at(buc); b=in_place(x->impl(),key(x->value()),buc,Category());
}
BOOST_CATCH(...){
erase_(x);
BOOST_RETHROW;
}
BOOST_CATCH_END
if(!b){
unlink(x);
BOOST_TRY{
node_impl_pointer pos=buckets.at(buc);
if(!link_point(x->value(),pos,Category())){ if(!link_point(x->value(),pos,Category())){
first_bucket=buckets.first_nonempty(first_bucket); first_bucket=buckets.first_nonempty(first_bucket);
super::erase_(x); super::erase_(x);
@ -825,7 +832,13 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
#endif #endif
return false; return false;
} }
link(x,pos);
if(first_bucket>buc){
first_bucket=buc;
}
else if(first_bucket<buc){
first_bucket=buckets.first_nonempty(first_bucket);
}
} }
BOOST_CATCH(...){ BOOST_CATCH(...){
first_bucket=buckets.first_nonempty(first_bucket); first_bucket=buckets.first_nonempty(first_bucket);
@ -838,27 +851,21 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
BOOST_RETHROW; BOOST_RETHROW;
} }
BOOST_CATCH_END BOOST_CATCH_END
}
BOOST_TRY{ BOOST_TRY{
if(super::modify_(x)){ if(!super::modify_(x)){
link(x,pos); unlink(x);
if(first_bucket>buc){
first_bucket=buc;
}
else if(first_bucket<buc){
first_bucket=buckets.first_nonempty(first_bucket); first_bucket=buckets.first_nonempty(first_bucket);
}
return true;
}
first_bucket=buckets.first_nonempty(first_bucket);
#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE) #if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
detach_iterators(x); detach_iterators(x);
#endif #endif
return false; return false;
} }
else return true;
}
BOOST_CATCH(...){ BOOST_CATCH(...){
unlink(x);
first_bucket=buckets.first_nonempty(first_bucket); first_bucket=buckets.first_nonempty(first_bucket);
#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE) #if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
@ -872,11 +879,15 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
bool modify_rollback_(node_type* x) bool modify_rollback_(node_type* x)
{ {
std::size_t buc=find_bucket(x->value());
if(in_place(x->impl(),key(x->value()),buc,Category())){
return super::modify_rollback_(x);
}
node_impl_pointer y=prev(x); node_impl_pointer y=prev(x);
unlink_next(y); unlink_next(y);
BOOST_TRY{ BOOST_TRY{
std::size_t buc=find_bucket(x->value());
node_impl_pointer pos=buckets.at(buc); node_impl_pointer pos=buckets.at(buc);
if(link_point(x->value(),pos,Category())&&super::modify_rollback_(x)){ if(link_point(x->value(),pos,Category())&&super::modify_rollback_(x)){
link(x,pos); link(x,pos);
@ -993,17 +1004,17 @@ private:
return true; return true;
} }
void link(node_type* x,node_impl_pointer pos) static void link(node_type* x,node_impl_pointer pos)
{ {
node_impl_type::link(x->impl(),pos); node_impl_type::link(x->impl(),pos);
}; };
void link(node_impl_pointer x,node_impl_pointer pos) static void link(node_impl_pointer x,node_impl_pointer pos)
{ {
node_impl_type::link(x,pos); node_impl_type::link(x,pos);
}; };
void unlink(node_type* x) static void unlink(node_type* x)
{ {
node_impl_type::unlink(x->impl()); node_impl_type::unlink(x->impl());
}; };
@ -1013,6 +1024,11 @@ private:
return node_impl_type::prev(x->impl()); return node_impl_type::prev(x->impl());
} }
static node_impl_pointer prev_from(node_type* x,node_impl_pointer y)
{
return node_impl_type::prev_from(x->impl(),y);
}
static void unlink_next(node_impl_pointer x) static void unlink_next(node_impl_pointer x)
{ {
node_impl_type::unlink_next(x); node_impl_type::unlink_next(x);
@ -1069,6 +1085,68 @@ private:
first_bucket=buckets.first_nonempty(0); first_bucket=buckets.first_nonempty(0);
} }
bool in_place(
node_impl_pointer x,key_param_type k,std::size_t buc,
hashed_unique_tag)const
{
std::less_equal<node_impl_pointer> leq;
node_impl_pointer bbegin=buckets.begin();
node_impl_pointer bend=buckets.end();
node_impl_pointer pbuc=x->next();
while(!leq(bbegin,pbuc)||!leq(pbuc,bend))pbuc=pbuc->next();
if(buc!=static_cast<std::size_t>(pbuc-bbegin))return false;
node_impl_pointer y=x;
while(y->next()!=x){
y=y->next();
if(y==pbuc)continue;
if(eq(k,key(node_type::from_impl(y)->value())))return false;
}
return true;
}
bool in_place(
node_impl_pointer x,key_param_type k,std::size_t buc,
hashed_non_unique_tag)const
{
std::less_equal<node_impl_pointer> leq;
node_impl_pointer bbegin=buckets.begin();
node_impl_pointer bend=buckets.end();
node_impl_pointer pbuc=x->next();
while(!leq(bbegin,pbuc)||!leq(pbuc,bend))pbuc=pbuc->next();
if(buc!=static_cast<std::size_t>(pbuc-bbegin))return false;
node_impl_pointer y=x->next();
if(y!=pbuc){
if(eq(k,key(node_type::from_impl(y)->value()))){
/* adjacent to equivalent element -> in place */
return true;
}
else{
y=y->next();
while(y!=pbuc){
if(eq(k,key(node_type::from_impl(y)->value())))return false;
y=y->next();
}
}
}
while(y->next()!=x){
y=y->next();
if(eq(k,key(node_type::from_impl(y)->value()))){
while(y->next()!=x){
y=y->next();
if(!eq(k,key(node_type::from_impl(y)->value())))return false;
}
/* after a group of equivalent elements --> in place */
return true;
}
}
return true;
}
#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE) #if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
void detach_iterators(node_type* x) void detach_iterators(node_type* x)
{ {

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2006 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2006 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2006 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2007 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Multiply indexed container. /* Multiply indexed container.
* *
* Copyright 2003-2007 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)
@ -193,6 +193,14 @@ public:
BOOST_MULTI_INDEX_CHECK_INVARIANT; BOOST_MULTI_INDEX_CHECK_INVARIANT;
} }
explicit multi_index_container(const allocator_type& al):
bfm_allocator(al),
super(ctor_args_list(),bfm_allocator::member),
node_count(0)
{
BOOST_MULTI_INDEX_CHECK_INVARIANT;
}
template<typename InputIterator> template<typename InputIterator>
multi_index_container( multi_index_container(
InputIterator first,InputIterator last, InputIterator first,InputIterator last,

View File

@ -1,4 +1,4 @@
/* Copyright 2003-2005 Joaqu匤 M L<>ez Mu<4D>z. /* Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex performance test. /* Boost.MultiIndex performance test.
* *
* Copyright 2003-2007 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Used in Boost.MultiIndex tests. /* Used in Boost.MultiIndex tests.
* *
* Copyright 2003-2007 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Used in Boost.MultiIndex tests. /* Used in Boost.MultiIndex tests.
* *
* Copyright 2003-2007 Joaquín M López Muñoz. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)
@ -123,14 +123,4 @@ public:
} }
}; };
template<>
class non_std_allocator<void>
{
public:
typedef non_raw_pointer<void> pointer;
typedef non_raw_pointer<const void> const_pointer;
typedef void value_type;
template<class U>struct rebind{typedef non_std_allocator<U> other;};
};
#endif #endif

View File

@ -1,6 +1,6 @@
/* Used in Boost.MultiIndex tests. /* Used in Boost.MultiIndex tests.
* *
* Copyright 2003-2007 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Used in Boost.MultiIndex tests. /* Used in Boost.MultiIndex tests.
* *
* Copyright 2003-2005 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex test suite. /* Boost.MultiIndex test suite.
* *
* Copyright 2003-2006 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex basic test. /* Boost.MultiIndex basic test.
* *
* Copyright 2003-2006 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex basic test. /* Boost.MultiIndex basic test.
* *
* Copyright 2003-2004 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex basic test. /* Boost.MultiIndex basic test.
* *
* Copyright 2003-2004 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex test for capacity memfuns. /* Boost.MultiIndex test for capacity memfuns.
* *
* Copyright 2003-2007 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex test for capacity memfuns. /* Boost.MultiIndex test for capacity memfuns.
* *
* Copyright 2003-2004 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex test for capacity memfuns. /* Boost.MultiIndex test for capacity memfuns.
* *
* Copyright 2003-2004 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex test for comparison functions. /* Boost.MultiIndex test for comparison functions.
* *
* Copyright 2003-2006 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex test for comparison functions. /* Boost.MultiIndex test for comparison functions.
* *
* Copyright 2003-2004 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
/* Boost.MultiIndex test for comparison functions. /* Boost.MultiIndex test for comparison functions.
* *
* Copyright 2003-2004 Joaqu匤 M L<EFBFBD>ez Mu<EFBFBD>z. * Copyright 2003-2008 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)

Some files were not shown because too many files have changed in this diff Show More