Compare commits

...

7 Commits

Author SHA1 Message Date
nobody 506aa25b0e This commit was manufactured by cvs2svn to create tag
'Version_1_33_1_beta'.

[SVN r31604]
2005-11-08 23:18:41 +00:00
Joaquín M. López Muñoz 3a78024c99 added GCC 4.0.2
[SVN r31360]
2005-10-17 12:55:31 +00:00
Joaquín M. López Muñoz b2bc195cba updated according to latest regression tests results
[SVN r31007]
2005-09-16 06:41:59 +00:00
Joaquín M. López Muñoz cffc0bd575 merged changes in trunk since 1.33.0
[SVN r30813]
2005-09-05 11:34:18 +00:00
Douglas Gregor 3ad8f76115 Add missing include
[SVN r30456]
2005-08-04 15:41:36 +00:00
Jonathan Turkanis 2c722d9478 fixed broken links
[SVN r30391]
2005-08-03 03:28:41 +00:00
nobody a39992a220 This commit was manufactured by cvs2svn to create branch 'RC_1_33_0'.
[SVN r30300]
2005-07-28 18:22:24 +00:00
15 changed files with 132 additions and 82 deletions
+2 -2
View File
@@ -122,7 +122,7 @@ If you are familiar with non-standard <code>hash_set</code>s provided
by some compiler vendors, then learning to use hashed indices should be straightforward.
However, the interface of hashed indices is modeled after the specification
for unordered associative containers by the
<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1745.pdf">C++ Standard
<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1836.pdf">C++ Standard
Library Technical Report</a> (TR1),
which differs in some significant aspects from existing pre-standard
implementations:
@@ -1576,7 +1576,7 @@ Reference
<br>
<p>Revised June 7th 2005</p>
<p>Revised August 24th 2005</p>
<p>&copy; Copyright 2003-2005 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software
+26 -15
View File
@@ -34,7 +34,7 @@ along with suitable workarounds when available.
<ul>
<li><a href="#bcb_64">Borland C++ Builder 6.4</a></li>
<li><a href="#comeau_433_win_vc7_71">Comeau C/C++ 4.3.3 for Windows (VC++ 7.0/7.1 backend)</a></li>
<li><a href="#compaq_65">Compaq C++ 6.5-042 for Tru64 UNIX</a></li>
<li><a href="#compaq_65">Compaq C++ 6.5-042 for Tru64 UNIX and later</a></li>
<li>
<a href="#gcc_32">GNU GCC 3.2 and later</a>
<ul>
@@ -44,16 +44,17 @@ along with suitable workarounds when available.
</li>
<li><a href="#acc_60">HP aC++ A.06.00 for HP-UX</a></li>
<li><a href="#va_60">IBM VisualAge C++ V6.0 for AIX</a></li>
<li><a href="#intel_71_8x_lin">Intel C++ Compiler for Linux 7.1/8.0/8.1</a></li>
<li><a href="#intel_71_lin">Intel C++ Compiler for Linux 7.1 and later</a></li>
<li><a href="#intel_em64t_81_lin">Intel C++ Compiler Extended Memory 64 Technology 8.1 for Linux</a></li>
<li><a href="#intel_7x_win">Intel C++ Compiler for Windows 32-bit 7.0/7.1</a></li>
<li><a href="#intel_71_win_stlport_453">Intel C++ Compiler for Windows 32-bit 7.1 + STLport 4.5.3</a></li>
<li><a href="#intel_8x_9x_win">Intel C++ Compiler for Windows 32-bit 8.0/8.1/9.0</a></li>
<li><a href="#cw_83_9x">Metrowerks CodeWarrior 8.3 and later</a></li>
<li><a href="#intel_80_win">Intel C++ Compiler for Windows 32-bit 8.0 and later</a></li>
<li><a href="#cw_83">Metrowerks CodeWarrior 8.3 and later</a></li>
<li><a href="#msvc_60">Microsoft Visual C++ 6.0 Service Pack 5</a></li>
<li><a href="#msvc_60_stlport_453">Microsoft Visual C++ 6.0 Service Pack 5 + STLport 4.5.3</a></li>
<li><a href="#msvc_70">Microsoft Visual C++ 7.0</a></li>
<li><a href="#msvc_71">Microsoft Visual C++ 7.1</a></li>
<li><a href="#msvc_71_stlport_462">Microsoft Visual C++ 7.1 + STLport 4.6.2</a></li>
<li><a href="#msvc_80">Microsoft Visual C++ 8.0</a></li>
<li><a href="#portability">Portability techniques</a>
<ul>
@@ -88,10 +89,11 @@ No problems have been detected with this compiler. The library fails to compile,
however, when Microsoft Visual C++ 6.0 is used as the backend.
</p>
<h2><a name="compaq_65">Compaq C++ 6.5-042 for Tru64 UNIX</a></h2>
<h2><a name="compaq_65">Compaq C++ 6.5-042 for Tru64 UNIX and later</a></h2>
<p>
No problems have been detected with this compiler.
No problems have been detected with this compiler. Versions 6.5-042,
7.1-005 and 7.1-006 have been tested.
</p>
<h2><a name="gcc_32">GNU GCC 3.2 and later</a></h2>
@@ -109,12 +111,13 @@ starting from 3.2. The following versions have been explicitly tested:
<li>GCC 3.3.6 under Linux and Tru64 (see <a href="#gcc_tru64">below</a>),</li>
<li>GCC 3.4.2 (mingw-special) under Win32,</li>
<li>GCC 3.4.3 under Linux, Solaris and Tru64 (see <a href="#gcc_tru64">below</a>),</li>
<li>GCC 3.4.4 (cygming special) under Cygwin, under Linux,
<li>GCC 3.4.4 (cygming special) under Cygwin, under Gentoo Linux PPC64, under Linux,
under Tru64 (see <a href="#gcc_tru64">below</a>), (mingw special) under Win32,</li>
<li>GCC 4.0.0 20041026 (Apple build 4061) under Mac OS
(see <a href="#gcc_4_darwin">below</a>),</li>
<li>GCC 4.0.0 under Linux, (Apple build 5026) under Mac OS,</li>
<li>GCC 4.0.1 under Linux.</li>
<li>GCC 4.0.1 under Linux and Tru64 (see <a href="#gcc_tru64">below</a>),</li>
<li>GCC 4.0.2 under Linux.</li>
</ul>
Boost.MultiIndex does not work with versions 3.1 and prior of GCC.
</p>
@@ -181,10 +184,10 @@ Serialization capabilities are not available as Boost.Serialization is not
supported on this platform.
</p>
<h2><a name="intel_71_8x_lin">Intel C++ Compiler for Linux 7.1/8.0/8.1</a></h2>
<h2><a name="intel_71_lin">Intel C++ Compiler for Linux 7.1 and later</a></h2>
<p>
No problems have been detected with these compilers.
No problems have been detected with this compilers from version 7.1 up to 9.0.
</p>
<h2><a name="intel_em64t_81_lin">Intel C++ Compiler Extended Memory 64 Technology 8.1
@@ -212,7 +215,7 @@ Argument dependent lookup is enabled by adding
<code>/Qoption,c,--arg_dep_lookup</code> to the project options.
</p>
<h2><a name="#intel_71_win_stlport_453">
<h2><a name="intel_71_win_stlport_453">
Intel C++ Compiler for Windows 32-bit 7.1 + STLport 4.5.3</a></h2>
<p>
@@ -221,7 +224,7 @@ in Intel C++ 7.1 with its original Dinkumware standard library. STLport 4.6.2 ha
also been confirmed to work correctly.
</p>
<h2><a name="intel_8x_9x_win">Intel C++ Compiler for Windows 32-bit 8.0/8.1/9.0</a></h2>
<h2><a name="intel_80_win">Intel C++ Compiler for Windows 32-bit 8.0 and later</a></h2>
<p>
When used on top of MSVC++ 7.0 or prior, argument dependent lookup is
@@ -229,10 +232,11 @@ disabled by default. This will cause problems with many Boost libraries,
and in particular with the serialization part of Boost.MultiIndex.
Argument dependent lookup is enabled by adding
<code>/Qoption,c,--arg_dep_lookup</code> to the project options.
Other than this, Boost.MultiIndex works without problems.
Other than this, Boost.MultiIndex works without problems. Compiler versions
from 8.0 to 9.0 have been tested.
</p>
<h2><a name="cw_83_9x">Metrowerks CodeWarrior 8.3 and later</a></h2>
<h2><a name="cw_83">Metrowerks CodeWarrior 8.3 and later</a></h2>
<p>
Boost.MultiIndex works correctly with versions of this compiler from 8.3 to
@@ -501,6 +505,13 @@ If <code>/Gm</code> is turned off, Boost.MultiIndex compiles and runs
without further problems.
</p>
<h2><a name="msvc_71_stlport_462">Microsoft Visual C++ 7.1 + STLport 4.6.2</a></h2>
<p>
Boost.MultiIndex works for this configuration. The same issues apply as in
MSVC++ 7.1 with its original Dinkumware standard library.
</p>
<h2><a name="msvc_80">Microsoft Visual C++ 8.0</a></h2>
<p>
@@ -928,7 +939,7 @@ Performance
<br>
<p>Revised July 26th 2005</p>
<p>Revised October 17th 2005</p>
<p>&copy; Copyright 2003-2005 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software
+2 -2
View File
@@ -136,7 +136,7 @@ be defined as:
<span class=keyword>struct</span> <span class=identifier>car_model</span>
<span class=special>{</span>
<span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>model</span><span class=special>;</span>
<span class=identifier>std</span><span class=special>:</span><span class=identifier>string</span> <span class=identifier>manufacturer</span><span class=special>;</span>
<span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>manufacturer</span><span class=special>;</span>
<span class=keyword>int</span> <span class=identifier>price</span><span class=special>;</span>
<span class=special>};</span>
</pre></blockquote>
@@ -347,7 +347,7 @@ Tests
<br>
<p>Revised March 8th 2005</p>
<p>Revised August 22nd 2005</p>
<p>&copy; Copyright 2003-2005 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software
+1 -1
View File
@@ -91,7 +91,7 @@ STL containers.
<h2><a name="simulation">Manual simulation of a <code>multi_index_container</code></a></h2>
<p>
The section of <a href="advanced_topics.html#simulate_std_containers">simulation
The section on <a href="advanced_topics.html#emulate_std_containers">emulation
of standard containers with <code>multi_index_container</code></a> shows the equivalence
between single-index <code>multi_index_container</code>s and some STL containers. Let us now
concentrate on the problem of simulating a <code>multi_index_container</code> with two
+11 -7
View File
@@ -154,7 +154,7 @@ two different forms, according to whether a tag list for the index is provided o
<p>
If provided, <code>TagList</code> must be an instantiation of the class template
<a href="#tag"><code>tag</code></a>.
<a href="indices.html#tag"><code>tag</code></a>.
The template arguments are used by the corresponding index implementation,
refer to the <a href="#hash_indices">hashed indices</a> reference section for further
explanations on their acceptable type values.
@@ -166,7 +166,7 @@ explanations on their acceptable type values.
A hashed index provides fast retrieval of elements of a <code>multi_index_container</code>
through hashing tecnhiques. The interface and semantics of hashed indices are modeled according
to the proposal for unordered associative containers given in the C++
<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1745.pdf">Proposed
<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1836.pdf">Proposed
Draft Tecnhical Report on Standard Library Extensions</a>, also known as TR1. A hashed
index is particularized according to a given
<a href="key_extraction.html#key_extractors"><code>Key Extractor</code></a>
@@ -252,9 +252,9 @@ do not exactly conform to the requirements for unordered associative containers.
<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>void</span> <span class=identifier>insert</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=keyword>void</span> <span class=identifier>erase</span><span class=special>(</span><span class=identifier>iterator</span> <span class=identifier>position</span><span class=special>);</span>
<span class=identifier>iterator</span> <span class=identifier>erase</span><span class=special>(</span><span class=identifier>iterator</span> <span class=identifier>position</span><span class=special>);</span>
<span class=identifier>size_type</span> <span class=identifier>erase</span><span class=special>(</span><span class=keyword>const</span> <span class=identifier>key_type</span><span class=special>&amp;</span> <span class=identifier>x</span><span class=special>);</span>
<span class=keyword>void</span> <span class=identifier>erase</span><span class=special>(</span><span class=identifier>iterator</span> <span class=identifier>first</span><span class=special>,</span><span class=identifier>iterator</span> <span class=identifier>last</span><span class=special>);</span>
<span class=identifier>iterator</span> <span class=identifier>erase</span><span class=special>(</span><span class=identifier>iterator</span> <span class=identifier>first</span><span class=special>,</span><span class=identifier>iterator</span> <span class=identifier>last</span><span class=special>);</span>
<span class=keyword>bool</span> <span class=identifier>replace</span><span class=special>(</span><span class=identifier>iterator</span> <span class=identifier>position</span><span class=special>,</span><span class=keyword>const</span> <span class=identifier>value_type</span><span class=special>&amp;</span> <span class=identifier>x</span><span class=special>);</span>
<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>Modifier</span><span class=special>&gt;</span> <span class=keyword>bool</span> <span class=identifier>modify</span><span class=special>(</span><span class=identifier>iterator</span> <span class=identifier>position</span><span class=special>,</span><span class=identifier>Modifier</span> <span class=identifier>mod</span><span class=special>);</span>
@@ -496,12 +496,15 @@ index of the <code>multi_index_container</code> to which this index belongs.
<b>Exception safety:</b> Basic.<br>
</blockquote>
<code>void erase(iterator position);</code>
<code>iterator erase(iterator position);</code>
<blockquote>
<b>Requires:</b> <code>position</code> is a valid dereferenceable iterator
of the index.</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
the one that was deleted, or <code>end()</code>
if no such element exists.<br>
<b>Complexity:</b> <code>O(D(n))</code>.<br>
<b>Exception safety:</b> <code>nothrow</code>.<br>
</blockquote>
@@ -517,12 +520,13 @@ the number of elements deleted.<br>
<b>Exception safety:</b> Basic.<br>
</blockquote>
<code>void erase(iterator first,iterator last);</code>
<code>iterator erase(iterator first,iterator last);</code>
<blockquote>
<b>Requires:</b> [<code>first</code>,<code>last</code>) is a valid
range of the index.<br>
<b>Effects:</b> Deletes the elements in [<code>first</code>,<code>last</code>).<br>
<b>Returns:</b> <code>last</code>.<br>
<b>Complexity:</b> <code>O(m*D(n))</code>, where <code>m</code> is
the number of elements in [<code>first</code>,<code>last</code>).<br>
<b>Exception safety:</b> <code>nothrow</code>.<br>
@@ -887,7 +891,7 @@ Sequenced indices
<br>
<p>Revised June 7th 2005</p>
<p>Revised August 24th 2005</p>
<p>&copy; Copyright 2003-2005 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software
+7 -7
View File
@@ -254,13 +254,13 @@ type to <code>Type</code>.<br>
<b>Returns:</b> a reference to the object chained-pointed to by <code>x</code>.
</blockquote>
<code>const Type&amp; operator()(const Type&amp;x)const;</code>
<code>const Type&amp; operator()(const Type&amp; x)const;</code>
<blockquote>
<b>Returns:</b> <code>x</code>.
</blockquote>
<code>Type&amp; operator()(Type &amp;x)const;</code>
<code>Type&amp; operator()(Type&amp; x)const;</code>
<blockquote>
<b>Returns:</b> <code>x</code>.
@@ -356,13 +356,13 @@ type to <code>Type</code>.<br>
<b>Returns:</b> a reference to the object chained-pointed to by <code>x</code>.
</blockquote>
<code>const Type&amp; operator()(const Class&amp;x)const;</code>
<code>const Type&amp; operator()(const Class&amp; x)const;</code>
<blockquote>
<b>Returns:</b> <code>x.*PtrToMember</code>.
</blockquote>
<code>Type&amp; operator()(const Class&amp;x);</code>
<code>Type&amp; operator()(Class&amp; x)const;</code>
<blockquote>
<b>Returns:</b> <code>x.*PtrToMember</code>.
@@ -1013,8 +1013,8 @@ as <i>temporary</i>, i.e. they should not be stored or copied.
<code>Default Constructible</code></a> or
<a href="http://www.sgi.com/tech/stl/Assignable.html"><code>Assignable</code></a>.
Every object of type <code>composite_key_result&lt;CompositeKey></code> is
internally asociated to the <code>CompositeKey</code> from which it is returned
and the object of type <code>CompositeKey::result_type</code> to which the
internally associated to the <code>CompositeKey</code> from which it is returned
and the object of type <code>CompositeKey::value_type</code> to which the
composite key was applied.
</p>
@@ -2012,7 +2012,7 @@ Compiler specifics
<br>
<p>Revised May 30th 2005</p>
<p>Revised September 5th 2005</p>
<p>&copy; Copyright 2003-2005 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software
+10 -6
View File
@@ -159,7 +159,7 @@ two different forms, according to whether a tag list for the index is provided o
<p>
If provided, <code>TagList</code> must be an instantiation of the class template
<a href="#tag"><code>tag</code></a>.
<a href="indices.html#tag"><code>tag</code></a>.
The template arguments are used by the corresponding index implementation,
refer to the <a href="#ord_indices">ordered indices</a> reference section for further
explanations on their acceptable type values.
@@ -262,9 +262,9 @@ requirements for these types of containers.
<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>void</span> <span class=identifier>insert</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=keyword>void</span> <span class=identifier>erase</span><span class=special>(</span><span class=identifier>iterator</span> <span class=identifier>position</span><span class=special>);</span>
<span class=identifier>iterator</span> <span class=identifier>erase</span><span class=special>(</span><span class=identifier>iterator</span> <span class=identifier>position</span><span class=special>);</span>
<span class=identifier>size_type</span> <span class=identifier>erase</span><span class=special>(</span><span class=keyword>const</span> <span class=identifier>key_type</span><span class=special>&amp;</span> <span class=identifier>x</span><span class=special>);</span>
<span class=keyword>void</span> <span class=identifier>erase</span><span class=special>(</span><span class=identifier>iterator</span> <span class=identifier>first</span><span class=special>,</span><span class=identifier>iterator</span> <span class=identifier>last</span><span class=special>);</span>
<span class=identifier>iterator</span> <span class=identifier>erase</span><span class=special>(</span><span class=identifier>iterator</span> <span class=identifier>first</span><span class=special>,</span><span class=identifier>iterator</span> <span class=identifier>last</span><span class=special>);</span>
<span class=keyword>bool</span> <span class=identifier>replace</span><span class=special>(</span><span class=identifier>iterator</span> <span class=identifier>position</span><span class=special>,</span><span class=keyword>const</span> <span class=identifier>value_type</span><span class=special>&amp;</span> <span class=identifier>x</span><span class=special>);</span>
<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>Modifier</span><span class=special>&gt;</span> <span class=keyword>bool</span> <span class=identifier>modify</span><span class=special>(</span><span class=identifier>iterator</span> <span class=identifier>position</span><span class=special>,</span><span class=identifier>Modifier</span> <span class=identifier>mod</span><span class=special>);</span>
@@ -510,12 +510,15 @@ index of the <code>multi_index_container</code> to which this index belongs.
<b>Exception safety:</b> Basic.<br>
</blockquote>
<code>void erase(iterator position);</code>
<code>iterator erase(iterator position);</code>
<blockquote>
<b>Requires:</b> <code>position</code> is a valid dereferenceable iterator
of the index.</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
the one that was deleted, or <code>end()</code>
if no such element exists.<br>
<b>Complexity:</b> <code>O(D(n))</code>.<br>
<b>Exception safety:</b> <code>nothrow</code>.<br>
</blockquote>
@@ -530,12 +533,13 @@ the number of elements deleted.<br>
<b>Exception safety:</b> Basic.<br>
</blockquote>
<code>void erase(iterator first,iterator last);</code>
<code>iterator erase(iterator first,iterator last);</code>
<blockquote>
<b>Requires:</b> [<code>first</code>,<code>last</code>) is a valid
range of the index.<br>
<b>Effects:</b> Deletes the elements in [<code>first</code>,<code>last</code>).<br>
<b>Returns:</b> <code>last</code>.<br>
<b>Complexity:</b> <code>O(log(n) + m*D(n))</code>, where <code>m</code> is
the number of elements in [<code>first</code>,<code>last</code>).<br>
<b>Exception safety:</b> <code>nothrow</code>.<br>
@@ -946,7 +950,7 @@ Hashed indices
<br>
<p>Revised February 7th 2005</p>
<p>Revised August 24th 2005</p>
<p>&copy; Copyright 2003-2005 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software
+3 -2
View File
@@ -145,7 +145,8 @@ like <code>std::list</code>. Elements in a sequenced index are by default
sorted according to their order of insertion: this means that new elements
inserted through a different index of the <code>multi_index_container</code> are appended
to the end of the sequenced index. Additionally, the index allows for free
reordering of elements in the same vein as <code>std::list</code> does.
reordering of elements in the same vein as <code>std::list</code> does. Validity
of iterators and references to elements is preserved in all operations.
</p>
<p>
@@ -878,7 +879,7 @@ Key extraction
<br>
<p>Revised February 7th 2005</p>
<p>Revised August 22nd 2005</p>
<p>&copy; Copyright 2003-2005 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software
+30 -1
View File
@@ -27,9 +27,37 @@ Acknowledgements
<h2>Contents</h2>
<ul>
<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>
</ul>
<h2><a name="boost_1_33_1">Boost 1.33.1 release</a></h2>
<p>
<ul>
<li>For ordered and hashed indices, <code>erase(it)</code> and
<code>erase(first,last)</code> now return an iterator to the element
following those being deleted (previously nothing was returned), in
accordance with the C++ Standard Library
<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">Defect
Report 130</a> and issue 6.19 of TR1
<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1837.pdf">Issues
List</a>.
</li>
<li>Boost.MultiIndex offers the usual guarantees with respect to
multithreading code provided by most STL implementations:
<ol>
<li>Concurrent access to different containers is safe.</li>
<li>Concurrent read-only access to the same container is safe.</li>
</ol>
In previous versions of the library, the latter guarantee was not properly
maintained if the <a href="advanced_topics.html#safe_mode">safe
mode</a> was set. This problem has been fixed now.
</li>
<li>Maintenance fixes.</li>
</ul>
</p>
<h2><a name="boost_1_33">Boost 1.33 release</a></h2>
<p>
@@ -37,6 +65,7 @@ Acknowledgements
<li>Added <a href="advanced_topics.html#hashed_indices">hashed indices</a>,
whose interface is based on the specification for unordered associative
containers by the C++ Standard Library Technical Report (TR1).
</li>
<li>Added <a href="advanced_topics.html#serialization">serialization support</a>
for <a href="../../serialization/index.html">Boost.Serialization</a>.
</li>
@@ -70,7 +99,7 @@ Acknowledgements
<br>
<p>Revised March 3rd 2005</p>
<p>Revised September 5th 2005</p>
<p>&copy; Copyright 2003-2005 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software
+1 -1
View File
@@ -1257,7 +1257,7 @@ is preserved in the face of insertions, even for replace and modify operations.
Appropriate instantiations of <code>multi_index_container</code> can in fact simulate
<code>std::set</code>, <code>std::multiset</code> and (with more limitations)
<code>std::list</code>, as shown in the
<a href="advanced_topics.html#simulate_std_containers">advanced topics</a>
<a href="advanced_topics.html#emulate_std_containers">advanced topics</a>
section. These simulations are as nearly as efficient as the original STL
containers; consult the <a href="reference/index.html">reference</a> for further
information on complexity guarantees and the
@@ -20,6 +20,10 @@
#include <boost/multi_index/safe_mode_errors.hpp>
#include <boost/noncopyable.hpp>
#if defined(BOOST_HAS_THREADS)
#include <boost/detail/lightweight_mutex.hpp>
#endif
namespace boost{
namespace multi_index{
@@ -172,12 +176,20 @@ BOOST_MULTI_INDEX_PRIVATE_IF_MEMBER_TEMPLATE_FRIENDS:
#endif
safe_iterator_base header;
#if defined(BOOST_HAS_THREADS)
boost::detail::lightweight_mutex mutex;
#endif
};
void safe_iterator_base::attach(safe_container_base* cont_)
{
cont=cont_;
if(cont){
#if defined(BOOST_HAS_THREADS)
boost::detail::lightweight_mutex::scoped_lock lock(cont->mutex);
#endif
next=cont->header.next;
cont->header.next=this;
}
@@ -186,6 +198,10 @@ void safe_iterator_base::attach(safe_container_base* cont_)
void safe_iterator_base::detach()
{
if(cont){
#if defined(BOOST_HAS_THREADS)
boost::detail::lightweight_mutex::scoped_lock lock(cont->mutex);
#endif
safe_iterator_base *prev_,*next_;
for(prev_=&cont->header;(next_=prev_->next)!=this;prev_=next_){}
prev_->next=next;
+7 -15
View File
@@ -250,23 +250,14 @@ public:
for(;first!=last;++first)hint=insert(hint,*first);
}
void erase(iterator position)
iterator erase(iterator position)
{
BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
/* MSVC++ 6.0 optimizer on safe mode code chokes if this
* this is not added. Left it for all compilers as it does no
* harm.
*/
position.detach();
#endif
this->final_erase_(static_cast<final_node_type*>(position.get_node()));
this->final_erase_(static_cast<final_node_type*>(position++.get_node()));
return position;
}
size_type erase(key_param_type x)
@@ -277,7 +268,7 @@ public:
iterator it=find(x); /* caveat: relies on find() returning */
if(it!=end()){ /* the first element */
do{
erase(it++);
it=erase(it);
++s;
}while(it!=end()&&eq(x,key(*it)));
}
@@ -285,7 +276,7 @@ public:
return s;
}
void erase(iterator first,iterator last)
iterator erase(iterator first,iterator last)
{
BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
@@ -294,8 +285,9 @@ public:
BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
while(first!=last){
erase(first++);
first=erase(first);
}
return first;
}
bool replace(iterator position,value_param_type x)
+8 -15
View File
@@ -62,6 +62,7 @@
#include <utility>
#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
#include <boost/archive/archive_exception.hpp>
#include <boost/bind.hpp>
#include <boost/multi_index/detail/duplicates_iterator.hpp>
#include <boost/throw_exception.hpp>
@@ -267,23 +268,14 @@ public:
for(;first!=last;++first)hint=insert(hint,*first);
}
void erase(iterator position)
iterator erase(iterator position)
{
BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
/* MSVC++ 6.0 optimizer on safe mode code chokes if this
* this is not added. Left it for all compilers as it does no
* harm.
*/
position.detach();
#endif
this->final_erase_(static_cast<final_node_type*>(position.get_node()));
this->final_erase_(static_cast<final_node_type*>(position++.get_node()));
return position;
}
size_type erase(key_param_type x)
@@ -292,13 +284,13 @@ public:
std::pair<iterator,iterator> p=equal_range(x);
size_type s=0;
while(p.first!=p.second){
erase(p.first++);
p.first=erase(p.first);
++s;
}
return s;
}
void erase(iterator first,iterator last)
iterator erase(iterator first,iterator last)
{
BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
@@ -307,8 +299,9 @@ public:
BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
BOOST_MULTI_INDEX_ORD_INDEX_CHECK_INVARIANT;
while(first!=last){
erase(first++);
first=erase(first);
}
return first;
}
bool replace(iterator position,value_param_type x)
+2 -2
View File
@@ -194,7 +194,7 @@ public:
}
}
BOOST_CATCH(...){
delete_all_nodes_();
clear_();
BOOST_RETHROW;
}
BOOST_CATCH_END
@@ -574,7 +574,7 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
if(!p.second)throw_exception(
archive::archive_exception(
archive::archive_exception::other_exception));
ar.reset_object_address(&(*p.first),&value.get());
ar.reset_object_address(&p.first->value,&value.get());
lm.add(p.first,ar,version);
}
lm.add_track(header(),ar,version);
+6 -6
View File
@@ -50,22 +50,22 @@ void test_modifiers()
es.erase(employee(1,"Joe Jr.",5,2563));
BOOST_CHECK(i2.size()==3&&i3.size()==3);
i1.erase("Judy");
BOOST_CHECK(i1.erase("Judy")==1);
BOOST_CHECK(es.size()==2&&i2.size()==2);
i2.erase(it2);
BOOST_CHECK(i2.erase(it2)->age==64);
BOOST_CHECK(es.size()==1&&i1.size()==1);
i3.pop_front();
BOOST_CHECK(es.size()==0&&i2.size()==0);
es.insert(employee(0,"Joe",31,1123));
i1.erase(i1.begin());
BOOST_CHECK(i1.erase(i1.begin())==i1.end());
BOOST_CHECK(i1.size()==0);
es.insert(employee(0,"Joe",31,1123));
es.insert(employee(1,"Jack",31,5032));
i2.erase(31);
BOOST_CHECK(i2.erase(31)==2);
BOOST_CHECK(i2.size()==0);
i3.push_front(employee(1,"Jack",31,5032));
@@ -88,7 +88,7 @@ void test_modifiers()
i1.insert(ve.begin(),ve.end());
BOOST_CHECK(i2.size()==3);
i4.erase(i4.begin(),i4.end());
BOOST_CHECK(i4.erase(i4.begin(),i4.end())==i4.end());
BOOST_CHECK(es.size()==0);
i2.insert(ve.begin(),ve.end());
@@ -101,7 +101,7 @@ void test_modifiers()
i3.insert(i3.end(),ve.begin(),ve.end());
BOOST_CHECK(es.size()==3);
es.erase(es.begin(),es.end());
BOOST_CHECK(es.erase(es.begin(),es.end())==es.end());
BOOST_CHECK(i2.size()==0);
es.insert(employee(0,"Joe",31,1123));