Boost logo

Boost-Commit :

From: nesotto_at_[hidden]
Date: 2007-10-24 11:02:07


Author: nesotto
Date: 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
New Revision: 40419
URL: http://svn.boost.org/trac/boost/changeset/40419

Log:
newer docs from 1.34
Added:
   trunk/libs/ptr_container/doc/tutorial_example.html (contents, props changed)
Text files modified:
   trunk/libs/ptr_container/doc/Jamfile.v2 | 11 +
   trunk/libs/ptr_container/doc/associative_ptr_container.html | 26 +
   trunk/libs/ptr_container/doc/associative_ptr_container.rst | 44 ++--
   trunk/libs/ptr_container/doc/comp.sh | 11 +
   trunk/libs/ptr_container/doc/comp_all.sh | 11 +
   trunk/libs/ptr_container/doc/comp_assoc_ptr_container.sh | 11 +
   trunk/libs/ptr_container/doc/comp_conventions.sh | 11 +
   trunk/libs/ptr_container/doc/comp_examples.sh | 11 +
   trunk/libs/ptr_container/doc/comp_faq.sh | 11 +
   trunk/libs/ptr_container/doc/comp_guidelines.sh | 11 +
   trunk/libs/ptr_container/doc/comp_headers.sh | 11 +
   trunk/libs/ptr_container/doc/comp_indirect_fun.sh | 11 +
   trunk/libs/ptr_container/doc/comp_ptr_array.sh | 11 +
   trunk/libs/ptr_container/doc/comp_ptr_container.sh | 11 +
   trunk/libs/ptr_container/doc/comp_ptr_deque.sh | 11 +
   trunk/libs/ptr_container/doc/comp_ptr_list.sh | 11 +
   trunk/libs/ptr_container/doc/comp_ptr_map.sh | 11 +
   trunk/libs/ptr_container/doc/comp_ptr_map_adapter.sh | 11 +
   trunk/libs/ptr_container/doc/comp_ptr_multimap.sh | 11 +
   trunk/libs/ptr_container/doc/comp_ptr_multimap_adapter.sh | 11 +
   trunk/libs/ptr_container/doc/comp_ptr_multiset.sh | 11 +
   trunk/libs/ptr_container/doc/comp_ptr_multiset_adapter.sh | 11 +
   trunk/libs/ptr_container/doc/comp_ptr_sequence_adapter.sh | 11 +
   trunk/libs/ptr_container/doc/comp_ptr_set.sh | 11 +
   trunk/libs/ptr_container/doc/comp_ptr_set_adapter.sh | 11 +
   trunk/libs/ptr_container/doc/comp_ptr_vector.sh | 11 +
   trunk/libs/ptr_container/doc/comp_reference.sh | 11 +
   trunk/libs/ptr_container/doc/comp_rever_ptr_container.sh | 11 +
   trunk/libs/ptr_container/doc/comp_tutorial.sh | 11 +
   trunk/libs/ptr_container/doc/conventions.html | 48 ++--
   trunk/libs/ptr_container/doc/conventions.rst | 12 +
   trunk/libs/ptr_container/doc/examples.html | 431 +++++++++++++++++++++++++++++++++++++--
   trunk/libs/ptr_container/doc/examples.rst | 48 +++-
   trunk/libs/ptr_container/doc/faq.html | 42 +-
   trunk/libs/ptr_container/doc/faq.rst | 14
   trunk/libs/ptr_container/doc/guidelines.html | 116 ++++++++++
   trunk/libs/ptr_container/doc/guidelines.rst | 128 +++++++++++
   trunk/libs/ptr_container/doc/headers.html | 12
   trunk/libs/ptr_container/doc/headers.rst | 22 +
   trunk/libs/ptr_container/doc/indirect_fun.html | 4
   trunk/libs/ptr_container/doc/indirect_fun.rst | 8
   trunk/libs/ptr_container/doc/ptr_array.html | 19 +
   trunk/libs/ptr_container/doc/ptr_array.rst | 26 +
   trunk/libs/ptr_container/doc/ptr_container.html | 194 ++++++++++++-----
   trunk/libs/ptr_container/doc/ptr_container.rst | 140 ++++++++++--
   trunk/libs/ptr_container/doc/ptr_deque.html | 18 +
   trunk/libs/ptr_container/doc/ptr_deque.rst | 21 +
   trunk/libs/ptr_container/doc/ptr_list.html | 18 +
   trunk/libs/ptr_container/doc/ptr_list.rst | 22 +
   trunk/libs/ptr_container/doc/ptr_map.html | 25 +
   trunk/libs/ptr_container/doc/ptr_map.rst | 33 +-
   trunk/libs/ptr_container/doc/ptr_map_adapter.html | 61 +++++
   trunk/libs/ptr_container/doc/ptr_map_adapter.rst | 71 +++++
   trunk/libs/ptr_container/doc/ptr_multimap.html | 24 +
   trunk/libs/ptr_container/doc/ptr_multimap.rst | 25 +
   trunk/libs/ptr_container/doc/ptr_multimap_adapter.html | 62 +++++
   trunk/libs/ptr_container/doc/ptr_multimap_adapter.rst | 72 +++++-
   trunk/libs/ptr_container/doc/ptr_multiset.html | 26 +
   trunk/libs/ptr_container/doc/ptr_multiset.rst | 32 ++
   trunk/libs/ptr_container/doc/ptr_multiset_adapter.html | 25 +
   trunk/libs/ptr_container/doc/ptr_multiset_adapter.rst | 30 +
   trunk/libs/ptr_container/doc/ptr_sequence_adapter.html | 75 ++++--
   trunk/libs/ptr_container/doc/ptr_sequence_adapter.rst | 84 ++++---
   trunk/libs/ptr_container/doc/ptr_set.html | 26 +
   trunk/libs/ptr_container/doc/ptr_set.rst | 32 ++
   trunk/libs/ptr_container/doc/ptr_set_adapter.html | 23 +
   trunk/libs/ptr_container/doc/ptr_set_adapter.rst | 26 +
   trunk/libs/ptr_container/doc/ptr_vector.html | 17 +
   trunk/libs/ptr_container/doc/ptr_vector.rst | 25 +
   trunk/libs/ptr_container/doc/reference.html | 299 ++++++++++++++++++++-------
   trunk/libs/ptr_container/doc/reference.rst | 350 ++++++++++++++++++++++---------
   trunk/libs/ptr_container/doc/reversible_ptr_container.html | 72 ++++++
   trunk/libs/ptr_container/doc/reversible_ptr_container.rst | 72 ++++++
   trunk/libs/ptr_container/doc/todo.txt | 83 ++++++-
   trunk/libs/ptr_container/doc/tutorial.html | 77 +++++-
   trunk/libs/ptr_container/doc/tutorial.rst | 91 +++++++-
   76 files changed, 2836 insertions(+), 712 deletions(-)

Modified: trunk/libs/ptr_container/doc/Jamfile.v2
==============================================================================
--- trunk/libs/ptr_container/doc/Jamfile.v2 (original)
+++ trunk/libs/ptr_container/doc/Jamfile.v2 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,3 +1,14 @@
+//
+// Boost.Pointer Container
+//
+// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/ptr_container/
+//
+
 project boost/ptr_container/doc ;
 
 import boostbook : boostbook ;

Modified: trunk/libs/ptr_container/doc/associative_ptr_container.html
==============================================================================
--- trunk/libs/ptr_container/doc/associative_ptr_container.html (original)
+++ trunk/libs/ptr_container/doc/associative_ptr_container.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -292,20 +292,28 @@
 <div class="section">
 <h1><a id="class-associative-ptr-container" name="class-associative-ptr-container">Class <tt class="docutils literal"><span class="pre">associative_ptr_container</span></tt></a></h1>
 <p>This section describes all the common operations for all associative
-pointer containers (in addition to <tt class="docutils literal"><span class="pre">reversible_ptr_container</span></tt>):</p>
+pointer containers (in addition to <tt class="docutils literal"><span class="pre">reversible_ptr_container</span></tt>).</p>
+<p><strong>Hierarchy:</strong></p>
 <ul class="simple">
+<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a><ul>
+<li><tt class="docutils literal"><span class="pre">associative_ptr_container</span></tt><ul>
+<li><a class="reference" href="ptr_set_adapter.html">ptr_set_adapter</a></li>
+<li><a class="reference" href="ptr_multiset_adapter.html">ptr_multiset_adapter</a></li>
 <li><a class="reference" href="ptr_map_adapter.html">ptr_map_adapter</a></li>
-<li><a class="reference" href="ptr_multimap_adapter.html">ptr_multimap_adapter</a></li>
+<li><a class="reference" href="ptr_multimap_adapter.html">ptr_multi_map_adapter</a><ul>
+<li><a class="reference" href="ptr_set.html">ptr_set</a></li>
+<li><a class="reference" href="ptr_multiset.html">ptr_multi_set</a></li>
 <li><a class="reference" href="ptr_map.html">ptr_map</a></li>
 <li><a class="reference" href="ptr_multimap.html">ptr_multimap</a></li>
-<li><a class="reference" href="ptr_set_adapter.html">ptr_set_adapter</a></li>
-<li><a class="reference" href="ptr_multiset.html">ptr_multiset_adapter</a></li>
-<li><a class="reference" href="ptr_set.html">ptr_set</a></li>
-<li><a class="reference" href="ptr_multiset.html">ptr_multiset</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
 </ul>
 <p><strong>See also:</strong></p>
 <ul class="simple">
-<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a></li>
 <li><a class="reference" href="http://www.boost.org/libs/range/doc/utility_class.html#iter_range">iterator_range</a></li>
 </ul>
 <p><strong>Navigate:</strong></p>
@@ -521,11 +529,11 @@
 - Effects: returns the object with key ``key``
 
 - Throws: ``bad_ptr_container_operation`` if the key does not exist -->
-<table class="docutils field-list" frame="void" id="pointer-container-requirements" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/associative_ptr_container.rst
==============================================================================
--- trunk/libs/ptr_container/doc/associative_ptr_container.rst (original)
+++ trunk/libs/ptr_container/doc/associative_ptr_container.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -8,33 +8,28 @@
 -------------------------------------
 
 This section describes all the common operations for all associative
-pointer containers (in addition to ``reversible_ptr_container``):
+pointer containers (in addition to ``reversible_ptr_container``).
 
-- ptr_map_adapter_
-- ptr_multimap_adapter_
-- ptr_map_
-- ptr_multimap_
-- ptr_set_adapter_
-- ptr_multiset_adapter_
-- ptr_set_
-- ptr_multiset_
-
-.. _ptr_map_adapter : ptr_map_adapter.html
-.. _ptr_multimap_adapter: ptr_multimap_adapter.html
-.. _ptr_map: ptr_map.html
-.. _ptr_multimap: ptr_multimap.html
-.. _ptr_set_adapter: ptr_set_adapter.html
-.. _ptr_multiset_adapter: ptr_multiset.html
-.. _ptr_set: ptr_set.html
-.. _ptr_multiset: ptr_multiset.html
+**Hierarchy:**
+
+- `reversible_ptr_container <reversible_ptr_container.html>`_
+
+ - ``associative_ptr_container``
+
+ - `ptr_set_adapter <ptr_set_adapter.html>`_
+ - `ptr_multiset_adapter <ptr_multiset_adapter.html>`_
+ - `ptr_map_adapter <ptr_map_adapter.html>`_
+ - `ptr_multi_map_adapter <ptr_multimap_adapter.html>`_
+
+ - `ptr_set <ptr_set.html>`_
+ - `ptr_multi_set <ptr_multiset.html>`_
+ - `ptr_map <ptr_map.html>`_
+ - `ptr_multimap <ptr_multimap.html>`_
 
 **See also:**
 
-- reversible_ptr_container__
 - `iterator_range <http://www.boost.org/libs/range/doc/utility_class.html#iter_range>`_
 
-__ reversible_ptr_container.html
-
 **Navigate:**
 
 - `home <ptr_container.html>`_
@@ -219,6 +214,11 @@
 
 .. _`pointer container requirements`:
 
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
 
-:copyright: Thorsten Ottosen 2004-2005.
+__ http://www.boost.org/LICENSE_1_0.txt
 

Modified: trunk/libs/ptr_container/doc/comp.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp.sh (original)
+++ trunk/libs/ptr_container/doc/comp.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,3 +1,14 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 sh comp_ptr_container.sh
 sh comp_reversible_ptr_container.sh
 sh comp_ptr_sequence_adapter.sh

Modified: trunk/libs/ptr_container/doc/comp_all.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_all.sh (original)
+++ trunk/libs/ptr_container/doc/comp_all.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,3 +1,14 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 sh comp_ptr_container.sh
 sh comp_reference.sh
 sh comp_faq.sh

Modified: trunk/libs/ptr_container/doc/comp_assoc_ptr_container.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_assoc_ptr_container.sh (original)
+++ trunk/libs/ptr_container/doc/comp_assoc_ptr_container.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py associative_ptr_container.rst > associative_ptr_container.html
 

Modified: trunk/libs/ptr_container/doc/comp_conventions.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_conventions.sh (original)
+++ trunk/libs/ptr_container/doc/comp_conventions.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1 +1,12 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py conventions.rst > conventions.html

Modified: trunk/libs/ptr_container/doc/comp_examples.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_examples.sh (original)
+++ trunk/libs/ptr_container/doc/comp_examples.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py examples.rst > examples.html
 

Modified: trunk/libs/ptr_container/doc/comp_faq.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_faq.sh (original)
+++ trunk/libs/ptr_container/doc/comp_faq.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py faq.rst > faq.html
 

Modified: trunk/libs/ptr_container/doc/comp_guidelines.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_guidelines.sh (original)
+++ trunk/libs/ptr_container/doc/comp_guidelines.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py guidelines.rst > guidelines.html
 

Modified: trunk/libs/ptr_container/doc/comp_headers.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_headers.sh (original)
+++ trunk/libs/ptr_container/doc/comp_headers.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py headers.rst > headers.html
 

Modified: trunk/libs/ptr_container/doc/comp_indirect_fun.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_indirect_fun.sh (original)
+++ trunk/libs/ptr_container/doc/comp_indirect_fun.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py indirect_fun.rst > indirect_fun.html
 

Modified: trunk/libs/ptr_container/doc/comp_ptr_array.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_ptr_array.sh (original)
+++ trunk/libs/ptr_container/doc/comp_ptr_array.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py ptr_array.rst > ptr_array.html
 

Modified: trunk/libs/ptr_container/doc/comp_ptr_container.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_ptr_container.sh (original)
+++ trunk/libs/ptr_container/doc/comp_ptr_container.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py ptr_container.rst > ptr_container.html
 

Modified: trunk/libs/ptr_container/doc/comp_ptr_deque.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_ptr_deque.sh (original)
+++ trunk/libs/ptr_container/doc/comp_ptr_deque.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py ptr_deque.rst > ptr_deque.html
 

Modified: trunk/libs/ptr_container/doc/comp_ptr_list.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_ptr_list.sh (original)
+++ trunk/libs/ptr_container/doc/comp_ptr_list.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py ptr_list.rst > ptr_list.html
 

Modified: trunk/libs/ptr_container/doc/comp_ptr_map.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_ptr_map.sh (original)
+++ trunk/libs/ptr_container/doc/comp_ptr_map.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py ptr_map.rst > ptr_map.html
 

Modified: trunk/libs/ptr_container/doc/comp_ptr_map_adapter.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_ptr_map_adapter.sh (original)
+++ trunk/libs/ptr_container/doc/comp_ptr_map_adapter.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py ptr_map_adapter.rst > ptr_map_adapter.html
 

Modified: trunk/libs/ptr_container/doc/comp_ptr_multimap.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_ptr_multimap.sh (original)
+++ trunk/libs/ptr_container/doc/comp_ptr_multimap.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py ptr_multimap.rst > ptr_multimap.html
 

Modified: trunk/libs/ptr_container/doc/comp_ptr_multimap_adapter.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_ptr_multimap_adapter.sh (original)
+++ trunk/libs/ptr_container/doc/comp_ptr_multimap_adapter.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py ptr_multimap_adapter.rst > ptr_multimap_adapter.html
 

Modified: trunk/libs/ptr_container/doc/comp_ptr_multiset.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_ptr_multiset.sh (original)
+++ trunk/libs/ptr_container/doc/comp_ptr_multiset.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py ptr_multiset.rst > ptr_multiset.html
 

Modified: trunk/libs/ptr_container/doc/comp_ptr_multiset_adapter.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_ptr_multiset_adapter.sh (original)
+++ trunk/libs/ptr_container/doc/comp_ptr_multiset_adapter.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py ptr_multiset_adapter.rst > ptr_multiset_adapter.html
 

Modified: trunk/libs/ptr_container/doc/comp_ptr_sequence_adapter.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_ptr_sequence_adapter.sh (original)
+++ trunk/libs/ptr_container/doc/comp_ptr_sequence_adapter.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py ptr_sequence_adapter.rst > ptr_sequence_adapter.html
 

Modified: trunk/libs/ptr_container/doc/comp_ptr_set.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_ptr_set.sh (original)
+++ trunk/libs/ptr_container/doc/comp_ptr_set.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py ptr_set.rst > ptr_set.html
 

Modified: trunk/libs/ptr_container/doc/comp_ptr_set_adapter.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_ptr_set_adapter.sh (original)
+++ trunk/libs/ptr_container/doc/comp_ptr_set_adapter.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py ptr_set_adapter.rst > ptr_set_adapter.html
 

Modified: trunk/libs/ptr_container/doc/comp_ptr_vector.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_ptr_vector.sh (original)
+++ trunk/libs/ptr_container/doc/comp_ptr_vector.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py ptr_vector.rst > ptr_vector.html
 

Modified: trunk/libs/ptr_container/doc/comp_reference.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_reference.sh (original)
+++ trunk/libs/ptr_container/doc/comp_reference.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1 +1,12 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py reference.rst > reference.html

Modified: trunk/libs/ptr_container/doc/comp_rever_ptr_container.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_rever_ptr_container.sh (original)
+++ trunk/libs/ptr_container/doc/comp_rever_ptr_container.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py reversible_ptr_container.rst > reversible_ptr_container.html
 

Modified: trunk/libs/ptr_container/doc/comp_tutorial.sh
==============================================================================
--- trunk/libs/ptr_container/doc/comp_tutorial.sh (original)
+++ trunk/libs/ptr_container/doc/comp_tutorial.sh 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,2 +1,13 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
+
 rst2html.py tutorial.rst > tutorial.html
 

Modified: trunk/libs/ptr_container/doc/conventions.html
==============================================================================
--- trunk/libs/ptr_container/doc/conventions.html (original)
+++ trunk/libs/ptr_container/doc/conventions.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -295,21 +295,21 @@
 and provides almost the same interface. The new conventions are:</p>
 <div class="contents local topic">
 <ul class="simple">
-<li><a class="reference" href="#null-pointers-are-not-allowed-by-default" id="id3" name="id3">Null pointers are not allowed by default</a></li>
-<li><a class="reference" href="#all-default-iterators-apply-an-extra-layer-of-indirection" id="id4" name="id4">All default iterators apply an extra layer of indirection</a></li>
-<li><a class="reference" href="#all-comparison-operations-are-done-on-the-pointed-to-objects-and-not-at-the-pointer-level" id="id5" name="id5">All comparison operations are done on the pointed to objects and not at the pointer level</a></li>
-<li><a class="reference" href="#the-containers-are-neither-copy-constructible-nor-assignable" id="id6" name="id6">The containers are neither Copy Constructible nor Assignable</a></li>
-<li><a class="reference" href="#stored-elements-are-required-to-be-clonable-for-a-subset-of-the-operations" id="id7" name="id7">Stored elements are required to be Clonable for a subset of the operations</a></li>
-<li><a class="reference" href="#whenever-objects-are-inserted-into-a-container-they-are-cloned-before-insertion" id="id8" name="id8">Whenever objects are inserted into a container, they are cloned before insertion</a></li>
-<li><a class="reference" href="#whenever-pointers-are-inserted-into-a-container-ownership-is-transferred-to-the-container" id="id9" name="id9">Whenever pointers are inserted into a container, ownership is transferred to the container</a></li>
-<li><a class="reference" href="#ownership-can-be-transferred-from-a-container-on-a-per-pointer-basis" id="id10" name="id10">Ownership can be transferred from a container on a per pointer basis</a></li>
-<li><a class="reference" href="#ownership-can-be-transferred-from-a-container-to-another-container-on-a-per-iterator-range-basis" id="id11" name="id11">Ownership can be transferred from a container to another container on a per iterator range basis</a></li>
-<li><a class="reference" href="#a-container-can-be-cheaply-returned-from-functions-either-by-making-a-clone-or-by-giving-up-ownership-of-the-container" id="id12" name="id12">A container can be cheaply returned from functions either by making a clone or by giving up ownership of the container</a></li>
-<li><a class="reference" href="#iterators-are-invalidated-as-in-the-corresponding-standard-container" id="id13" name="id13">Iterators are invalidated as in the corresponding standard container</a></li>
+<li><a class="reference" href="#null-pointers-are-not-allowed-by-default" id="id4" name="id4">Null pointers are not allowed by default</a></li>
+<li><a class="reference" href="#all-default-iterators-apply-an-extra-layer-of-indirection" id="id5" name="id5">All default iterators apply an extra layer of indirection</a></li>
+<li><a class="reference" href="#all-comparison-operations-are-done-on-the-pointed-to-objects-and-not-at-the-pointer-level" id="id6" name="id6">All comparison operations are done on the pointed to objects and not at the pointer level</a></li>
+<li><a class="reference" href="#the-containers-are-neither-copy-constructible-nor-assignable" id="id7" name="id7">The containers are neither Copy Constructible nor Assignable</a></li>
+<li><a class="reference" href="#stored-elements-are-required-to-be-clonable-for-a-subset-of-the-operations" id="id8" name="id8">Stored elements are required to be Clonable for a subset of the operations</a></li>
+<li><a class="reference" href="#whenever-objects-are-inserted-into-a-container-they-are-cloned-before-insertion" id="id9" name="id9">Whenever objects are inserted into a container, they are cloned before insertion</a></li>
+<li><a class="reference" href="#whenever-pointers-are-inserted-into-a-container-ownership-is-transferred-to-the-container" id="id10" name="id10">Whenever pointers are inserted into a container, ownership is transferred to the container</a></li>
+<li><a class="reference" href="#ownership-can-be-transferred-from-a-container-on-a-per-pointer-basis" id="id11" name="id11">Ownership can be transferred from a container on a per pointer basis</a></li>
+<li><a class="reference" href="#ownership-can-be-transferred-from-a-container-to-another-container-on-a-per-iterator-range-basis" id="id12" name="id12">Ownership can be transferred from a container to another container on a per iterator range basis</a></li>
+<li><a class="reference" href="#a-container-can-be-cheaply-returned-from-functions-either-by-making-a-clone-or-by-giving-up-ownership-of-the-container" id="id13" name="id13">A container can be cheaply returned from functions either by making a clone or by giving up ownership of the container</a></li>
+<li><a class="reference" href="#iterators-are-invalidated-as-in-the-corresponding-standard-container" id="id14" name="id14">Iterators are invalidated as in the corresponding standard container</a></li>
 </ul>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id3" id="null-pointers-are-not-allowed-by-default" name="null-pointers-are-not-allowed-by-default">Null pointers are not allowed by default</a></h1>
+<h1><a class="toc-backref" href="#id4" id="null-pointers-are-not-allowed-by-default" name="null-pointers-are-not-allowed-by-default">Null pointers are not allowed by default</a></h1>
 <p>If the user tries to insert the null pointer, the operation will throw a
 <tt class="docutils literal"><span class="pre">bad_pointer</span></tt> exception (see <a class="reference" href="examples.html">Example 1</a>).</p>
 <p>Use <a class="reference" href="reference.html#class-nullable">nullable</a> to allow null pointers.</p>
@@ -325,7 +325,7 @@
 </pre>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id4" id="all-default-iterators-apply-an-extra-layer-of-indirection" name="all-default-iterators-apply-an-extra-layer-of-indirection">All default iterators apply an extra layer of indirection</a></h1>
+<h1><a class="toc-backref" href="#id5" id="all-default-iterators-apply-an-extra-layer-of-indirection" name="all-default-iterators-apply-an-extra-layer-of-indirection">All default iterators apply an extra layer of indirection</a></h1>
 <p>This is done to
 make the containers easier and safer to use. It promotes a kind of
 pointer-less programming and the user of a class needs not worry about
@@ -336,14 +336,14 @@
 stored pointers.</p>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id5" id="all-comparison-operations-are-done-on-the-pointed-to-objects-and-not-at-the-pointer-level" name="all-comparison-operations-are-done-on-the-pointed-to-objects-and-not-at-the-pointer-level">All comparison operations are done on the pointed to objects and not at the pointer level</a></h1>
+<h1><a class="toc-backref" href="#id6" id="all-comparison-operations-are-done-on-the-pointed-to-objects-and-not-at-the-pointer-level" name="all-comparison-operations-are-done-on-the-pointed-to-objects-and-not-at-the-pointer-level">All comparison operations are done on the pointed to objects and not at the pointer level</a></h1>
 <p>For example, in <tt class="docutils literal"><span class="pre">ptr_set&lt;T&gt;</span></tt> the ordering is by default done by
 <tt class="docutils literal"><span class="pre">boost::ptr_less&lt;T&gt;</span></tt> which compares the indirected pointers.
 Similarly, <tt class="docutils literal"><span class="pre">operator==()</span></tt> for <tt class="docutils literal"><span class="pre">container&lt;Foo&gt;</span></tt> compares all objects
 with <tt class="docutils literal"><span class="pre">operator==(const</span> <span class="pre">Foo&amp;,</span> <span class="pre">const</span> <span class="pre">Foo&amp;)</span></tt>.</p>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id6" id="the-containers-are-neither-copy-constructible-nor-assignable" name="the-containers-are-neither-copy-constructible-nor-assignable">The containers are neither Copy Constructible nor Assignable</a></h1>
+<h1><a class="toc-backref" href="#id7" id="the-containers-are-neither-copy-constructible-nor-assignable" name="the-containers-are-neither-copy-constructible-nor-assignable">The containers are neither Copy Constructible nor Assignable</a></h1>
 <p>This is
 because cloning a lot of pointers can be a very expensive operation;
 instead functions are provided to transfer ownership. If a deep-copy is
@@ -358,35 +358,35 @@
 subset of the operations are still workable.</p>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id8" id="whenever-objects-are-inserted-into-a-container-they-are-cloned-before-insertion" name="whenever-objects-are-inserted-into-a-container-they-are-cloned-before-insertion">Whenever objects are inserted into a container, they are cloned before insertion</a></h1>
+<h1><a class="toc-backref" href="#id9" id="whenever-objects-are-inserted-into-a-container-they-are-cloned-before-insertion" name="whenever-objects-are-inserted-into-a-container-they-are-cloned-before-insertion">Whenever objects are inserted into a container, they are cloned before insertion</a></h1>
 <p>This is necessary because all pointer containers take ownerships of stored objects
 (see <a class="reference" href="examples.html">Example 5</a>).</p>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id9" id="whenever-pointers-are-inserted-into-a-container-ownership-is-transferred-to-the-container" name="whenever-pointers-are-inserted-into-a-container-ownership-is-transferred-to-the-container">Whenever pointers are inserted into a container, ownership is transferred to the container</a></h1>
+<h1><a class="toc-backref" href="#id10" id="whenever-pointers-are-inserted-into-a-container-ownership-is-transferred-to-the-container" name="whenever-pointers-are-inserted-into-a-container-ownership-is-transferred-to-the-container">Whenever pointers are inserted into a container, ownership is transferred to the container</a></h1>
 <p>All containers take ownership of the stored pointers and therefore a
 container needs to have its own copies (see <a class="reference" href="examples.html">Example 5</a>).</p>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id10" id="ownership-can-be-transferred-from-a-container-on-a-per-pointer-basis" name="ownership-can-be-transferred-from-a-container-on-a-per-pointer-basis">Ownership can be transferred from a container on a per pointer basis</a></h1>
+<h1><a class="toc-backref" href="#id11" id="ownership-can-be-transferred-from-a-container-on-a-per-pointer-basis" name="ownership-can-be-transferred-from-a-container-on-a-per-pointer-basis">Ownership can be transferred from a container on a per pointer basis</a></h1>
 <p>This can of course also be convenient. Whenever it happens, an
 <tt class="docutils literal"><span class="pre">SmartContainer::auto_type</span></tt> object is used to provide an exception-safe transfer
 (see <a class="reference" href="examples.html">Example 6</a>).</p>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id11" id="ownership-can-be-transferred-from-a-container-to-another-container-on-a-per-iterator-range-basis" name="ownership-can-be-transferred-from-a-container-to-another-container-on-a-per-iterator-range-basis">Ownership can be transferred from a container to another container on a per iterator range basis</a></h1>
+<h1><a class="toc-backref" href="#id12" id="ownership-can-be-transferred-from-a-container-to-another-container-on-a-per-iterator-range-basis" name="ownership-can-be-transferred-from-a-container-to-another-container-on-a-per-iterator-range-basis">Ownership can be transferred from a container to another container on a per iterator range basis</a></h1>
 <p>This makes it possible to exchange data safely between different pointer
 containers without cloning the objects again (see <a class="reference" href="examples.html">Example 7</a>).</p>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id12" id="a-container-can-be-cheaply-returned-from-functions-either-by-making-a-clone-or-by-giving-up-ownership-of-the-container" name="a-container-can-be-cheaply-returned-from-functions-either-by-making-a-clone-or-by-giving-up-ownership-of-the-container">A container can be cheaply returned from functions either by making a clone or by giving up ownership of the container</a></h1>
+<h1><a class="toc-backref" href="#id13" id="a-container-can-be-cheaply-returned-from-functions-either-by-making-a-clone-or-by-giving-up-ownership-of-the-container" name="a-container-can-be-cheaply-returned-from-functions-either-by-making-a-clone-or-by-giving-up-ownership-of-the-container">A container can be cheaply returned from functions either by making a clone or by giving up ownership of the container</a></h1>
 <p>Two special member functions, <tt class="docutils literal"><span class="pre">clone()</span></tt> and <tt class="docutils literal"><span class="pre">release()</span></tt>, both return an
 <tt class="docutils literal"><span class="pre">auto_ptr&lt;SmartContainer&gt;</span></tt> which can be assigned to another pointer container. This
 effectively reduces the cost of returning a container to one
 heap-allocation plus a call to <tt class="docutils literal"><span class="pre">swap()</span></tt> (see <a class="reference" href="examples.html">Example 3</a>).</p>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id13" id="iterators-are-invalidated-as-in-the-corresponding-standard-container" name="iterators-are-invalidated-as-in-the-corresponding-standard-container">Iterators are invalidated as in the corresponding standard container</a></h1>
+<h1><a class="toc-backref" href="#id14" id="iterators-are-invalidated-as-in-the-corresponding-standard-container" name="iterators-are-invalidated-as-in-the-corresponding-standard-container">Iterators are invalidated as in the corresponding standard container</a></h1>
 <p>Because the containers in this library wrap standard containers, the
 rules for invalidation of iterators are the same as the rules
 of the corresponding standard container.</p>
@@ -394,16 +394,16 @@
 insertion and deletion only invalidates the deleted
 element and elements following it; all elements before the inserted/deleted
 element remain valid.</p>
-<p><strong>Navigate:</strong></p>
+<hr><p><strong>Navigate:</strong></p>
 <ul class="simple">
 <li><a class="reference" href="ptr_container.html">home</a></li>
 <li><a class="reference" href="reference.html">reference</a></li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/conventions.rst
==============================================================================
--- trunk/libs/ptr_container/doc/conventions.rst (original)
+++ trunk/libs/ptr_container/doc/conventions.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -113,11 +113,21 @@
 element and elements following it; all elements before the inserted/deleted
 element remain valid.
 
+.. raw:: html
+
+ <hr>
 
 **Navigate:**
 
 - `home <ptr_container.html>`_
 - `reference <reference.html>`_
 
-:copyright: Thorsten Ottosen 2004-2005.
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
+
 

Modified: trunk/libs/ptr_container/doc/examples.html
==============================================================================
--- trunk/libs/ptr_container/doc/examples.html (original)
+++ trunk/libs/ptr_container/doc/examples.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -293,26 +293,29 @@
 <p>Some examples are given here and in the accompanying test files:</p>
 <div class="contents local topic">
 <ul class="simple">
-<li><a class="reference" href="#null-pointers-cannot-be-stored-in-the-containers" id="id1" name="id1">1. Null pointers cannot be stored in the containers</a></li>
-<li><a class="reference" href="#iterators-and-other-operations-return-indirected-values" id="id2" name="id2">2. Iterators and other operations return indirected values</a></li>
-<li><a class="reference" href="#copy-semantics-of-pointer-containers" id="id3" name="id3">3. Copy-semantics of pointer containers</a></li>
-<li><a class="reference" href="#making-a-non-copyable-type-clonable" id="id4" name="id4">4. Making a non-copyable type Clonable</a></li>
-<li><a class="reference" href="#objects-are-cloned-before-insertion-inserted-pointers-are-owned-by-the-container" id="id5" name="id5">5. Objects are cloned before insertion, inserted pointers are owned by the container</a></li>
-<li><a class="reference" href="#transferring-ownership-of-a-single-element" id="id6" name="id6">6. Transferring ownership of a single element</a></li>
-<li><a class="reference" href="#transferring-ownership-of-pointers-between-different-pointer-containers" id="id7" name="id7">7. Transferring ownership of pointers between different pointer containers</a></li>
-<li><a class="reference" href="#selected-test-files" id="id8" name="id8">8. Selected test files</a></li>
+<li><a class="reference" href="#null-pointers-cannot-be-stored-in-the-containers" id="id2" name="id2">1. Null pointers cannot be stored in the containers</a></li>
+<li><a class="reference" href="#iterators-and-other-operations-return-indirected-values" id="id3" name="id3">2. Iterators and other operations return indirected values</a></li>
+<li><a class="reference" href="#copy-semantics-of-pointer-containers" id="id4" name="id4">3. Copy-semantics of pointer containers</a></li>
+<li><a class="reference" href="#making-a-non-copyable-type-clonable" id="id5" name="id5">4. Making a non-copyable type Clonable</a></li>
+<li><a class="reference" href="#objects-are-cloned-before-insertion-inserted-pointers-are-owned-by-the-container" id="id6" name="id6">5. Objects are cloned before insertion, inserted pointers are owned by the container</a></li>
+<li><a class="reference" href="#transferring-ownership-of-a-single-element" id="id7" name="id7">6. Transferring ownership of a single element</a></li>
+<li><a class="reference" href="#transferring-ownership-of-pointers-between-different-pointer-containers" id="id8" name="id8">7. Transferring ownership of pointers between different pointer containers</a></li>
+<li><a class="reference" href="#selected-test-files" id="id9" name="id9">8. Selected test files</a></li>
+<li><a class="reference" href="#a-large-example" id="id10" name="id10">9. A large example</a></li>
 </ul>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id1" id="null-pointers-cannot-be-stored-in-the-containers" name="null-pointers-cannot-be-stored-in-the-containers"><span id="example-1"></span>1. Null pointers cannot be stored in the containers</a></h1>
+<h1><a class="toc-backref" href="#id2" id="null-pointers-cannot-be-stored-in-the-containers" name="null-pointers-cannot-be-stored-in-the-containers"><span id="example-1"></span>1. Null pointers cannot be stored in the containers</a></h1>
 <pre class="literal-block">
 my_container.push_back( 0 ); // throws bad_ptr
 my_container.replace( an_iterator, 0 ); // throws bad_ptr
-my_container.insert( an_iterator, 0 ); // throws bad_ptr
+my_container.insert( an_iterator, 0 ); // throws bad_ptr
+std::auto_ptr&lt;T&gt; p( 0 );
+my_container.push_back( p ); // throws bad_ptr
 </pre>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id2" id="iterators-and-other-operations-return-indirected-values" name="iterators-and-other-operations-return-indirected-values"><span id="example-2"></span>2. Iterators and other operations return indirected values</a></h1>
+<h1><a class="toc-backref" href="#id3" id="iterators-and-other-operations-return-indirected-values" name="iterators-and-other-operations-return-indirected-values"><span id="example-2"></span>2. Iterators and other operations return indirected values</a></h1>
 <pre class="literal-block">
 ptr_vector&lt;X&gt; pvec;
 std::vector&lt;X*&gt; vec;
@@ -325,7 +328,7 @@
 </pre>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id3" id="copy-semantics-of-pointer-containers" name="copy-semantics-of-pointer-containers"><span id="example-3"></span>3. Copy-semantics of pointer containers</a></h1>
+<h1><a class="toc-backref" href="#id4" id="copy-semantics-of-pointer-containers" name="copy-semantics-of-pointer-containers"><span id="example-3"></span>3. Copy-semantics of pointer containers</a></h1>
 <pre class="literal-block">
 ptr_vector&lt;T&gt; vec1;
 ...
@@ -337,12 +340,12 @@
 </pre>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id4" id="making-a-non-copyable-type-clonable" name="making-a-non-copyable-type-clonable"><span id="example-4"></span>4. Making a non-copyable type Clonable</a></h1>
+<h1><a class="toc-backref" href="#id5" id="making-a-non-copyable-type-clonable" name="making-a-non-copyable-type-clonable"><span id="example-4"></span>4. Making a non-copyable type Clonable</a></h1>
 <pre class="literal-block">
  // a class that has no normal copy semantics
 class X : boost::noncopyable { public: X* clone() const; ... };
                                                                    
-// this will be found by the library by argument dependent lookup
+// this will be found by the library by argument dependent lookup (ADL)
 X* new_clone( const X&amp; x )
 { return x.clone(); }
                                                                    
@@ -354,19 +357,21 @@
 </pre>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id5" id="objects-are-cloned-before-insertion-inserted-pointers-are-owned-by-the-container" name="objects-are-cloned-before-insertion-inserted-pointers-are-owned-by-the-container"><span id="example-5"></span>5. Objects are cloned before insertion, inserted pointers are owned by the container</a></h1>
+<h1><a class="toc-backref" href="#id6" id="objects-are-cloned-before-insertion-inserted-pointers-are-owned-by-the-container" name="objects-are-cloned-before-insertion-inserted-pointers-are-owned-by-the-container"><span id="example-5"></span>5. Objects are cloned before insertion, inserted pointers are owned by the container</a></h1>
 <pre class="literal-block">
 class X { ... }; // assume 'X' is Clonable
 X x; // and 'X' can be stack-allocated
 ptr_list&lt;X&gt; list;
-list.push_back( x ); // clone 'x' and then insert the resulting pointer
-list.push_back( new_clone( x ); // do it manually
+list.push_back( new_clone( x ) ); // insert a clone
 list.push_back( new X ); // always give the pointer directly to the container to avoid leaks
 list.push_back( &amp;x ); // don't do this!!!
+std::auto_ptr&lt;X&gt; p( new X );
+list.push_back( p ); // give up ownership
+BOOST_ASSERT( p.get() == 0 );
 </pre>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id6" id="transferring-ownership-of-a-single-element" name="transferring-ownership-of-a-single-element"><span id="example-6"></span>6. Transferring ownership of a single element</a></h1>
+<h1><a class="toc-backref" href="#id7" id="transferring-ownership-of-a-single-element" name="transferring-ownership-of-a-single-element"><span id="example-6"></span>6. Transferring ownership of a single element</a></h1>
 <pre class="literal-block">
 ptr_deque&lt;T&gt; deq;
 typedef ptr_deque&lt;T&gt;::auto_type auto_type;
@@ -376,10 +381,12 @@
 auto_type ptr = deq.release_back(); // remove back element from container and give up ownership
 auto_type ptr2 = deq.release( deq.begin() + 2 ); // use an iterator to determine the element to release
 ptr = deq.release_front(); // supported for 'ptr_list' and 'ptr_deque'
+
+deq.push_back( ptr.release() ); // give ownership back to the container
 </pre>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id7" id="transferring-ownership-of-pointers-between-different-pointer-containers" name="transferring-ownership-of-pointers-between-different-pointer-containers"><span id="example-7"></span>7. Transferring ownership of pointers between different pointer containers</a></h1>
+<h1><a class="toc-backref" href="#id8" id="transferring-ownership-of-pointers-between-different-pointer-containers" name="transferring-ownership-of-pointers-between-different-pointer-containers"><span id="example-7"></span>7. Transferring ownership of pointers between different pointer containers</a></h1>
 <pre class="literal-block">
 ptr_list&lt;X&gt; list; ptr_vector&lt;X&gt; vec;
 ...
@@ -389,9 +396,10 @@
 list.transfer( list.begin(), vec.begin(), vec ); // make the first element of 'vec' the first element of 'list'
 vec.transfer( vec.end(), list.begin(), list.end(), list ); // put all the lists element into the vector
 </pre>
+<p>We can also transfer objects from <tt class="docutils literal"><span class="pre">ptr_container&lt;Derived&gt;</span></tt> to <tt class="docutils literal"><span class="pre">ptr_container&lt;Base</span></tt> without any problems.</p>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id8" id="selected-test-files" name="selected-test-files"><span id="example-8"></span>8. Selected test files</a></h1>
+<h1><a class="toc-backref" href="#id9" id="selected-test-files" name="selected-test-files"><span id="example-8"></span>8. Selected test files</a></h1>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
@@ -401,7 +409,7 @@
 </tr>
 <tr class="field"><th class="field-name" colspan="2"><a class="reference" href="../test/simple_test.cpp">simple_test.cpp</a>:</th></tr>
 <tr><td>&nbsp;</td><td class="field-body">Shows how the usage of pointer container compares with a
-container of pointer pointers</td>
+container of smart pointers</td>
 </tr>
 <tr class="field"><th class="field-name" colspan="2"><a class="reference" href="../test/view_example.cpp">view_example.cpp</a>:</th></tr>
 <tr><td>&nbsp;</td><td class="field-body">Shows how to use a pointer container as a view into other container</td>
@@ -412,16 +420,377 @@
 </tr>
 </tbody>
 </table>
-<!-- 9. A large example
-++++++++++++++++++
+</div>
+<div class="section">
+<h1><a class="toc-backref" href="#id10" id="a-large-example" name="a-large-example">9. A large example</a></h1>
+<p>This examples shows many of the most common
+features at work. The example provide lots of comments.</p>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> </title>
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
 
-This examples shows many of the most common
-features at work.
+<body>
+ <pre><span class=comment>//
+// Boost.Pointer Container
+//
+// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/ptr_container/
+//
 
-.. raw:: html
- :file: tut1.html
+//
+// This example is intended to get you started.
+// Notice how the smart container
+//
+// 1. takes ownership of objects
+// 2. transfers ownership
+// 3. applies indirection to iterators
+// 4. clones objects from other smart containers
+//
+
+//
+// First we select which container to use.
+//</span>
+<span class=preprocessor>#include</span> <span class=special>&lt;</span><span class=identifier>boost</span><span class=special>/</span><span class=identifier>ptr_container</span><span class=special>/</span><span class=identifier>ptr_deque</span><span class=special>.</span><span class=identifier>hpp</span><span class=special>&gt;</span>
+
+<span class=comment>//
+// we need these later in the example
+//</span>
+<span class=preprocessor>#include</span> <span class=special>&lt;</span><span class=identifier>boost</span><span class=special>/</span><span class=identifier>assert</span><span class=special>.</span><span class=identifier>hpp</span><span class=special>&gt;</span>
+<span class=preprocessor>#include</span> <span class=special>&lt;</span><span class=identifier>string</span><span class=special>&gt;</span>
+<span class=preprocessor>#include</span> <span class=special>&lt;</span><span class=identifier>exception</span><span class=special>&gt;</span>
+
+
+<span class=comment>//
+// Then we define a small polymorphic class
+// hierarchy.
+//</span>
+
+<span class=keyword>class</span> <span class=identifier>animal</span> <span class=special>:</span> <span class=identifier>boost</span><span class=special>::</span><span class=identifier>noncopyable</span>
+<span class=special>{</span>
+ <span class=keyword>virtual</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>do_speak</span><span class=special>()</span> <span class=keyword>const</span> <span class=special>=</span> <span class=number>0</span><span class=special>;</span>
+ <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>name_</span><span class=special>;</span>
+
+<span class=keyword>protected</span><span class=special>:</span>
+ <span class=comment>//
+ // Animals cannot be copied...
+ //</span>
+ <span class=identifier>animal</span><span class=special>(</span> <span class=keyword>const</span> <span class=identifier>animal</span><span class=special>&amp;</span> <span class=identifier>r</span> <span class=special>)</span> <span class=special>:</span> <span class=identifier>name_</span><span class=special>(</span> <span class=identifier>r</span><span class=special>.</span><span class=identifier>name_</span> <span class=special>)</span> <span class=special>{</span> <span class=special>}</span>
+ <span class=keyword>void</span> <span class=keyword>operator</span><span class=special>=(</span> <span class=keyword>const</span> <span class=identifier>animal</span><span class=special>&amp;</span> <span class=special>);</span>
+
+<span class=keyword>private</span><span class=special>:</span>
+ <span class=comment>//
+ // ...but due to advances in genetics, we can clone them!
+ //</span>
+
+ <span class=keyword>virtual</span> <span class=identifier>animal</span><span class=special>*</span> <span class=identifier>do_clone</span><span class=special>()</span> <span class=keyword>const</span> <span class=special>=</span> <span class=number>0</span><span class=special>;</span>
+
+<span class=keyword>public</span><span class=special>:</span>
+ <span class=identifier>animal</span><span class=special>(</span> <span class=keyword>const</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span><span class=special>&amp;</span> <span class=identifier>name</span> <span class=special>)</span> <span class=special>:</span> <span class=identifier>name_</span><span class=special>(</span><span class=identifier>name</span><span class=special>)</span> <span class=special>{</span> <span class=special>}</span>
+ <span class=keyword>virtual</span> <span class=special>~</span><span class=identifier>animal</span><span class=special>()</span> <span class=keyword>throw</span><span class=special>()</span> <span class=special>{</span> <span class=special>}</span>
+
+ <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>speak</span><span class=special>()</span> <span class=keyword>const</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>do_speak</span><span class=special>();</span>
+ <span class=special>}</span>
+
+ <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>name</span><span class=special>()</span> <span class=keyword>const</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>name_</span><span class=special>;</span>
+ <span class=special>}</span>
+
+ <span class=identifier>animal</span><span class=special>*</span> <span class=identifier>clone</span><span class=special>()</span> <span class=keyword>const</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>do_clone</span><span class=special>();</span>
+ <span class=special>}</span>
+<span class=special>};</span>
+
+<span class=comment>//
+// An animal is still not Clonable. We need this last hook.
+//
+// Notice that we pass the animal by const reference
+// and return by pointer.
+//</span>
+
+<span class=identifier>animal</span><span class=special>*</span> <span class=identifier>new_clone</span><span class=special>(</span> <span class=keyword>const</span> <span class=identifier>animal</span><span class=special>&amp;</span> <span class=identifier>a</span> <span class=special>)</span>
+<span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>a</span><span class=special>.</span><span class=identifier>clone</span><span class=special>();</span>
+<span class=special>}</span>
+
+<span class=comment>//
+// We do not need to define 'delete_clone()' since
+// since the default is to call the default 'operator delete()'.
+//</span>
+
+<span class=keyword>const</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>muuuh</span> <span class=special>=</span> <span class=string>&quot;Muuuh!&quot;</span><span class=special>;</span>
+<span class=keyword>const</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>oiink</span> <span class=special>=</span> <span class=string>&quot;Oiiink&quot;</span><span class=special>;</span>
+
+<span class=keyword>class</span> <span class=identifier>cow</span> <span class=special>:</span> <span class=keyword>public</span> <span class=identifier>animal</span>
+<span class=special>{</span>
+ <span class=keyword>virtual</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>do_speak</span><span class=special>()</span> <span class=keyword>const</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>muuuh</span><span class=special>;</span>
+ <span class=special>}</span>
+
+ <span class=keyword>virtual</span> <span class=identifier>animal</span><span class=special>*</span> <span class=identifier>do_clone</span><span class=special>()</span> <span class=keyword>const</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=keyword>new</span> <span class=identifier>cow</span><span class=special>(</span> <span class=special>*</span><span class=keyword>this</span> <span class=special>);</span>
+ <span class=special>}</span>
+
+<span class=keyword>public</span><span class=special>:</span>
+ <span class=identifier>cow</span><span class=special>(</span> <span class=keyword>const</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span><span class=special>&amp;</span> <span class=identifier>name</span> <span class=special>)</span> <span class=special>:</span> <span class=identifier>animal</span><span class=special>(</span><span class=identifier>name</span><span class=special>)</span> <span class=special>{</span> <span class=special>}</span>
+<span class=special>};</span>
+
+<span class=keyword>class</span> <span class=identifier>pig</span> <span class=special>:</span> <span class=keyword>public</span> <span class=identifier>animal</span>
+<span class=special>{</span>
+ <span class=keyword>virtual</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>do_speak</span><span class=special>()</span> <span class=keyword>const</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>oiink</span><span class=special>;</span>
+ <span class=special>}</span>
 
-10. Changing the Clone Allocator
+ <span class=keyword>virtual</span> <span class=identifier>animal</span><span class=special>*</span> <span class=identifier>do_clone</span><span class=special>()</span> <span class=keyword>const</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=keyword>new</span> <span class=identifier>pig</span><span class=special>(</span> <span class=special>*</span><span class=keyword>this</span> <span class=special>);</span>
+ <span class=special>}</span>
+
+<span class=keyword>public</span><span class=special>:</span>
+ <span class=identifier>pig</span><span class=special>(</span> <span class=keyword>const</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span><span class=special>&amp;</span> <span class=identifier>name</span> <span class=special>)</span> <span class=special>:</span> <span class=identifier>animal</span><span class=special>(</span><span class=identifier>name</span><span class=special>)</span> <span class=special>{</span> <span class=special>}</span>
+<span class=special>};</span>
+
+<span class=comment>//
+// Then we, of course, need a place to put all
+// those animals.
+//</span>
+
+<span class=keyword>class</span> <span class=identifier>farm</span>
+<span class=special>{</span>
+ <span class=comment>//
+ // This is where the smart containers are handy
+ //</span>
+ <span class=keyword>typedef</span> <span class=identifier>boost</span><span class=special>::</span><span class=identifier>ptr_deque</span><span class=special>&lt;</span><span class=identifier>animal</span><span class=special>&gt;</span> <span class=identifier>barn_type</span><span class=special>;</span>
+ <span class=identifier>barn_type</span> <span class=identifier>barn</span><span class=special>;</span>
+
+ <span class=comment>//
+ // An error type
+ //</span>
+ <span class=keyword>struct</span> <span class=identifier>farm_trouble</span> <span class=special>:</span> <span class=keyword>public</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>exception</span> <span class=special>{</span> <span class=special>};</span>
+
+<span class=keyword>public</span><span class=special>:</span>
+ <span class=comment>//
+ // We would like to make it possible to
+ // iterate over the animals in the farm
+ //</span>
+ <span class=keyword>typedef</span> <span class=identifier>barn_type</span><span class=special>::</span><span class=identifier>iterator</span> <span class=identifier>animal_iterator</span><span class=special>;</span>
+
+ <span class=comment>//
+ // We also need to count the farm's size...
+ //</span>
+ <span class=keyword>typedef</span> <span class=identifier>barn_type</span><span class=special>::</span><span class=identifier>size_type</span> <span class=identifier>size_type</span><span class=special>;</span>
+
+ <span class=comment>//
+ // And we also want to transfer an animal
+ // safely around. The easiest way to think
+ // about '::auto_type' is to imagine a simplified
+ // 'std::auto_ptr&lt;T&gt;' ... this means you can expect
+ //
+ // T* operator-&gt;()
+ // T* release()
+ // deleting destructor
+ //
+ // but not more.
+ //</span>
+ <span class=keyword>typedef</span> <span class=identifier>barn_type</span><span class=special>::</span><span class=identifier>auto_type</span> <span class=identifier>animal_transport</span><span class=special>;</span>
+
+ <span class=comment>//
+ // Create an empty farm.
+ //</span>
+ <span class=identifier>farm</span><span class=special>()</span> <span class=special>{</span> <span class=special>}</span>
+
+ <span class=comment>//
+ // We need a constructor that can make a new
+ // farm by cloning a range of animals.
+ //</span>
+ <span class=identifier>farm</span><span class=special>(</span> <span class=identifier>animal_iterator</span> <span class=identifier>begin</span><span class=special>,</span> <span class=identifier>animal_iterator</span> <span class=identifier>end</span> <span class=special>)</span>
+ <span class=special>:</span>
+ <span class=comment>//
+ // Objects are always cloned before insertion
+ // unless we explicitly add a pointer or
+ // use 'release()'. Therefore we actually
+ // clone all animals in the range
+ //</span>
+ <span class=identifier>barn</span><span class=special>(</span> <span class=identifier>begin</span><span class=special>,</span> <span class=identifier>end</span> <span class=special>)</span> <span class=special>{</span> <span class=special>}</span>
+
+ <span class=comment>//
+ // ... so we need some other function too
+ //</span>
+
+ <span class=identifier>animal_iterator</span> <span class=identifier>begin</span><span class=special>()</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>barn</span><span class=special>.</span><span class=identifier>begin</span><span class=special>();</span>
+ <span class=special>}</span>
+
+ <span class=identifier>animal_iterator</span> <span class=identifier>end</span><span class=special>()</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>barn</span><span class=special>.</span><span class=identifier>end</span><span class=special>();</span>
+ <span class=special>}</span>
+
+ <span class=comment>//
+ // Here it is quite ok to have an 'animal*' argument.
+ // The smart container will handle all ownership
+ // issues.
+ //</span>
+ <span class=keyword>void</span> <span class=identifier>buy_animal</span><span class=special>(</span> <span class=identifier>animal</span><span class=special>*</span> <span class=identifier>a</span> <span class=special>)</span>
+ <span class=special>{</span>
+ <span class=identifier>barn</span><span class=special>.</span><span class=identifier>push_back</span><span class=special>(</span> <span class=identifier>a</span> <span class=special>);</span>
+ <span class=special>}</span>
+
+ <span class=comment>//
+ // The farm can also be in economical trouble and
+ // therefore be in the need to sell animals.
+ //</span>
+ <span class=identifier>animal_transport</span> <span class=identifier>sell_animal</span><span class=special>(</span> <span class=identifier>animal_iterator</span> <span class=identifier>to_sell</span> <span class=special>)</span>
+ <span class=special>{</span>
+ <span class=keyword>if</span><span class=special>(</span> <span class=identifier>to_sell</span> <span class=special>==</span> <span class=identifier>end</span><span class=special>()</span> <span class=special>)</span>
+ <span class=keyword>throw</span> <span class=identifier>farm_trouble</span><span class=special>();</span>
+
+ <span class=comment>//
+ // Here we remove the animal from the barn,
+ // but the animal is not deleted yet...it's
+ // up to the buyer to decide what
+ // to do with it.
+ //</span>
+ <span class=keyword>return</span> <span class=identifier>barn</span><span class=special>.</span><span class=identifier>release</span><span class=special>(</span> <span class=identifier>to_sell</span> <span class=special>);</span>
+ <span class=special>}</span>
+
+ <span class=comment>//
+ // How big a farm do we have?
+ //</span>
+ <span class=identifier>size_type</span> <span class=identifier>size</span><span class=special>()</span> <span class=keyword>const</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>barn</span><span class=special>.</span><span class=identifier>size</span><span class=special>();</span>
+ <span class=special>}</span>
+
+ <span class=comment>//
+ // If things are bad, we might choose to sell all animals :-(
+ //</span>
+ <span class=identifier>std</span><span class=special>::</span><span class=identifier>auto_ptr</span><span class=special>&lt;</span><span class=identifier>barn_type</span><span class=special>&gt;</span> <span class=identifier>sell_farm</span><span class=special>()</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>barn</span><span class=special>.</span><span class=identifier>release</span><span class=special>();</span>
+ <span class=special>}</span>
+
+ <span class=comment>//
+ // However, if things are good, we might buy somebody
+ // else's farm :-)
+ //</span>
+
+ <span class=keyword>void</span> <span class=identifier>buy_farm</span><span class=special>(</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>auto_ptr</span><span class=special>&lt;</span><span class=identifier>barn_type</span><span class=special>&gt;</span> <span class=identifier>other</span> <span class=special>)</span>
+ <span class=special>{</span>
+ <span class=comment>//
+ // This line inserts all the animals from 'other'
+ // and is guaranteed either to succeed or to have no
+ // effect
+ //</span>
+ <span class=identifier>barn</span><span class=special>.</span><span class=identifier>transfer</span><span class=special>(</span> <span class=identifier>barn</span><span class=special>.</span><span class=identifier>end</span><span class=special>(),</span> <span class=comment>// insert new animals at the end</span>
+ <span class=special>*</span><span class=identifier>other</span> <span class=special>);</span> <span class=comment>// we want to transfer all animals,
+ // so we use the whole container as argument
+ //
+ // You might think you would have to do
+ //
+ // other.release();
+ //
+ // but '*other' is empty and can go out of scope as it wants
+ //</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>other</span><span class=special>-&gt;</span><span class=identifier>empty</span><span class=special>()</span> <span class=special>);</span>
+ <span class=special>}</span>
+
+<span class=special>};</span> <span class=comment>// class 'farm'.</span>
+
+<span class=keyword>int</span> <span class=identifier>main</span><span class=special>()</span>
+<span class=special>{</span>
+ <span class=comment>//
+ // First we make a farm
+ //</span>
+ <span class=identifier>farm</span> <span class=identifier>animal_farm</span><span class=special>;</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>size</span><span class=special>()</span> <span class=special>==</span> <span class=number>0u</span> <span class=special>);</span>
+
+ <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>buy_animal</span><span class=special>(</span> <span class=keyword>new</span> <span class=identifier>pig</span><span class=special>(</span><span class=string>&quot;Betty&quot;</span><span class=special>)</span> <span class=special>);</span>
+ <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>buy_animal</span><span class=special>(</span> <span class=keyword>new</span> <span class=identifier>pig</span><span class=special>(</span><span class=string>&quot;Benny&quot;</span><span class=special>)</span> <span class=special>);</span>
+ <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>buy_animal</span><span class=special>(</span> <span class=keyword>new</span> <span class=identifier>pig</span><span class=special>(</span><span class=string>&quot;Jeltzin&quot;</span><span class=special>)</span> <span class=special>);</span>
+ <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>buy_animal</span><span class=special>(</span> <span class=keyword>new</span> <span class=identifier>cow</span><span class=special>(</span><span class=string>&quot;Hanz&quot;</span><span class=special>)</span> <span class=special>);</span>
+ <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>buy_animal</span><span class=special>(</span> <span class=keyword>new</span> <span class=identifier>cow</span><span class=special>(</span><span class=string>&quot;Mary&quot;</span><span class=special>)</span> <span class=special>);</span>
+ <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>buy_animal</span><span class=special>(</span> <span class=keyword>new</span> <span class=identifier>cow</span><span class=special>(</span><span class=string>&quot;Frederik&quot;</span><span class=special>)</span> <span class=special>);</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>size</span><span class=special>()</span> <span class=special>==</span> <span class=number>6u</span> <span class=special>);</span>
+
+ <span class=comment>//
+ // Then we make another farm...it will actually contain
+ // a clone of the other farm.
+ //</span>
+ <span class=identifier>farm</span> <span class=identifier>new_farm</span><span class=special>(</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>begin</span><span class=special>(),</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>end</span><span class=special>()</span> <span class=special>);</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>new_farm</span><span class=special>.</span><span class=identifier>size</span><span class=special>()</span> <span class=special>==</span> <span class=number>6u</span> <span class=special>);</span>
+
+ <span class=comment>//
+ // Is it really clones in the new farm?
+ //</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>new_farm</span><span class=special>.</span><span class=identifier>begin</span><span class=special>()-&gt;</span><span class=identifier>name</span><span class=special>()</span> <span class=special>==</span> <span class=string>&quot;Betty&quot;</span> <span class=special>);</span>
+
+ <span class=comment>//
+ // Then we search for an animal, Mary (the Crown Princess of Denmark),
+ // because we would like to buy her ...
+ //</span>
+ <span class=keyword>typedef</span> <span class=identifier>farm</span><span class=special>::</span><span class=identifier>animal_iterator</span> <span class=identifier>iterator</span><span class=special>;</span>
+ <span class=identifier>iterator</span> <span class=identifier>to_sell</span><span class=special>;</span>
+ <span class=keyword>for</span><span class=special>(</span> <span class=identifier>iterator</span> <span class=identifier>i</span> <span class=special>=</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>begin</span><span class=special>(),</span>
+ <span class=identifier>end</span> <span class=special>=</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>end</span><span class=special>();</span>
+ <span class=identifier>i</span> <span class=special>!=</span> <span class=identifier>end</span><span class=special>;</span> <span class=special>++</span><span class=identifier>i</span> <span class=special>)</span>
+ <span class=special>{</span>
+ <span class=keyword>if</span><span class=special>(</span> <span class=identifier>i</span><span class=special>-&gt;</span><span class=identifier>name</span><span class=special>()</span> <span class=special>==</span> <span class=string>&quot;Mary&quot;</span> <span class=special>)</span>
+ <span class=special>{</span>
+ <span class=identifier>to_sell</span> <span class=special>=</span> <span class=identifier>i</span><span class=special>;</span>
+ <span class=keyword>break</span><span class=special>;</span>
+ <span class=special>}</span>
+ <span class=special>}</span>
+
+ <span class=identifier>farm</span><span class=special>::</span><span class=identifier>animal_transport</span> <span class=identifier>mary</span> <span class=special>=</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>sell_animal</span><span class=special>(</span> <span class=identifier>to_sell</span> <span class=special>);</span>
+
+
+ <span class=keyword>if</span><span class=special>(</span> <span class=identifier>mary</span><span class=special>-&gt;</span><span class=identifier>speak</span><span class=special>()</span> <span class=special>==</span> <span class=identifier>muuuh</span> <span class=special>)</span>
+ <span class=comment>//
+ // Great, Mary is a cow, and she may live longer
+ //</span>
+ <span class=identifier>new_farm</span><span class=special>.</span><span class=identifier>buy_animal</span><span class=special>(</span> <span class=identifier>mary</span><span class=special>.</span><span class=identifier>release</span><span class=special>()</span> <span class=special>);</span>
+ <span class=keyword>else</span>
+ <span class=comment>//
+ // Then the animal would be destroyed (!)
+ // when we go out of scope.
+ //</span>
+ <span class=special>;</span>
+
+ <span class=comment>//
+ // Now we can observe some changes to the two farms...
+ //</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>size</span><span class=special>()</span> <span class=special>==</span> <span class=number>5u</span> <span class=special>);</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>new_farm</span><span class=special>.</span><span class=identifier>size</span><span class=special>()</span> <span class=special>==</span> <span class=number>7u</span> <span class=special>);</span>
+
+ <span class=comment>//
+ // The new farm has however underestimated how much
+ // it cost to feed Mary and its owner is forced to sell the farm...
+ //</span>
+ <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>buy_farm</span><span class=special>(</span> <span class=identifier>new_farm</span><span class=special>.</span><span class=identifier>sell_farm</span><span class=special>()</span> <span class=special>);</span>
+
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>new_farm</span><span class=special>.</span><span class=identifier>size</span><span class=special>()</span> <span class=special>==</span> <span class=number>0u</span> <span class=special>);</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>size</span><span class=special>()</span> <span class=special>==</span> <span class=number>12u</span> <span class=special>);</span>
+<span class=special>}</span>
+</pre>
+</body>
+
+</html>
+<!-- 10. Changing the Clone Allocator
 ++++++++++++++++++++++++++++++++
 
 This example shows how we can change
@@ -430,16 +799,16 @@
 
 .. raw:: html
         :file: tut2.html -->
-<p><strong>Navigate:</strong></p>
+<hr><p><strong>Navigate:</strong></p>
 <ul class="simple">
 <li><a class="reference" href="ptr_container.html">home</a></li>
 <li><a class="reference" href="reference.html">reference</a></li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/examples.rst
==============================================================================
--- trunk/libs/ptr_container/doc/examples.rst (original)
+++ trunk/libs/ptr_container/doc/examples.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -22,7 +22,9 @@
 
         my_container.push_back( 0 ); // throws bad_ptr
         my_container.replace( an_iterator, 0 ); // throws bad_ptr
- my_container.insert( an_iterator, 0 ); // throws bad_ptr
+ my_container.insert( an_iterator, 0 ); // throws bad_ptr
+ std::auto_ptr<T> p( 0 );
+ my_container.push_back( p ); // throws bad_ptr
 
 .. _`Example 2`:
 
@@ -67,7 +69,7 @@
          // a class that has no normal copy semantics
         class X : boost::noncopyable { public: X* clone() const; ... };
                                                                            
- // this will be found by the library by argument dependent lookup
+ // this will be found by the library by argument dependent lookup (ADL)
         X* new_clone( const X& x )
         { return x.clone(); }
                                                                            
@@ -88,10 +90,12 @@
         class X { ... }; // assume 'X' is Clonable
         X x; // and 'X' can be stack-allocated
         ptr_list<X> list;
- list.push_back( x ); // clone 'x' and then insert the resulting pointer
- list.push_back( new_clone( x ); // do it manually
+ list.push_back( new_clone( x ) ); // insert a clone
         list.push_back( new X ); // always give the pointer directly to the container to avoid leaks
         list.push_back( &x ); // don't do this!!!
+ std::auto_ptr<X> p( new X );
+ list.push_back( p ); // give up ownership
+ BOOST_ASSERT( p.get() == 0 );
 
 
 .. _`Example 6`:
@@ -110,7 +114,8 @@
         auto_type ptr2 = deq.release( deq.begin() + 2 ); // use an iterator to determine the element to release
         ptr = deq.release_front(); // supported for 'ptr_list' and 'ptr_deque'
                                         
-
+ deq.push_back( ptr.release() ); // give ownership back to the container
+
 
 .. _`Example 7`:
 
@@ -127,7 +132,8 @@
         //
         list.transfer( list.begin(), vec.begin(), vec ); // make the first element of 'vec' the first element of 'list'
         vec.transfer( vec.end(), list.begin(), list.end(), list ); // put all the lists element into the vector
-
+
+We can also transfer objects from ``ptr_container<Derived>`` to ``ptr_container<Base`` without any problems.
 
 .. _`Example 8`:
 
@@ -138,7 +144,7 @@
 
 :incomplete_type_test.cpp_: Shows how to implement the Composite pattern.
 :simple_test.cpp_: Shows how the usage of pointer container compares with a
- container of pointer pointers
+ container of smart pointers
 :view_example.cpp_: Shows how to use a pointer container as a view into other container
 :tree_test.cpp_: Shows how to make a tree-structure
 :array_test.cpp_: Shows how to make an n-ary tree
@@ -150,16 +156,17 @@
 .. _array_test.cpp : ../test/ptr_array.cpp
 
 
-..
- 9. A large example
- ++++++++++++++++++
 
- This examples shows many of the most common
- features at work.
+9. A large example
+++++++++++++++++++
 
- .. raw:: html
- :file: tut1.html
+This examples shows many of the most common
+features at work. The example provide lots of comments.
 
+.. raw:: html
+ :file: tutorial_example.html
+
+..
                 10. Changing the Clone Allocator
                 ++++++++++++++++++++++++++++++++
 
@@ -170,10 +177,21 @@
                 .. raw:: html
                         :file: tut2.html
 
+.. raw:: html
+
+ <hr>
+
 **Navigate:**
 
 - `home <ptr_container.html>`_
 - `reference <reference.html>`_
 
-:copyright: Thorsten Ottosen 2004-2005.
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
+
 

Modified: trunk/libs/ptr_container/doc/faq.html
==============================================================================
--- trunk/libs/ptr_container/doc/faq.html (original)
+++ trunk/libs/ptr_container/doc/faq.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -292,27 +292,27 @@
 <h2 class="subtitle" id="faq">FAQ</h2>
 <div class="contents local topic">
 <ul class="simple">
-<li><a class="reference" href="#since-a-pointer-container-is-not-copy-constructible-and-assignable-i-cannot-put-them-into-standard-containers-what-do-i-do" id="id4" name="id4">Since a pointer container is not Copy Constructible and Assignable, I cannot put them into standard containers; what do I do?</a></li>
-<li><a class="reference" href="#calling-assign-is-very-costly-and-i-do-not-really-need-to-store-cloned-objects-i-merely-need-to-overwrite-the-existing-ones-what-do-i-do" id="id5" name="id5">Calling <tt class="docutils literal"><span class="pre">assign()</span></tt> is very costly and I do not really need to store cloned objects; I merely need to overwrite the existing ones; what do I do?</a></li>
-<li><a class="reference" href="#which-mutating-algorithms-are-safe-to-use-with-pointers" id="id6" name="id6">Which mutating algorithms are safe to use with pointers?</a></li>
-<li><a class="reference" href="#why-does-ptr-map-t-insert-replace-take-two-arguments-the-key-and-the-pointer-instead-of-one-std-pair-and-why-is-the-key-passed-by-non-const-reference" id="id7" name="id7">Why does <tt class="docutils literal"><span class="pre">ptr_map&lt;T&gt;::insert()/replace()</span></tt> take two arguments (the key and the pointer) instead of one <tt class="docutils literal"><span class="pre">std::pair</span></tt>? And why is the key passed by non-const reference?</a></li>
-<li><a class="reference" href="#when-instantiating-a-pointer-container-with-a-type-t-is-t-then-allowed-to-be-incomplete-at-that-point" id="id8" name="id8">When instantiating a pointer container with a type <tt class="docutils literal"><span class="pre">T</span></tt>, is <tt class="docutils literal"><span class="pre">T</span></tt> then allowed to be incomplete at that point?</a></li>
-<li><a class="reference" href="#why-do-iterator-range-inserts-give-the-strong-exception-safety-guarantee" id="id9" name="id9">Why do iterator-range inserts give the strong exception-safety guarantee?</a></li>
-<li><a class="reference" href="#what-is-the-polymorphic-class-problem" id="id10" name="id10">What is the polymorphic class problem?</a></li>
-<li><a class="reference" href="#are-the-pointer-containers-faster-and-do-they-have-a-better-memory-footprint-than-a-container-of-pointer-pointers" id="id11" name="id11">Are the pointer containers faster and do they have a better memory footprint than a container of pointer pointers?</a></li>
-<li><a class="reference" href="#when-the-stored-pointers-cannot-be-0-how-do-i-allow-this-empty-behavior-anyway" id="id12" name="id12">When the stored pointers cannot be <tt class="docutils literal"><span class="pre">0</span></tt>, how do I allow this &quot;empty&quot; behavior anyway?</a></li>
+<li><a class="reference" href="#since-a-pointer-container-is-not-copy-constructible-and-assignable-i-cannot-put-them-into-standard-containers-what-do-i-do" id="id5" name="id5">Since a pointer container is not Copy Constructible and Assignable, I cannot put them into standard containers; what do I do?</a></li>
+<li><a class="reference" href="#calling-assign-is-very-costly-and-i-do-not-really-need-to-store-cloned-objects-i-merely-need-to-overwrite-the-existing-ones-what-do-i-do" id="id6" name="id6">Calling <tt class="docutils literal"><span class="pre">assign()</span></tt> is very costly and I do not really need to store cloned objects; I merely need to overwrite the existing ones; what do I do?</a></li>
+<li><a class="reference" href="#which-mutating-algorithms-are-safe-to-use-with-pointers" id="id7" name="id7">Which mutating algorithms are safe to use with pointers?</a></li>
+<li><a class="reference" href="#why-does-ptr-map-t-insert-replace-take-two-arguments-the-key-and-the-pointer-instead-of-one-std-pair-and-why-is-the-key-passed-by-non-const-reference" id="id8" name="id8">Why does <tt class="docutils literal"><span class="pre">ptr_map&lt;T&gt;::insert()/replace()</span></tt> take two arguments (the key and the pointer) instead of one <tt class="docutils literal"><span class="pre">std::pair</span></tt>? And why is the key passed by non-const reference?</a></li>
+<li><a class="reference" href="#when-instantiating-a-pointer-container-with-a-type-t-is-t-then-allowed-to-be-incomplete-at-that-point" id="id9" name="id9">When instantiating a pointer container with a type <tt class="docutils literal"><span class="pre">T</span></tt>, is <tt class="docutils literal"><span class="pre">T</span></tt> then allowed to be incomplete at that point?</a></li>
+<li><a class="reference" href="#why-do-iterator-range-inserts-give-the-strong-exception-safety-guarantee" id="id10" name="id10">Why do iterator-range inserts give the strong exception-safety guarantee?</a></li>
+<li><a class="reference" href="#what-is-the-polymorphic-class-problem" id="id11" name="id11">What is the polymorphic class problem?</a></li>
+<li><a class="reference" href="#are-the-pointer-containers-faster-and-do-they-have-a-better-memory-footprint-than-a-container-of-smart-pointers" id="id12" name="id12">Are the pointer containers faster and do they have a better memory footprint than a container of smart pointers?</a></li>
+<li><a class="reference" href="#when-the-stored-pointers-cannot-be-0-how-do-i-allow-this-empty-behavior-anyway" id="id13" name="id13">When the stored pointers cannot be <tt class="docutils literal"><span class="pre">0</span></tt>, how do I allow this &quot;empty&quot; behavior anyway?</a></li>
 </ul>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id4" id="since-a-pointer-container-is-not-copy-constructible-and-assignable-i-cannot-put-them-into-standard-containers-what-do-i-do" name="since-a-pointer-container-is-not-copy-constructible-and-assignable-i-cannot-put-them-into-standard-containers-what-do-i-do">Since a pointer container is not Copy Constructible and Assignable, I cannot put them into standard containers; what do I do?</a></h1>
+<h1><a class="toc-backref" href="#id5" id="since-a-pointer-container-is-not-copy-constructible-and-assignable-i-cannot-put-them-into-standard-containers-what-do-i-do" name="since-a-pointer-container-is-not-copy-constructible-and-assignable-i-cannot-put-them-into-standard-containers-what-do-i-do">Since a pointer container is not Copy Constructible and Assignable, I cannot put them into standard containers; what do I do?</a></h1>
 <p>Since they are <a class="reference" href="ptr_container.html#the-clonable-concept">Clonable</a>, you simply put them in a pointer container.</p>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id5" id="calling-assign-is-very-costly-and-i-do-not-really-need-to-store-cloned-objects-i-merely-need-to-overwrite-the-existing-ones-what-do-i-do" name="calling-assign-is-very-costly-and-i-do-not-really-need-to-store-cloned-objects-i-merely-need-to-overwrite-the-existing-ones-what-do-i-do">Calling <tt class="docutils literal docutils literal"><span class="pre">assign()</span></tt> is very costly and I do not really need to store cloned objects; I merely need to overwrite the existing ones; what do I do?</a></h1>
+<h1><a class="toc-backref" href="#id6" id="calling-assign-is-very-costly-and-i-do-not-really-need-to-store-cloned-objects-i-merely-need-to-overwrite-the-existing-ones-what-do-i-do" name="calling-assign-is-very-costly-and-i-do-not-really-need-to-store-cloned-objects-i-merely-need-to-overwrite-the-existing-ones-what-do-i-do">Calling <tt class="docutils literal docutils literal"><span class="pre">assign()</span></tt> is very costly and I do not really need to store cloned objects; I merely need to overwrite the existing ones; what do I do?</a></h1>
 <p>Call <tt class="docutils literal"><span class="pre">std::copy(</span> <span class="pre">first,</span> <span class="pre">last,</span> <span class="pre">c.begin()</span> <span class="pre">);</span></tt>.</p>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id6" id="which-mutating-algorithms-are-safe-to-use-with-pointers" name="which-mutating-algorithms-are-safe-to-use-with-pointers">Which mutating algorithms are safe to use with pointers?</a></h1>
+<h1><a class="toc-backref" href="#id7" id="which-mutating-algorithms-are-safe-to-use-with-pointers" name="which-mutating-algorithms-are-safe-to-use-with-pointers">Which mutating algorithms are safe to use with pointers?</a></h1>
 <p>Any mutating algorithm that moves elements around by swapping them. An
 important example is <tt class="docutils literal"><span class="pre">std::sort()</span></tt>; examples of unsafe algorithms are
 <tt class="docutils literal"><span class="pre">std::unique()</span></tt> and <tt class="docutils literal"><span class="pre">std::remove()</span></tt>.</p>
@@ -320,7 +320,7 @@
 provided as member functions. -->
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id7" id="why-does-ptr-map-t-insert-replace-take-two-arguments-the-key-and-the-pointer-instead-of-one-std-pair-and-why-is-the-key-passed-by-non-const-reference" name="why-does-ptr-map-t-insert-replace-take-two-arguments-the-key-and-the-pointer-instead-of-one-std-pair-and-why-is-the-key-passed-by-non-const-reference">Why does <tt class="docutils literal docutils literal"><span class="pre">ptr_map&lt;T&gt;::insert()/replace()</span></tt> take two arguments (the key and the pointer) instead of one <tt class="docutils literal docutils literal"><span class="pre">std::pair</span></tt>? And why is the key passed by non-const reference?</a></h1>
+<h1><a class="toc-backref" href="#id8" id="why-does-ptr-map-t-insert-replace-take-two-arguments-the-key-and-the-pointer-instead-of-one-std-pair-and-why-is-the-key-passed-by-non-const-reference" name="why-does-ptr-map-t-insert-replace-take-two-arguments-the-key-and-the-pointer-instead-of-one-std-pair-and-why-is-the-key-passed-by-non-const-reference">Why does <tt class="docutils literal docutils literal"><span class="pre">ptr_map&lt;T&gt;::insert()/replace()</span></tt> take two arguments (the key and the pointer) instead of one <tt class="docutils literal docutils literal"><span class="pre">std::pair</span></tt>? And why is the key passed by non-const reference?</a></h1>
 <p>This is the only way the function can be implemented in an exception-safe
 manner; since the copy-constructor of the key might throw, and since
 function arguments are not guaranteed to be evaluated from left to right,
@@ -328,7 +328,7 @@
 Passing the key as a reference achieves just that.</p>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id8" id="when-instantiating-a-pointer-container-with-a-type-t-is-t-then-allowed-to-be-incomplete-at-that-point" name="when-instantiating-a-pointer-container-with-a-type-t-is-t-then-allowed-to-be-incomplete-at-that-point">When instantiating a pointer container with a type <tt class="docutils literal docutils literal"><span class="pre">T</span></tt>, is <tt class="docutils literal docutils literal"><span class="pre">T</span></tt> then allowed to be incomplete at that point?</a></h1>
+<h1><a class="toc-backref" href="#id9" id="when-instantiating-a-pointer-container-with-a-type-t-is-t-then-allowed-to-be-incomplete-at-that-point" name="when-instantiating-a-pointer-container-with-a-type-t-is-t-then-allowed-to-be-incomplete-at-that-point">When instantiating a pointer container with a type <tt class="docutils literal docutils literal"><span class="pre">T</span></tt>, is <tt class="docutils literal docutils literal"><span class="pre">T</span></tt> then allowed to be incomplete at that point?</a></h1>
 <p>No. This is a distinct property of <tt class="docutils literal"><span class="pre">shared_ptr</span></tt> which implies some overhead.</p>
 <p>However, one can leave <tt class="docutils literal"><span class="pre">T</span></tt> incomplete in the header file:</p>
 <pre class="literal-block">
@@ -348,22 +348,22 @@
 </pre>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id9" id="why-do-iterator-range-inserts-give-the-strong-exception-safety-guarantee" name="why-do-iterator-range-inserts-give-the-strong-exception-safety-guarantee">Why do iterator-range inserts give the strong exception-safety guarantee?</a></h1>
+<h1><a class="toc-backref" href="#id10" id="why-do-iterator-range-inserts-give-the-strong-exception-safety-guarantee" name="why-do-iterator-range-inserts-give-the-strong-exception-safety-guarantee">Why do iterator-range inserts give the strong exception-safety guarantee?</a></h1>
 <p>Is this not very inefficient? It is because it is actually affordable to
 do so; the overhead is one heap-allocation which is relatively small
 compared to cloning N objects.</p>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id10" id="what-is-the-polymorphic-class-problem" name="what-is-the-polymorphic-class-problem">What is the <span class="target" id="polymorphic-class-problem">polymorphic class problem</span>?</a></h1>
+<h1><a class="toc-backref" href="#id11" id="what-is-the-polymorphic-class-problem" name="what-is-the-polymorphic-class-problem">What is the <span class="target" id="polymorphic-class-problem">polymorphic class problem</span>?</a></h1>
 <p>The problem refers to the relatively troublesome way C++ supports Object
 Oriented programming in connection with containers of pointers to
 polymorphic objects. In a language without garbage collection, you end up
-using either a container of pointer pointers or a container that takes
+using either a container of smart pointers or a container that takes
 ownership of the pointers. The hard part is to find a safe, fast and
 elegant solution.</p>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id11" id="are-the-pointer-containers-faster-and-do-they-have-a-better-memory-footprint-than-a-container-of-pointer-pointers" name="are-the-pointer-containers-faster-and-do-they-have-a-better-memory-footprint-than-a-container-of-pointer-pointers">Are the pointer containers faster and do they have a better memory footprint than a container of pointer pointers?</a></h1>
+<h1><a class="toc-backref" href="#id12" id="are-the-pointer-containers-faster-and-do-they-have-a-better-memory-footprint-than-a-container-of-smart-pointers" name="are-the-pointer-containers-faster-and-do-they-have-a-better-memory-footprint-than-a-container-of-smart-pointers">Are the pointer containers faster and do they have a better memory footprint than a container of smart pointers?</a></h1>
 <p>The short answer is yes: they are faster and they do use less memory; in
 fact, they are the only way to obtain the zero-overhead hallmark of C++.
 Smart pointers usually have one word or more of memory overhead per
@@ -374,15 +374,15 @@
 these references: <a class="reference" href="ptr_container.html#references">[11]</a> and <a class="reference" href="ptr_container.html#references">[12]</a>.</p>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id12" id="when-the-stored-pointers-cannot-be-0-how-do-i-allow-this-empty-behavior-anyway" name="when-the-stored-pointers-cannot-be-0-how-do-i-allow-this-empty-behavior-anyway">When the stored pointers cannot be <tt class="docutils literal docutils literal"><span class="pre">0</span></tt>, how do I allow this &quot;empty&quot; behavior anyway?</a></h1>
+<h1><a class="toc-backref" href="#id13" id="when-the-stored-pointers-cannot-be-0-how-do-i-allow-this-empty-behavior-anyway" name="when-the-stored-pointers-cannot-be-0-how-do-i-allow-this-empty-behavior-anyway">When the stored pointers cannot be <tt class="docutils literal docutils literal"><span class="pre">0</span></tt>, how do I allow this &quot;empty&quot; behavior anyway?</a></h1>
 <p>Storing a null-pointer among a list of pointers does not fit well into the Object Oriented paradigm.
 The most elegant design is to use the Null-Object Pattern where one basically makes a concrete
 class with dummy implementations of the virtual functions. See <a class="reference" href="ptr_container.html#references">[13]</a> for details.</p>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/faq.rst
==============================================================================
--- trunk/libs/ptr_container/doc/faq.rst (original)
+++ trunk/libs/ptr_container/doc/faq.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -4,7 +4,7 @@
  
 .. |Boost| image:: boost.png
 
-===
+
 FAQ
 ===
 
@@ -75,11 +75,11 @@
 The problem refers to the relatively troublesome way C++ supports Object
 Oriented programming in connection with containers of pointers to
 polymorphic objects. In a language without garbage collection, you end up
-using either a container of pointer pointers or a container that takes
+using either a container of smart pointers or a container that takes
 ownership of the pointers. The hard part is to find a safe, fast and
 elegant solution.
 
-Are the pointer containers faster and do they have a better memory footprint than a container of pointer pointers?
+Are the pointer containers faster and do they have a better memory footprint than a container of smart pointers?
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 The short answer is yes: they are faster and they do use less memory; in
@@ -98,6 +98,12 @@
 The most elegant design is to use the Null-Object Pattern where one basically makes a concrete
 class with dummy implementations of the virtual functions. See `[13] <ptr_container.html#references>`_ for details.
 
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
 
-:copyright: Thorsten Ottosen 2004-2005.
 

Modified: trunk/libs/ptr_container/doc/guidelines.html
==============================================================================
--- trunk/libs/ptr_container/doc/guidelines.html (original)
+++ trunk/libs/ptr_container/doc/guidelines.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -290,6 +290,20 @@
 <div class="document" id="boost-pointer-container-library">
 <h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
 <h2 class="subtitle" id="usage-guidelines">Usage Guidelines</h2>
+<div class="contents local topic">
+<ul class="simple">
+<li><a class="reference" href="#choosing-the-right-container" id="id8" name="id8">Choosing the right container</a></li>
+<li><a class="reference" href="#recommended-practice-for-object-oriented-programming" id="id9" name="id9">Recommended practice for Object-Oriented Programming</a><ul>
+<li><a class="reference" href="#make-base-classes-abstract-and-without-data" id="id10" name="id10">1. Make base classes abstract and without data</a></li>
+<li><a class="reference" href="#make-virtual-functions-private-and-provide-a-non-virtual-public-forwarding-function" id="id11" name="id11">2. Make virtual functions private and provide a non-virtual public forwarding function</a></li>
+<li><a class="reference" href="#derive-your-base-class-from-boost-noncopyable" id="id12" name="id12">3. Derive your base class from <tt class="docutils literal"><span class="pre">boost::noncopyable</span></tt></a></li>
+<li><a class="reference" href="#avoid-null-pointers-in-containers-if-possible" id="id13" name="id13">4. Avoid null-pointers in containers (if possible)</a></li>
+</ul>
+</li>
+</ul>
+</div>
+<div class="section">
+<h1><a class="toc-backref" href="#id8" id="choosing-the-right-container" name="choosing-the-right-container">Choosing the right container</a></h1>
 <p>The recommended usage pattern of the container classes are the same as the
 for normal standard containers.</p>
 <p><tt class="docutils literal"><span class="pre">ptr_vector</span></tt>, <tt class="docutils literal"><span class="pre">ptr_list</span></tt> and <tt class="docutils literal"><span class="pre">ptr_deque</span></tt> offer the programmer different
@@ -306,19 +320,115 @@
 <tt class="docutils literal"><span class="pre">ptr_set</span></tt> and <tt class="docutils literal"><span class="pre">ptr_map</span></tt> support unique keys.
 <tt class="docutils literal"><span class="pre">ptr_multiset</span></tt> and <tt class="docutils literal"><span class="pre">ptr_multimap</span></tt>
 support equivalent keys.</p>
-<p><strong>Navigate:</strong></p>
+</div>
+<div class="section">
+<h1><a class="toc-backref" href="#id9" id="recommended-practice-for-object-oriented-programming" name="recommended-practice-for-object-oriented-programming">Recommended practice for Object-Oriented Programming</a></h1>
+<p>Idiomtic Object-Oriented Programming in C++ looks a bit different from
+the way it is done in other languages. This is partly because C++
+has both value and reference semantics, and partly because C++ is more flexible
+than other languages. Below is a list of recommendations that you are
+encouraged to follow:</p>
+<div class="section">
+<h2><a class="toc-backref" href="#id10" id="make-base-classes-abstract-and-without-data" name="make-base-classes-abstract-and-without-data">1. Make base classes abstract and without data</a></h2>
+<p>The has the following advantages:</p>
+<blockquote>
+<ol class="loweralpha simple">
+<li>It reduces <em>coupling</em> because you do not have to maintain or update state</li>
+</ol>
+<!-- -->
+<ol class="loweralpha simple" start="2">
+<li>It helps you to avoid <em>slicing</em></li>
+</ol>
+<!-- -->
+<ol class="loweralpha simple" start="3">
+<li>It ensures you <em>override</em> the right function</li>
+</ol>
+</blockquote>
+<p>You might also want to read the following articles:</p>
+<ul class="simple">
+<li>Kevlin Henney's <a class="reference" href="http://www.two-sdg.demon.co.uk/curbralan/papers/SixOfTheBest.pdf">Six of the best</a></li>
+</ul>
+<ul class="simple">
+<li>Jack Reeves' <a class="reference" href="http://www.ddj.com/documents/s=10011/q=1/cuj0602reeves/0602reeves.html">Multiple Inheritance Considered Useful</a></li>
+</ul>
+</div>
+<div class="section">
+<h2><a class="toc-backref" href="#id11" id="make-virtual-functions-private-and-provide-a-non-virtual-public-forwarding-function" name="make-virtual-functions-private-and-provide-a-non-virtual-public-forwarding-function">2. Make virtual functions private and provide a non-virtual public forwarding function</a></h2>
+<p>In code:</p>
+<pre class="literal-block">
+class Polymorphic
+{
+private:
+ virtual int do_foo() = 0;
+
+public:
+ int foo()
+ {
+ return do_foo();
+ }
+ ...
+};
+</pre>
+<p>This has the following advantages:</p>
+<blockquote>
+<ol class="loweralpha simple">
+<li>It makes sure all calls to the virtual function always goes through one place in your code</li>
+</ol>
+<!-- -->
+<ol class="loweralpha simple" start="2">
+<li>It enables you to check preconditions and postconditions inside the forwarding function</li>
+</ol>
+</blockquote>
+<p>You might also want to read Herb Sutter's article <a class="reference" href="http://www.gotw.ca/publications/mill18.htm">Virtuality</a>.</p>
+</div>
+<div class="section">
+<h2><a class="toc-backref" href="#id12" id="derive-your-base-class-from-boost-noncopyable" name="derive-your-base-class-from-boost-noncopyable">3. Derive your base class from <tt class="docutils literal docutils literal"><span class="pre">boost::noncopyable</span></tt></a></h2>
+<p>Having an abstact base class prevents slicing when the base class is involved, but
+it does not prevent it for classes further down the hierarchy. This is where
+<a class="reference" href="http://www.boost.org/libs/utility/utility.htm#Class_noncopyable">boost::noncopyable</a> is handy to use:</p>
+<pre class="literal-block">
+class Polymorphic : boost::noncopyable
+{
+ ...
+};
+</pre>
+</div>
+<div class="section">
+<h2><a class="toc-backref" href="#id13" id="avoid-null-pointers-in-containers-if-possible" name="avoid-null-pointers-in-containers-if-possible">4. Avoid null-pointers in containers (if possible)</a></h2>
+<p>By default the pointer containers do not allow you to store null-pointer in them.
+As you might know, this behavior can be changed explicitly with the use
+of <a class="reference" href="reference.html#class-nullable">boost::nullable</a>.</p>
+<p>The primary reason to avoid null-pointers
+is that you have to check for null-pointers every time the container is
+used. This extra checking is easy to forget, and it is somewhat contradictory to
+the spirit of OO where you replace special cases with dynamic dispatch.</p>
+<p>Often, however, you need to place some special object in the container because you
+do not have enough information to construct a full object. In that case
+you might be able to use the Null Object pattern which simply dictates that
+you implement virtual functions from the abstract base-class
+as empty functions or with dummy return values. This means that
+your OO-code still does not need to worry about null-pointers.</p>
+<p>You might want to read</p>
+<ul class="simple">
+<li>Kevlin Henney's <a class="reference" href="http://www.two-sdg.demon.co.uk/curbralan/papers/europlop/NullObject.pdf">Null Object - Something for Nothing</a></li>
+</ul>
+<p>Finally you might end up in a situation where not even the Null Object can help
+you. That is when you truly need <tt class="docutils literal"><span class="pre">container&lt;</span> <span class="pre">nullable&lt;T&gt;</span> <span class="pre">&gt;</span></tt>.</p>
+<hr><p><strong>Navigate:</strong></p>
 <ul class="simple">
 <li><a class="reference" href="ptr_container.html">home</a></li>
 <li><a class="reference" href="reference.html">reference</a></li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>
 </div>
+</div>
+</div>
 </body>
 </html>

Modified: trunk/libs/ptr_container/doc/guidelines.rst
==============================================================================
--- trunk/libs/ptr_container/doc/guidelines.rst (original)
+++ trunk/libs/ptr_container/doc/guidelines.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -8,6 +8,11 @@
 Usage Guidelines
 ================
 
+.. contents:: :local:
+
+Choosing the right container
+----------------------------
+
 The recommended usage pattern of the container classes are the same as the
 for normal standard containers.
 
@@ -27,10 +32,131 @@
 ``ptr_multiset`` and ``ptr_multimap``
 support equivalent keys.
 
+Recommended practice for Object-Oriented Programming
+----------------------------------------------------
+
+Idiomtic Object-Oriented Programming in C++ looks a bit different from
+the way it is done in other languages. This is partly because C++
+has both value and reference semantics, and partly because C++ is more flexible
+than other languages. Below is a list of recommendations that you are
+encouraged to follow:
+
+1. Make base classes abstract and without data
+++++++++++++++++++++++++++++++++++++++++++++++
+
+The has the following advantages:
+
+ a. It reduces *coupling* because you do not have to maintain or update state
+
+ ..
+
+ b. It helps you to avoid *slicing*
+
+ ..
+
+ c. It ensures you *override* the right function
+
+You might also want to read the following articles:
+
+- Kevlin Henney's `Six of the best`__
+
+.. __: http://www.two-sdg.demon.co.uk/curbralan/papers/SixOfTheBest.pdf
+
+- Jack Reeves' `Multiple Inheritance Considered Useful`__
+
+.. __: http://www.ddj.com/documents/s=10011/q=1/cuj0602reeves/0602reeves.html
+
+
+2. Make virtual functions private and provide a non-virtual public forwarding function
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+In code::
+
+ class Polymorphic
+ {
+ private:
+ virtual int do_foo() = 0;
+
+ public:
+ int foo()
+ {
+ return do_foo();
+ }
+ ...
+ };
+
+This has the following advantages:
+
+ a. It makes sure all calls to the virtual function always goes through one place in your code
+
+ ..
+
+ b. It enables you to check preconditions and postconditions inside the forwarding function
+
+You might also want to read Herb Sutter's article `Virtuality`__.
+
+.. __: http://www.gotw.ca/publications/mill18.htm
+
+3. Derive your base class from ``boost::noncopyable``
++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+Having an abstact base class prevents slicing when the base class is involved, but
+it does not prevent it for classes further down the hierarchy. This is where
+`boost::noncopyable`__ is handy to use::
+
+ class Polymorphic : boost::noncopyable
+ {
+ ...
+ };
+
+.. __ : http://www.boost.org/libs/utility/utility.htm#Class_noncopyable
+
+
+4. Avoid null-pointers in containers (if possible)
+++++++++++++++++++++++++++++++++++++++++++++++++++
+
+By default the pointer containers do not allow you to store null-pointer in them.
+As you might know, this behavior can be changed explicitly with the use
+of `boost::nullable`__.
+
+The primary reason to avoid null-pointers
+is that you have to check for null-pointers every time the container is
+used. This extra checking is easy to forget, and it is somewhat contradictory to
+the spirit of OO where you replace special cases with dynamic dispatch.
+
+.. __: reference.html#class-nullable
+
+Often, however, you need to place some special object in the container because you
+do not have enough information to construct a full object. In that case
+you might be able to use the Null Object pattern which simply dictates that
+you implement virtual functions from the abstract base-class
+as empty functions or with dummy return values. This means that
+your OO-code still does not need to worry about null-pointers.
+
+You might want to read
+
+- Kevlin Henney's `Null Object - Something for Nothing`__
+
+.. __: http://www.two-sdg.demon.co.uk/curbralan/papers/europlop/NullObject.pdf
+
+Finally you might end up in a situation where not even the Null Object can help
+you. That is when you truly need ``container< nullable<T> >``.
+
+.. raw:: html
+
+ <hr>
+
 **Navigate:**
 
 - `home <ptr_container.html>`_
 - `reference <reference.html>`_
 
-:copyright: Thorsten Ottosen 2004-2005.
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
+
 

Modified: trunk/libs/ptr_container/doc/headers.html
==============================================================================
--- trunk/libs/ptr_container/doc/headers.html (original)
+++ trunk/libs/ptr_container/doc/headers.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -334,16 +334,16 @@
 </tr>
 <tr><td><tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/exception.hpp&gt;</span></tt></td>
 <td><dl class="first last docutils">
-<dt>classes <tt class="docutils literal"><span class="pre">bad_ptr_container_operation</span></tt>, <tt class="docutils literal"><span class="pre">bad_index</span></tt></dt>
-<dd>and <tt class="docutils literal"><span class="pre">bad_pointer</span></tt></dd>
+<dt>classes <a class="reference" href="reference.html#exception-classes">bad_ptr_container_operation</a>, <a class="reference" href="reference.html#exception-classes">bad_index</a></dt>
+<dd>and <a class="reference" href="reference.html#exception-classes">bad_pointer</a></dd>
 </dl>
 </td>
 </tr>
 <tr><td><tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/indirect_fun.hpp&gt;</span></tt></td>
-<td>class <tt class="docutils literal"><span class="pre">indirect_fun</span></tt></td>
+<td>class <a class="reference" href="indirect_fun.html">indirect_fun</a></td>
 </tr>
 <tr><td><tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/nullable.hpp&gt;</span></tt></td>
-<td>class <tt class="docutils literal"><span class="pre">nullable</span></tt></td>
+<td>class <a class="reference" href="reference.html#class-nullable">nullable</a></td>
 </tr>
 </tbody>
 </table>
@@ -352,11 +352,11 @@
 <li><a class="reference" href="ptr_container.html">home</a></li>
 <li><a class="reference" href="reference.html">reference</a></li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/headers.rst
==============================================================================
--- trunk/libs/ptr_container/doc/headers.rst (original)
+++ trunk/libs/ptr_container/doc/headers.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -34,21 +34,33 @@
 
 ``<boost/ptr_container/ptr_map_adapter.hpp>`` classes `ptr_map_adapter <ptr_map_adapter.html>`_ and `ptr_multimap_adapter <ptr_multimap_adapter.html>`_
 
-``<boost/ptr_container/exception.hpp>`` classes ``bad_ptr_container_operation``, ``bad_index``
- and ``bad_pointer``
-``<boost/ptr_container/indirect_fun.hpp>`` class ``indirect_fun``
+``<boost/ptr_container/exception.hpp>`` classes `bad_ptr_container_operation`_, `bad_index`_
+ and `bad_pointer`_
+``<boost/ptr_container/indirect_fun.hpp>`` class `indirect_fun`_
 
-``<boost/ptr_container/nullable.hpp>`` class ``nullable``
+``<boost/ptr_container/nullable.hpp>`` class `nullable`_
 ======================================================= =============================================================
 
 .. _`heap_clone_allocator`: reference.html#the-clone-allocator-concept
 .. _`view_clone_allocator`: reference.html#the-clone-allocator-concept
+.. _`bad_ptr_container_operation`: reference.html#exception-classes
+.. _`bad_index`: reference.html#exception-classes
+.. _`bad_pointer`: reference.html#exception-classes
+.. _`nullable`: reference.html#class-nullable
+.. _`indirect_fun`: indirect_fun.html
+
 
 **Navigate:**
 
 - `home <ptr_container.html>`_
 - `reference <reference.html>`_
 
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
 
-:copyright: Thorsten Ottosen 2004-2005.
 

Modified: trunk/libs/ptr_container/doc/indirect_fun.html
==============================================================================
--- trunk/libs/ptr_container/doc/indirect_fun.html (original)
+++ trunk/libs/ptr_container/doc/indirect_fun.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -401,11 +401,11 @@
          
 } // namespace 'boost'
 </pre>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/indirect_fun.rst
==============================================================================
--- trunk/libs/ptr_container/doc/indirect_fun.rst (original)
+++ trunk/libs/ptr_container/doc/indirect_fun.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -125,6 +125,12 @@
                  
         } // namespace 'boost'
         
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
 
-:copyright: Thorsten Ottosen 2004-2005.
 

Modified: trunk/libs/ptr_container/doc/ptr_array.html
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_array.html (original)
+++ trunk/libs/ptr_container/doc/ptr_array.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -293,12 +293,19 @@
 <h1><a id="class-ptr-array" name="class-ptr-array">Class <tt class="docutils literal"><span class="pre">ptr_array</span></tt></a></h1>
 <p>A <tt class="docutils literal"><span class="pre">ptr_array&lt;T,size&gt;</span></tt> is a pointer container that uses an underlying <tt class="docutils literal"><span class="pre">boost::array&lt;void*,size&gt;</span></tt>
 to store the pointers. The class is useful when there is no requirement
-of dynamic expansion and when absolute no overhead is tolerable.</p>
-<p><strong>See also:</strong></p>
+of dynamic expansion and when no overhead is tolerable.</p>
+<p><strong>Hierarchy:</strong></p>
 <ul class="simple">
-<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a></li>
-<li><a class="reference" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a></li>
+<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a><ul>
+<li><a class="reference" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a><ul>
 <li><a class="reference" href="ptr_vector.html">ptr_vector</a></li>
+<li><a class="reference" href="ptr_list.html">ptr_list</a></li>
+<li><a class="reference" href="ptr_deque.html">ptr_deque</a></li>
+<li><tt class="docutils literal"><span class="pre">ptr_array</span></tt></li>
+</ul>
+</li>
+</ul>
+</li>
 </ul>
 <p><strong>Navigate:</strong></p>
 <ul class="simple">
@@ -545,11 +552,11 @@
 </blockquote>
 </li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/ptr_array.rst
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_array.rst (original)
+++ trunk/libs/ptr_container/doc/ptr_array.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -9,17 +9,18 @@
 
 A ``ptr_array<T,size>`` is a pointer container that uses an underlying ``boost::array<void*,size>``
 to store the pointers. The class is useful when there is no requirement
-of dynamic expansion and when absolute no overhead is tolerable.
+of dynamic expansion and when no overhead is tolerable.
 
-**See also:**
+**Hierarchy:**
 
-- reversible_ptr_container_
-- ptr_sequence_adapter_
-- ptr_vector_
+- `reversible_ptr_container <reversible_ptr_container.html>`_
 
-.. _reversible_ptr_container: reversible_ptr_container.html
-.. _ptr_sequence_adapter: ptr_sequence_adapter.html
-.. _ptr_vector: ptr_vector.html
+ - `ptr_sequence_adapter <ptr_sequence_adapter.html>`_
+
+ - `ptr_vector <ptr_vector.html>`_
+ - `ptr_list <ptr_list.html>`_
+ - `ptr_deque <ptr_deque.html>`_
+ - ``ptr_array``
 
 **Navigate:**
 
@@ -250,5 +251,12 @@
 
     - Exception safety: Nothrow guarantee
 
-:copyright: Thorsten Ottosen 2004-2005.
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
+
 

Modified: trunk/libs/ptr_container/doc/ptr_container.html
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_container.html (original)
+++ trunk/libs/ptr_container/doc/ptr_container.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -6,8 +6,8 @@
 <meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
 <title>Boost Pointer Container Library</title>
 <meta name="author" content="Thorsten Ottosen" />
-<meta name="date" content="3rd of May 2005" />
-<meta name="copyright" content="Thorsten Ottosen 2004-2005. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt)." />
+<meta name="date" content="29th of April 2006" />
+<meta name="copyright" content="Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt)." />
 <style type="text/css">
 
 /*
@@ -299,13 +299,13 @@
 <tr><th class="docinfo-name">Author:</th>
 <td>Thorsten Ottosen</td></tr>
 <tr><th class="docinfo-name">Contact:</th>
-<td><a class="first last reference" href="mailto:nesotto&#64;cs.aau.dk">nesotto&#64;cs.aau.dk</a></td></tr>
-<tr class="field"><th class="docinfo-name">organizations:</th><td class="field-body"><a class="reference" href="http://www.cs.aau.dk">Department of Computer Science</a>, Aalborg University, and <a class="reference" href="http://www.dezide.com">Dezide Aps</a></td>
+<td><a class="first reference" href="mailto:nesotto&#64;cs.aau.dk">nesotto&#64;cs.aau.dk</a> or <a class="last reference" href="mailto:tottosen&#64;dezide.com">tottosen&#64;dezide.com</a></td></tr>
+<tr class="field"><th class="docinfo-name">Organizations:</th><td class="field-body"><a class="reference" href="http://www.cs.aau.dk">Department of Computer Science</a>, Aalborg University, and <a class="reference" href="http://www.dezide.com">Dezide Aps</a></td>
 </tr>
 <tr><th class="docinfo-name">Date:</th>
-<td>3rd of May 2005</td></tr>
+<td>29th of April 2006</td></tr>
 <tr><th class="docinfo-name">Copyright:</th>
-<td>Thorsten Ottosen 2004-2005. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td></tr>
+<td>Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td></tr>
 </tbody>
 </table>
 <div class="section">
@@ -318,47 +318,47 @@
 <ul class="simple">
 <li><a class="reference" href="#motivation">Motivation</a></li>
 <li><a class="reference" href="tutorial.html">Tutorial</a></li>
-<li><a class="reference" href="reference.html">Reference</a><ul>
-<li><a class="reference" href="conventions.html">Conventions</a></li>
-<li><a class="reference" href="reference.html#the-clonable-concept">The Clonable Concept</a></li>
-<li><a class="reference" href="reference.html#the-clone-allocator-concept">The Clone Allocator Concept</a></li>
-<li><a class="reference" href="reference.html#pointer-container-adapters">Pointer container adapters</a></li>
-<li><a class="reference" href="reference.html#sequence-containers">Sequence container classes</a><ul>
-<li><a class="reference" href="ptr_vector.html">ptr_vector</a></li>
-<li><a class="reference" href="ptr_deque.html">ptr_deque</a></li>
-<li><a class="reference" href="ptr_list.html">ptr_list</a></li>
-<li><a class="reference" href="ptr_array.html">ptr_array</a></li>
-</ul>
-</li>
-<li><a class="reference" href="reference.html#associative-containers">Associative container classes</a><ul>
-<li><a class="reference" href="ptr_set.html">ptr_set</a></li>
-<li><a class="reference" href="ptr_multiset.html">ptr_multiset</a></li>
-<li><a class="reference" href="ptr_map.html">ptr_map</a></li>
-<li><a class="reference" href="ptr_multimap.html">ptr_multimap</a></li>
-</ul>
-</li>
-<li><a class="reference" href="indirect_fun.html">Indirected functions</a></li>
-<li><a class="reference" href="reference.html#class-nullable">Class nullable</a></li>
-<li><a class="reference" href="reference.html#exception-classes">Exception classes</a></li>
-</ul>
-</li>
+<li><a class="reference" href="reference.html">Reference</a></li>
 <li><a class="reference" href="guidelines.html">Usage guidelines</a></li>
 <li><a class="reference" href="examples.html">Examples</a></li>
 <li><a class="reference" href="headers.html">Library headers</a></li>
 <li><a class="reference" href="faq.html">FAQ</a></li>
+<li><a class="reference" href="#upgrading-from-boost-v-1-33">Upgrading from Boost v. 1.33.*</a></li>
 <li><a class="reference" href="#acknowledgements">Acknowledgements</a></li>
 <li><a class="reference" href="#references">References</a></li>
 </ul>
+<!-- - `Conventions <conventions.html>`_
+- `The Clonable Concept <reference.html#the-clonable-concept>`_
+- `The Clone Allocator Concept <reference.html#the-clone-allocator-concept>`_
+- `Pointer container adapters <reference.html#pointer-container-adapters>`_
+- `Sequence container classes <reference.html#sequence-containers>`_
+
+ - `ptr_vector <ptr_vector.html>`_
+ - `ptr_deque <ptr_deque.html>`_
+ - `ptr_list <ptr_list.html>`_
+ - `ptr_array <ptr_array.html>`_
+- `Associative container classes <reference.html#associative-containers>`_
+
+ - `ptr_set <ptr_set.html>`_
+ - `ptr_multiset <ptr_multiset.html>`_
+ - `ptr_map <ptr_map.html>`_
+ - `ptr_multimap <ptr_multimap.html>`_
+- `Indirected functions <indirect_fun.html>`_
+- `Class nullable <reference.html#class-nullable>`_
+- `Exception classes <reference.html#exception-classes>`_ -->
 </div>
 <div class="section">
 <h1><a id="motivation" name="motivation">Motivation</a></h1>
 <p>Whenever a programmer wants to have a container of pointers to
 heap-allocated objects, there is usually only one exception-safe way:
-to make a container of pointer pointers like <tt class="docutils literal"><span class="pre">boost::shared_ptr</span></tt>.
+to make a container of smart pointers like <a class="reference" href="../../smart_ptr/shared_ptr.htm">boost::shared_ptr</a>
 This approach is suboptimal if</p>
 <ol class="arabic simple">
 <li>the stored objects are not shared, but owned exclusively, or</li>
-<li>the overhead implied by pointer pointers is inappropriate</li>
+</ol>
+<!-- -->
+<ol class="arabic simple" start="2">
+<li>the overhead implied by smart pointers is inappropriate</li>
 </ol>
 <p>This library therefore provides standard-like containers that are for storing
 heap-allocated or <a class="reference" href="reference.html#the-clonable-concept">cloned</a> objects (or in case of a map, the mapped object must be
@@ -370,19 +370,86 @@
 <p>The advantages of pointer containers are</p>
 <ol class="arabic simple">
 <li>Exception-safe pointer storage and manipulation.</li>
+</ol>
+<!-- -->
+<ol class="arabic simple" start="2">
 <li>Notational convenience compared to the use of containers of pointers.</li>
+</ol>
+<!-- -->
+<ol class="arabic simple" start="3">
 <li>Can be used for types that are neither Assignable nor Copy Constructible.</li>
-<li>No memory-overhead as containers of pointer pointers can have (see <a class="footnote-reference" href="#id21" id="id2" name="id2">[11]</a> and <a class="footnote-reference" href="#id23" id="id3" name="id3">[12]</a>).</li>
-<li>Usually faster than using containers of pointer pointers (see <a class="footnote-reference" href="#id21" id="id4" name="id4">[11]</a> and <a class="footnote-reference" href="#id23" id="id5" name="id5">[12]</a>).</li>
+</ol>
+<!-- -->
+<ol class="arabic simple" start="4">
+<li>No memory-overhead as containers of smart pointers can have (see <a class="footnote-reference" href="#id23" id="id2" name="id2">[11]</a> and <a class="footnote-reference" href="#id25" id="id3" name="id3">[12]</a>).</li>
+</ol>
+<!-- -->
+<ol class="arabic simple" start="5">
+<li>Usually faster than using containers of smart pointers (see <a class="footnote-reference" href="#id23" id="id4" name="id4">[11]</a> and <a class="footnote-reference" href="#id25" id="id5" name="id5">[12]</a>).</li>
+</ol>
+<!-- -->
+<ol class="arabic simple" start="6">
 <li>The interface is slightly changed towards the domain of pointers
 instead of relying on the normal value-based interface. For example,
 now it is possible for <tt class="docutils literal"><span class="pre">pop_back()</span></tt> to return the removed element.</li>
-<li>Propagates constness s.t. one cannot modify the objects via a <tt class="docutils literal"><span class="pre">const_iterator</span></tt></li>
+</ol>
+<!-- -->
+<ol class="arabic simple" start="7">
+<li>Propagates constness s.t. one cannot modify the objects via a <tt class="docutils literal"><span class="pre">const_iterator</span></tt>.</li>
+</ol>
+<!-- -->
+<ol class="arabic simple" start="8">
+<li>Built-in support for deep-copy semantics via the <a class="reference" href="reference.html#the-clonable-concept">The Clobable Concept</a></li>
 </ol>
 <p>The disadvantages are</p>
 <ol class="arabic simple">
 <li>Less flexible than containers of smart pointers like <a class="reference" href="../../smart_ptr/shared_ptr.htm">boost::shared_ptr</a></li>
 </ol>
+<p>When you do need shared semantics, this library is not what you need.</p>
+</div>
+<div class="section">
+<h1><a id="upgrading-from-boost-v-1-33" name="upgrading-from-boost-v-1-33">Upgrading from Boost v. <tt class="docutils literal"><span class="pre">1.33.*</span></tt></a></h1>
+<p>If you upgrade from one of these versions of Boost, then there has been one
+major interface change: map iterators now mimic iterators from <tt class="docutils literal"><span class="pre">std::map</span></tt>.
+Previously you may have written</p>
+<pre class="literal-block">
+for( boost::ptr_map&lt;std::string,T&gt;::iterator i = m.begin(), e = m.end();
+ i != e; ++i )
+{
+ std::cout &lt;&lt; &quot;key:&quot; &lt;&lt; i.key();
+ std::cout &lt;&lt; &quot;value:&quot; &lt;&lt; *i;
+ i-&gt;foo(); // call T::foo()
+}
+</pre>
+<p>and this now needs to be converted into</p>
+<pre class="literal-block">
+for( boost::ptr_map&lt;std::string,T&gt;::iterator i = m.begin(), e = m.end();
+ i != e; ++i )
+{
+ std::cout &lt;&lt; &quot;key:&quot; &lt;&lt; i-&gt;first;
+ std::cout &lt;&lt; &quot;value:&quot; &lt;&lt; *i-&gt;second;
+ i-&gt;second-&gt;foo(); // call T::foo()
+}
+</pre>
+<p>Apart from the above change, the library now also introduces</p>
+<ul>
+<li><p class="first"><tt class="docutils literal"><span class="pre">std::auto_ptr&lt;T&gt;</span></tt> overloads:</p>
+<pre class="literal-block">
+std::auto_ptr&lt;T&gt; p( new T );
+container.push_back( p );
+</pre>
+</li>
+<li><p class="first">Derived-to-Base conversion in <tt class="docutils literal"><span class="pre">transfer()</span></tt>:</p>
+<pre class="literal-block">
+boost::ptr_vector&lt;Base&gt; vec;
+boost::ptr_list&lt;Derived&gt; list;
+...
+vec.transfer( vec.begin(), list ); // now ok
+</pre>
+</li>
+</ul>
+<p>Also note that <a class="reference" href="../../assign/index.html">Boost.Assign</a> introduces better support
+for pointer containers.</p>
 </div>
 <div class="section">
 <h1><a id="acknowledgements" name="acknowledgements">Acknowledgements</a></h1>
@@ -401,97 +468,98 @@
 <li>Russell Hind for help with Borland compatibility</li>
 <li>Jonathan Wakely for his great help with GCC compatibility and bug fixes</li>
 <li>Pavel Chikulaev for comments and bug-fixes</li>
+<li>Andreas Hommel for fixing the nasty Metrowerks bug</li>
 </ul>
 </div>
 <div class="section">
 <h1><a id="references" name="references">References</a></h1>
-<table class="docutils footnote" frame="void" id="id6" rules="none">
+<table class="docutils footnote" frame="void" id="id8" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a name="id6">[1]</a></td><td>Matt Austern: <a class="reference" href="http://www.cuj.com/documents/s=7990/cujcexp1910austern/">&quot;The Standard Librarian: Containers of Pointers&quot;</a> , C/C++ Users Journal Experts Forum.</td></tr>
+<tr><td class="label"><a name="id8">[1]</a></td><td>Matt Austern: <a class="reference" href="http://www.cuj.com/documents/s=7990/cujcexp1910austern/">&quot;The Standard Librarian: Containers of Pointers&quot;</a> , C/C++ Users Journal Experts Forum.</td></tr>
 </tbody>
 </table>
-<table class="docutils footnote" frame="void" id="id8" rules="none">
+<table class="docutils footnote" frame="void" id="id10" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a name="id8">[2]</a></td><td>Bjarne Stroustrup, &quot;The C++ Programming Language&quot;, <a class="reference" href="http://www.research.att.com/~bs/3rd_safe.pdf">Appendix E: &quot;Standard-Library Exception Safety&quot;</a></td></tr>
+<tr><td class="label"><a name="id10">[2]</a></td><td>Bjarne Stroustrup, &quot;The C++ Programming Language&quot;, <a class="reference" href="http://www.research.att.com/~bs/3rd_safe.pdf">Appendix E: &quot;Standard-Library Exception Safety&quot;</a></td></tr>
 </tbody>
 </table>
-<table class="docutils footnote" frame="void" id="id10" rules="none">
+<table class="docutils footnote" frame="void" id="id12" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a name="id10">[3]</a></td><td>Herb Sutter, &quot;Exceptional C++&quot;.</td></tr>
+<tr><td class="label"><a name="id12">[3]</a></td><td>Herb Sutter, &quot;Exceptional C++&quot;.</td></tr>
 </tbody>
 </table>
-<table class="docutils footnote" frame="void" id="id11" rules="none">
+<table class="docutils footnote" frame="void" id="id13" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a name="id11">[4]</a></td><td>Herb Sutter, &quot;More Exceptional C++&quot;.</td></tr>
+<tr><td class="label"><a name="id13">[4]</a></td><td>Herb Sutter, &quot;More Exceptional C++&quot;.</td></tr>
 </tbody>
 </table>
-<table class="docutils footnote" frame="void" id="id12" rules="none">
+<table class="docutils footnote" frame="void" id="id14" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a name="id12">[5]</a></td><td>Kevlin Henney: <a class="reference" href="http://www.cuj.com/documents/s=7986/cujcexp2002henney/henney.htm">&quot;From Mechanism to Method: The Safe Stacking of Cats&quot;</a> , C++ Experts Forum, February 2002.</td></tr>
+<tr><td class="label"><a name="id14">[5]</a></td><td>Kevlin Henney: <a class="reference" href="http://www.cuj.com/documents/s=7986/cujcexp2002henney/henney.htm">&quot;From Mechanism to Method: The Safe Stacking of Cats&quot;</a> , C++ Experts Forum, February 2002.</td></tr>
 </tbody>
 </table>
-<table class="docutils footnote" frame="void" id="id14" rules="none">
+<table class="docutils footnote" frame="void" id="id16" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a name="id14">[6]</a></td><td>Some of the few earlier attempts of pointer containers I have seen are the rather interesting <a class="reference" href="http://www.ntllib.org/asp.html">NTL</a> and the
+<tr><td class="label"><a name="id16">[6]</a></td><td>Some of the few earlier attempts of pointer containers I have seen are the rather interesting <a class="reference" href="http://www.ntllib.org/asp.html">NTL</a> and the
 <a class="reference" href="http://ootips.org/yonat/4dev/pointainer.h">pointainer</a>.
 As of this writing both libraries are not exceptions-safe and can leak.</td></tr>
 </tbody>
 </table>
-<table class="docutils footnote" frame="void" id="id15" rules="none">
+<table class="docutils footnote" frame="void" id="id17" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a name="id15">[7]</a></td><td>INTERNATIONAL STANDARD, Programming languages --- C++, ISO/IEC 14882, 1998. See section 23 in particular.</td></tr>
+<tr><td class="label"><a name="id17">[7]</a></td><td>INTERNATIONAL STANDARD, Programming languages --- C++, ISO/IEC 14882, 1998. See section 23 in particular.</td></tr>
 </tbody>
 </table>
-<table class="docutils footnote" frame="void" id="id16" rules="none">
+<table class="docutils footnote" frame="void" id="id18" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a name="id16">[8]</a></td><td>C++ Standard Library Closed Issues List (Revision 27),
+<tr><td class="label"><a name="id18">[8]</a></td><td>C++ Standard Library Closed Issues List (Revision 27),
 Item 218, <a class="reference" href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-closed.html#218">Algorithms do not use binary predicate objects for default comparisons</a>.</td></tr>
 </tbody>
 </table>
-<table class="docutils footnote" frame="void" id="id18" rules="none">
+<table class="docutils footnote" frame="void" id="id20" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a name="id18">[9]</a></td><td>C++ Standard Library Active Issues List (Revision 27),
+<tr><td class="label"><a name="id20">[9]</a></td><td>C++ Standard Library Active Issues List (Revision 27),
 Item 226, <a class="reference" href="http://gcc.gnu.org/onlinedocs/libstdc++/ext/lwg-active.html#226">User supplied specializations or overloads of namespace std function templates</a>.</td></tr>
 </tbody>
 </table>
-<table class="docutils footnote" frame="void" id="id20" rules="none">
+<table class="docutils footnote" frame="void" id="id22" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a name="id20">[10]</a></td><td>Harald Nowak, &quot;A remove_if for vector&quot;, C/C++ Users Journal, July 2001.</td></tr>
+<tr><td class="label"><a name="id22">[10]</a></td><td>Harald Nowak, &quot;A remove_if for vector&quot;, C/C++ Users Journal, July 2001.</td></tr>
 </tbody>
 </table>
-<table class="docutils footnote" frame="void" id="id21" rules="none">
+<table class="docutils footnote" frame="void" id="id23" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a name="id21">[11]</a></td><td><em>(<a class="fn-backref" href="#id2">1</a>, <a class="fn-backref" href="#id4">2</a>)</em> Boost smart pointer <a class="reference" href="http://www.boost.org/libs/smart_ptr/smarttests.htm">timings</a></td></tr>
+<tr><td class="label"><a name="id23">[11]</a></td><td><em>(<a class="fn-backref" href="#id2">1</a>, <a class="fn-backref" href="#id4">2</a>)</em> Boost smart pointer <a class="reference" href="http://www.boost.org/libs/smart_ptr/smarttests.htm">timings</a></td></tr>
 </tbody>
 </table>
-<table class="docutils footnote" frame="void" id="id23" rules="none">
+<table class="docutils footnote" frame="void" id="id25" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a name="id23">[12]</a></td><td><em>(<a class="fn-backref" href="#id3">1</a>, <a class="fn-backref" href="#id5">2</a>)</em> <a class="reference" href="http://www.ntllib.org/asp.html">NTL</a>: Array vs std::vector and boost::shared_ptr</td></tr>
+<tr><td class="label"><a name="id25">[12]</a></td><td><em>(<a class="fn-backref" href="#id3">1</a>, <a class="fn-backref" href="#id5">2</a>)</em> <a class="reference" href="http://www.ntllib.org/asp.html">NTL</a>: Array vs std::vector and boost::shared_ptr</td></tr>
 </tbody>
 </table>
-<table class="docutils footnote" frame="void" id="id24" rules="none">
+<table class="docutils footnote" frame="void" id="id26" rules="none">
 <colgroup><col class="label" /><col /></colgroup>
 <tbody valign="top">
-<tr><td class="label"><a name="id24">[13]</a></td><td>Kevlin Henney, <a class="reference" href="http://www.two-sdg.demon.co.uk/curbralan/papers/europlop/NullObject.pdf">Null Object</a>, 2002.</td></tr>
+<tr><td class="label"><a name="id26">[13]</a></td><td>Kevlin Henney, <a class="reference" href="http://www.two-sdg.demon.co.uk/curbralan/papers/europlop/NullObject.pdf">Null Object</a>, 2002.</td></tr>
 </tbody>
 </table>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006.</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/ptr_container.rst
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_container.rst (original)
+++ trunk/libs/ptr_container/doc/ptr_container.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -8,10 +8,10 @@
 
 
 :Authors: Thorsten Ottosen
-:Contact: nesotto_at_[hidden]
-:organizations: `Department of Computer Science`_, Aalborg University, and `Dezide Aps`_
-:date: 3rd of May 2005
-:copyright: Thorsten Ottosen 2004-2005. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+:Contact: nesotto_at_[hidden] or tottosen_at_[hidden]
+:Organizations: `Department of Computer Science`_, Aalborg University, and `Dezide Aps`_
+:date: 29th of April 2006
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
 
 __ http://www.boost.org/LICENSE_1_0.txt
 
@@ -31,33 +31,36 @@
 * Motivation_
 * Tutorial_
 * Reference_
-
- - `Conventions <conventions.html>`_
- - `The Clonable Concept <reference.html#the-clonable-concept>`_
- - `The Clone Allocator Concept <reference.html#the-clone-allocator-concept>`_
- - `Pointer container adapters <reference.html#pointer-container-adapters>`_
- - `Sequence container classes <reference.html#sequence-containers>`_
-
- - `ptr_vector <ptr_vector.html>`_
- - `ptr_deque <ptr_deque.html>`_
- - `ptr_list <ptr_list.html>`_
- - `ptr_array <ptr_array.html>`_
- - `Associative container classes <reference.html#associative-containers>`_
-
- - `ptr_set <ptr_set.html>`_
- - `ptr_multiset <ptr_multiset.html>`_
- - `ptr_map <ptr_map.html>`_
- - `ptr_multimap <ptr_multimap.html>`_
- - `Indirected functions <indirect_fun.html>`_
- - `Class nullable <reference.html#class-nullable>`_
- - `Exception classes <reference.html#exception-classes>`_
 * `Usage guidelines`_
 * Examples_
 * `Library headers`_
 * FAQ_
+* `Upgrading from Boost v. 1.33.*`_
 * Acknowledgements_
 * References_
 
+..
+ - `Conventions <conventions.html>`_
+ - `The Clonable Concept <reference.html#the-clonable-concept>`_
+ - `The Clone Allocator Concept <reference.html#the-clone-allocator-concept>`_
+ - `Pointer container adapters <reference.html#pointer-container-adapters>`_
+ - `Sequence container classes <reference.html#sequence-containers>`_
+
+ - `ptr_vector <ptr_vector.html>`_
+ - `ptr_deque <ptr_deque.html>`_
+ - `ptr_list <ptr_list.html>`_
+ - `ptr_array <ptr_array.html>`_
+ - `Associative container classes <reference.html#associative-containers>`_
+
+ - `ptr_set <ptr_set.html>`_
+ - `ptr_multiset <ptr_multiset.html>`_
+ - `ptr_map <ptr_map.html>`_
+ - `ptr_multimap <ptr_multimap.html>`_
+ - `Indirected functions <indirect_fun.html>`_
+ - `Class nullable <reference.html#class-nullable>`_
+ - `Exception classes <reference.html#exception-classes>`_
+
+
 
 .. _Tutorial: tutorial.html
 
@@ -79,11 +82,14 @@
 
 Whenever a programmer wants to have a container of pointers to
 heap-allocated objects, there is usually only one exception-safe way:
-to make a container of pointer pointers like ``boost::shared_ptr``.
+to make a container of smart pointers like `boost::shared_ptr <../../smart_ptr/shared_ptr.htm>`_
 This approach is suboptimal if
 
 1. the stored objects are not shared, but owned exclusively, or
-2. the overhead implied by pointer pointers is inappropriate
+
+..
+
+2. the overhead implied by smart pointers is inappropriate
 
 This library therefore provides standard-like containers that are for storing
 heap-allocated or `cloned <reference.html#the-clonable-concept>`_ objects (or in case of a map, the mapped object must be
@@ -97,19 +103,88 @@
 The advantages of pointer containers are
 
 1. Exception-safe pointer storage and manipulation.
+
+..
+
 2. Notational convenience compared to the use of containers of pointers.
+
+..
+
 3. Can be used for types that are neither Assignable nor Copy Constructible.
-4. No memory-overhead as containers of pointer pointers can have (see [11]_ and [12]_).
-5. Usually faster than using containers of pointer pointers (see [11]_ and [12]_).
+
+..
+
+4. No memory-overhead as containers of smart pointers can have (see [11]_ and [12]_).
+
+..
+
+5. Usually faster than using containers of smart pointers (see [11]_ and [12]_).
+
+..
+
 6. The interface is slightly changed towards the domain of pointers
    instead of relying on the normal value-based interface. For example,
    now it is possible for ``pop_back()`` to return the removed element.
-7. Propagates constness s.t. one cannot modify the objects via a ``const_iterator``
+
+..
+
+7. Propagates constness s.t. one cannot modify the objects via a ``const_iterator``.
+
+..
+
+8. Built-in support for deep-copy semantics via the `The Clobable Concept`__
+
+.. __: reference.html#the-clonable-concept
 
 The disadvantages are
 
 1. Less flexible than containers of smart pointers like `boost::shared_ptr <../../smart_ptr/shared_ptr.htm>`_
 
+When you do need shared semantics, this library is not what you need.
+
+====================================
+ Upgrading from Boost v. ``1.33.*``
+====================================
+
+If you upgrade from one of these versions of Boost, then there has been one
+major interface change: map iterators now mimic iterators from ``std::map``.
+Previously you may have written ::
+
+ for( boost::ptr_map<std::string,T>::iterator i = m.begin(), e = m.end();
+ i != e; ++i )
+ {
+ std::cout << "key:" << i.key();
+ std::cout << "value:" << *i;
+ i->foo(); // call T::foo()
+ }
+
+and this now needs to be converted into ::
+
+ for( boost::ptr_map<std::string,T>::iterator i = m.begin(), e = m.end();
+ i != e; ++i )
+ {
+ std::cout << "key:" << i->first;
+ std::cout << "value:" << *i->second;
+ i->second->foo(); // call T::foo()
+ }
+
+Apart from the above change, the library now also introduces
+
+- ``std::auto_ptr<T>`` overloads::
+
+ std::auto_ptr<T> p( new T );
+ container.push_back( p );
+
+- Derived-to-Base conversion in ``transfer()``::
+
+ boost::ptr_vector<Base> vec;
+ boost::ptr_list<Derived> list;
+ ...
+ vec.transfer( vec.begin(), list ); // now ok
+
+Also note that `Boost.Assign <../../assign/index.html>`_ introduces better support
+for pointer containers.
+
 ================
 Acknowledgements
 ================
@@ -129,6 +204,7 @@
 - Russell Hind for help with Borland compatibility
 - Jonathan Wakely for his great help with GCC compatibility and bug fixes
 - Pavel Chikulaev for comments and bug-fixes
+- Andreas Hommel for fixing the nasty Metrowerks bug
 
 ==========
 References
@@ -177,5 +253,9 @@
 .. _pointainer: http://ootips.org/yonat/4dev/pointainer.h
 
 
-:copyright: Thorsten Ottosen 2004-2005.
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006.
 

Modified: trunk/libs/ptr_container/doc/ptr_deque.html
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_deque.html (original)
+++ trunk/libs/ptr_container/doc/ptr_deque.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -293,10 +293,18 @@
 <h1><a id="class-ptr-deque" name="class-ptr-deque">Class <tt class="docutils literal"><span class="pre">ptr_deque</span></tt></a></h1>
 <p>A <tt class="docutils literal"><span class="pre">ptr_deque&lt;T&gt;</span></tt> is a pointer container that uses an underlying <tt class="docutils literal"><span class="pre">std:deque&lt;void*&gt;</span></tt>
 to store the pointers.</p>
-<p><strong>See also:</strong></p>
+<p><strong>Hierarchy:</strong></p>
 <ul class="simple">
-<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a></li>
-<li><a class="reference" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a></li>
+<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a><ul>
+<li><a class="reference" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a><ul>
+<li><a class="reference" href="ptr_vector.html">ptr_vector</a></li>
+<li><a class="reference" href="ptr_list.html">ptr_list</a></li>
+<li><tt class="docutils literal"><span class="pre">ptr_deque</span></tt></li>
+<li><a class="reference" href="ptr_array.html">ptr_array</a></li>
+</ul>
+</li>
+</ul>
+</li>
 </ul>
 <p><strong>Navigate:</strong></p>
 <ul class="simple">
@@ -444,11 +452,11 @@
 </blockquote>
 </li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/ptr_deque.rst
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_deque.rst (original)
+++ trunk/libs/ptr_container/doc/ptr_deque.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -10,13 +10,16 @@
 A ``ptr_deque<T>`` is a pointer container that uses an underlying ``std:deque<void*>``
 to store the pointers.
 
-**See also:**
+**Hierarchy:**
 
-- reversible_ptr_container_
-- ptr_sequence_adapter_
+- `reversible_ptr_container <reversible_ptr_container.html>`_
 
-.. _reversible_ptr_container: reversible_ptr_container.html
-.. _ptr_map: ptr_map.html
+ - `ptr_sequence_adapter <ptr_sequence_adapter.html>`_
+
+ - `ptr_vector <ptr_vector.html>`_
+ - `ptr_list <ptr_list.html>`_
+ - ``ptr_deque``
+ - `ptr_array <ptr_array.html>`_
 
 **Navigate:**
 
@@ -165,6 +168,12 @@
 
     - Exception safety: Nothrow guarantee
 
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
 
-:copyright: Thorsten Ottosen 2004-2005.
 

Modified: trunk/libs/ptr_container/doc/ptr_list.html
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_list.html (original)
+++ trunk/libs/ptr_container/doc/ptr_list.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -293,10 +293,18 @@
 <h1><a id="class-ptr-list" name="class-ptr-list">Class <tt class="docutils literal"><span class="pre">ptr_list</span></tt></a></h1>
 <p>A <tt class="docutils literal"><span class="pre">ptr_list&lt;T&gt;</span></tt> is a pointer container that uses an underlying <tt class="docutils literal"><span class="pre">std:list&lt;void*&gt;</span></tt>
 to store the pointers.</p>
-<p><strong>See also:</strong></p>
+<p><strong>Hierarchy:</strong></p>
 <ul class="simple">
-<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a></li>
-<li><a class="reference" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a></li>
+<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a><ul>
+<li><a class="reference" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a><ul>
+<li><a class="reference" href="ptr_vector.html">ptr_vector</a></li>
+<li><tt class="docutils literal"><span class="pre">ptr_list</span></tt></li>
+<li><a class="reference" href="ptr_deque.html">ptr_deque</a></li>
+<li><a class="reference" href="ptr_array.html">ptr_array</a></li>
+</ul>
+</li>
+</ul>
+</li>
 </ul>
 <p><strong>Navigate:</strong></p>
 <ul class="simple">
@@ -418,11 +426,11 @@
 </blockquote>
 </li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/ptr_list.rst
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_list.rst (original)
+++ trunk/libs/ptr_container/doc/ptr_list.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -10,15 +10,17 @@
 A ``ptr_list<T>`` is a pointer container that uses an underlying ``std:list<void*>``
 to store the pointers.
 
-**See also:**
+**Hierarchy:**
 
-- reversible_ptr_container_
-- ptr_sequence_adapter_
+- `reversible_ptr_container <reversible_ptr_container.html>`_
 
-.. _reversible_ptr_container: reversible_ptr_container.html
-.. _ptr_array: ptr_array.html
-.. _`ptr_sequence_adapter`: ptr_sequence_adapter.html
+ - `ptr_sequence_adapter <ptr_sequence_adapter.html>`_
 
+ - `ptr_vector <ptr_vector.html>`_
+ - ``ptr_list``
+ - `ptr_deque <ptr_deque.html>`_
+ - `ptr_array <ptr_array.html>`_
+
 **Navigate:**
 
 - `home <ptr_container.html>`_
@@ -142,6 +144,12 @@
 
     - Throws: nothing
 
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
 
-:copyright: Thorsten Ottosen 2004-2005.
 

Modified: trunk/libs/ptr_container/doc/ptr_map.html
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_map.html (original)
+++ trunk/libs/ptr_container/doc/ptr_map.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -292,14 +292,25 @@
 <h2 class="subtitle" id="class-ptr-map">Class <tt class="docutils literal"><span class="pre">ptr_map</span></tt></h2>
 <p>A <tt class="docutils literal"><span class="pre">ptr_map&lt;Key,T&gt;</span></tt> is a pointer container that uses an underlying <tt class="docutils literal"><span class="pre">std::map&lt;Key,void*&gt;</span></tt>
 to store the pointers.</p>
-<p><strong>See also:</strong></p>
+<p><strong>Hierarchy:</strong></p>
 <ul class="simple">
-<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a></li>
-<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a></li>
+<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a><ul>
+<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a><ul>
+<li><a class="reference" href="ptr_set_adapter.html">ptr_set_adapter</a></li>
+<li><a class="reference" href="ptr_multiset_adapter.html">ptr_multiset_adapter</a></li>
 <li><a class="reference" href="ptr_map_adapter.html">ptr_map_adapter</a></li>
-<li><a class="reference" href="reference.html#map-iterator-operations">new map iterators</a></li>
+<li><a class="reference" href="ptr_multimap_adapter.html">ptr_multi_map_adapter</a><ul>
+<li><a class="reference" href="ptr_set.html">ptr_set</a></li>
+<li><a class="reference" href="ptr_multiset.html">ptr_multi_set</a></li>
+<li><tt class="docutils literal"><span class="pre">ptr_map</span></tt></li>
+<li><a class="reference" href="ptr_multimap.html">ptr_multimap</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
 </ul>
-<!-- class `indirect_fun <indirect_fun.html>`_ -->
 <p><strong>Navigate:</strong></p>
 <ul class="simple">
 <li><a class="reference" href="ptr_container.html">home</a></li>
@@ -331,11 +342,11 @@
 
 } // namespace 'boost'
 </pre>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/ptr_map.rst
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_map.rst (original)
+++ trunk/libs/ptr_container/doc/ptr_map.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -10,18 +10,21 @@
 A ``ptr_map<Key,T>`` is a pointer container that uses an underlying ``std::map<Key,void*>``
 to store the pointers.
 
-**See also:**
+**Hierarchy:**
 
-- reversible_ptr_container_
-- associative_ptr_container_
-- ptr_map_adapter_
-- `new map iterators <reference.html#map-iterator-operations>`_
-
-.. _reversible_ptr_container: reversible_ptr_container.html
-.. _associative_ptr_container: associative_ptr_container.html
-.. _ptr_map_adapter: ptr_map_adapter.html
-.. class `indirect_fun <indirect_fun.html>`_
-
+- `reversible_ptr_container <reversible_ptr_container.html>`_
+
+ - `associative_ptr_container <associative_ptr_container.html>`_
+
+ - `ptr_set_adapter <ptr_set_adapter.html>`_
+ - `ptr_multiset_adapter <ptr_multiset_adapter.html>`_
+ - `ptr_map_adapter <ptr_map_adapter.html>`_
+ - `ptr_multi_map_adapter <ptr_multimap_adapter.html>`_
+
+ - `ptr_set <ptr_set.html>`_
+ - `ptr_multi_set <ptr_multiset.html>`_
+ - ``ptr_map``
+ - `ptr_multimap <ptr_multimap.html>`_
 
 **Navigate:**
 
@@ -58,6 +61,12 @@
         
         } // namespace 'boost'
 
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
 
-:copyright: Thorsten Ottosen 2004-2005.
 

Modified: trunk/libs/ptr_container/doc/ptr_map_adapter.html
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_map_adapter.html (original)
+++ trunk/libs/ptr_container/doc/ptr_map_adapter.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -294,12 +294,24 @@
 <p>This class is used to build custom pointer containers with
 an underlying map-like container. The interface of the class is an extension
 of the interface from <tt class="docutils literal"><span class="pre">associative_ptr_container</span></tt>.</p>
-<p><strong>See also:</strong></p>
+<p><strong>Hierarchy:</strong></p>
 <ul class="simple">
-<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a></li>
-<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a></li>
+<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a><ul>
+<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a><ul>
+<li><a class="reference" href="ptr_set_adapter.html">ptr_set_adapter</a></li>
+<li><a class="reference" href="ptr_multiset_adapter.html">ptr_multiset_adapter</a></li>
+<li><tt class="docutils literal"><span class="pre">ptr_map_adapter</span></tt></li>
+<li><a class="reference" href="ptr_multimap_adapter.html">ptr_multi_map_adapter</a><ul>
+<li><a class="reference" href="ptr_set.html">ptr_set</a></li>
+<li><a class="reference" href="ptr_multiset.html">ptr_multi_set</a></li>
 <li><a class="reference" href="ptr_map.html">ptr_map</a></li>
-<li><a class="reference" href="reference.html#map-iterator-operations">new map iterators</a></li>
+<li><a class="reference" href="ptr_multimap.html">ptr_multimap</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
 </ul>
 <p><strong>Navigate:</strong></p>
 <ul class="simple">
@@ -318,6 +330,16 @@
     &gt;
     class ptr_map_adapter
     {
+ public: // <a class="reference" href="#typedefs">typedefs</a>
+ typedef VoidPtrMap::key_type key_type;
+ typedef T* mapped_type;
+ typedef T&amp; mapped_reference;
+ typedef const T&amp; const_mapped_reference;
+ typedef ... value_type;
+ typedef ... reference;
+ typedef ... const_reference;
+ typedef ... pointer;
+ typedef ... const_pointer;
         
     public: // <a class="reference" href="#modifiers">modifiers</a>
         std::pair&lt;iterator,bool&gt; insert( key_type&amp; k, T* x );
@@ -344,6 +366,33 @@
 <div class="section">
 <h1><a id="semantics" name="semantics">Semantics</a></h1>
 <div class="section">
+<h2><a id="semantics-typedefs" name="semantics-typedefs"><span id="typedefs"></span>Semantics: typedefs</a></h2>
+<p>The following types are implementation defined:</p>
+<pre class="literal-block">
+typedef ... value_type;
+typedef ... reference;
+typedef ... const_reference;
+typedef ... pointer;
+typedef ... const_pointer;
+</pre>
+<p>However, the structure of the type mimics <tt class="docutils literal"><span class="pre">std::pair</span></tt> s.t. one
+can use <tt class="docutils literal"><span class="pre">first</span></tt> and <tt class="docutils literal"><span class="pre">second</span></tt> members. The reference-types
+are not real references and the pointer-types are not real pointers.
+However, one may still write</p>
+<pre class="literal-block">
+map_type::value_type a_value = *m.begin();
+a_value.second-&gt;foo();
+map_type::reference a_reference = *m.begin();
+a_reference.second-&gt;foo();
+map_type::const_reference a_creference = *const_begin(m);
+map_type::pointer a_pointer = &amp;*m.begin();
+a_pointer-&gt;second-&gt;foo();
+map_type::const_pointer a_cpointer = &amp;*const_begin(m);
+</pre>
+<p>The difference compared to <tt class="docutils literal"><span class="pre">std::map&lt;Key,T*&gt;</span></tt> is that constness
+is propagated to the pointer (that is, to <tt class="docutils literal"><span class="pre">second</span></tt>) in <tt class="docutils literal"><span class="pre">const_itertor</span></tt>.</p>
+</div>
+<div class="section">
 <h2><a id="semantics-modifiers" name="semantics-modifiers"><span id="modifiers"></span>Semantics: modifiers</a></h2>
 <ul>
 <li><p class="first"><tt class="docutils literal"><span class="pre">std::pair&lt;iterator,bool&gt;</span> <span class="pre">insert(</span> <span class="pre">key_type&amp;</span> <span class="pre">k,</span> <span class="pre">value_type</span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
@@ -433,11 +482,11 @@
 </blockquote>
 </li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/ptr_map_adapter.rst
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_map_adapter.rst (original)
+++ trunk/libs/ptr_container/doc/ptr_map_adapter.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -11,17 +11,22 @@
 an underlying map-like container. The interface of the class is an extension
 of the interface from ``associative_ptr_container``.
 
-**See also:**
+**Hierarchy:**
 
-- reversible_ptr_container_
-- associative_ptr_container_
-- ptr_map_
-- `new map iterators <reference.html#map-iterator-operations>`_
-
-.. _reversible_ptr_container: reversible_ptr_container.html
-.. _associative_ptr_container: associative_ptr_container.html
-.. _ptr_map: ptr_map.html
+- `reversible_ptr_container <reversible_ptr_container.html>`_
 
+ - `associative_ptr_container <associative_ptr_container.html>`_
+
+ - `ptr_set_adapter <ptr_set_adapter.html>`_
+ - `ptr_multiset_adapter <ptr_multiset_adapter.html>`_
+ - ``ptr_map_adapter``
+ - `ptr_multi_map_adapter <ptr_multimap_adapter.html>`_
+
+ - `ptr_set <ptr_set.html>`_
+ - `ptr_multi_set <ptr_multiset.html>`_
+ - `ptr_map <ptr_map.html>`_
+ - `ptr_multimap <ptr_multimap.html>`_
+
 **Navigate:**
 
 - `home <ptr_container.html>`_
@@ -42,6 +47,16 @@
>
             class ptr_map_adapter
             {
+ public: // `typedefs`_
+ typedef VoidPtrMap::key_type key_type;
+ typedef T* mapped_type;
+ typedef T& mapped_reference;
+ typedef const T& const_mapped_reference;
+ typedef ... value_type;
+ typedef ... reference;
+ typedef ... const_reference;
+ typedef ... pointer;
+ typedef ... const_pointer;
                 
             public: // `modifiers`_
                 std::pair<iterator,bool> insert( key_type& k, T* x );
@@ -68,6 +83,36 @@
 Semantics
 ---------
 
+.. _`typedefs`:
+
+Semantics: typedefs
+^^^^^^^^^^^^^^^^^^^
+
+The following types are implementation defined::
+
+ typedef ... value_type;
+ typedef ... reference;
+ typedef ... const_reference;
+ typedef ... pointer;
+ typedef ... const_pointer;
+
+However, the structure of the type mimics ``std::pair`` s.t. one
+can use ``first`` and ``second`` members. The reference-types
+are not real references and the pointer-types are not real pointers.
+However, one may still write ::
+
+ map_type::value_type a_value = *m.begin();
+ a_value.second->foo();
+ map_type::reference a_reference = *m.begin();
+ a_reference.second->foo();
+ map_type::const_reference a_creference = *const_begin(m);
+ map_type::pointer a_pointer = &*m.begin();
+ a_pointer->second->foo();
+ map_type::const_pointer a_cpointer = &*const_begin(m);
+
+The difference compared to ``std::map<Key,T*>`` is that constness
+is propagated to the pointer (that is, to ``second``) in ``const_itertor``.
+
 .. _`modifiers`:
 
 Semantics: modifiers
@@ -147,6 +192,12 @@
 
    - Effects: ``return transfer( from.begin(), from.end(), from );``.
 
+.. raw:: html
+
+ <hr>
  
-:copyright: Thorsten Ottosen 2004-2005.
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
+
 

Modified: trunk/libs/ptr_container/doc/ptr_multimap.html
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_multimap.html (original)
+++ trunk/libs/ptr_container/doc/ptr_multimap.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -292,12 +292,24 @@
 <h2 class="subtitle" id="class-ptr-multimap">Class <tt class="docutils literal"><span class="pre">ptr_multimap</span></tt></h2>
 <p>A <tt class="docutils literal"><span class="pre">ptr_multimap&lt;Key,T&gt;</span></tt> is a pointer container that uses an underlying <tt class="docutils literal"><span class="pre">std::multimap&lt;Key,void*&gt;</span></tt>
 to store the pointers.</p>
-<p><strong>See also:</strong></p>
+<p><strong>Hierarchy:</strong></p>
 <ul class="simple">
-<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a></li>
-<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a></li>
-<li><a class="reference" href="ptr_multimap_adapter.html">ptr_multimap_adapter</a></li>
-<li><a class="reference" href="reference.html#map-iterator-operations">new map iterators</a></li>
+<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a><ul>
+<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a><ul>
+<li><a class="reference" href="ptr_set_adapter.html">ptr_set_adapter</a></li>
+<li><a class="reference" href="ptr_multiset_adapter.html">ptr_multiset_adapter</a></li>
+<li><a class="reference" href="ptr_map_adapter.html">ptr_map_adapter</a></li>
+<li><a class="reference" href="ptr_multimap_adapter.html">ptr_multi_map_adapter</a><ul>
+<li><a class="reference" href="ptr_set.html">ptr_set</a></li>
+<li><a class="reference" href="ptr_multiset.html">ptr_multi_set</a></li>
+<li><a class="reference" href="ptr_map.html">ptr_map</a></li>
+<li><tt class="docutils literal"><span class="pre">ptr_multimap</span></tt></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
 </ul>
 <p><strong>Navigate:</strong></p>
 <ul class="simple">
@@ -333,7 +345,7 @@
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/ptr_multimap.rst
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_multimap.rst (original)
+++ trunk/libs/ptr_container/doc/ptr_multimap.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -10,12 +10,22 @@
 A ``ptr_multimap<Key,T>`` is a pointer container that uses an underlying ``std::multimap<Key,void*>``
 to store the pointers.
 
-**See also:**
 
-- reversible_ptr_container_
-- associative_ptr_container_
-- ptr_multimap_adapter_
-- `new map iterators <reference.html#map-iterator-operations>`_
+**Hierarchy:**
+
+- `reversible_ptr_container <reversible_ptr_container.html>`_
+
+ - `associative_ptr_container <associative_ptr_container.html>`_
+
+ - `ptr_set_adapter <ptr_set_adapter.html>`_
+ - `ptr_multiset_adapter <ptr_multiset_adapter.html>`_
+ - `ptr_map_adapter <ptr_map_adapter.html>`_
+ - `ptr_multi_map_adapter <ptr_multimap_adapter.html>`_
+
+ - `ptr_set <ptr_set.html>`_
+ - `ptr_multi_set <ptr_multiset.html>`_
+ - `ptr_map <ptr_map.html>`_
+ - ``ptr_multimap``
 
 **Navigate:**
 
@@ -57,5 +67,8 @@
         } // namespace 'boost'
 
 
-:copyright: Thorsten Ottosen 2004-2005.
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
+
 

Modified: trunk/libs/ptr_container/doc/ptr_multimap_adapter.html
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_multimap_adapter.html (original)
+++ trunk/libs/ptr_container/doc/ptr_multimap_adapter.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -294,12 +294,24 @@
 <p>This class is used to build custom pointer containers with
 an underlying multimap-like container. The interface of the class is an extension
 of the interface from <tt class="docutils literal"><span class="pre">associative_ptr_container</span></tt>.</p>
-<p><strong>See also:</strong></p>
+<p><strong>Hierarchy:</strong></p>
 <ul class="simple">
-<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a></li>
-<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a></li>
+<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a><ul>
+<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a><ul>
+<li><a class="reference" href="ptr_set_adapter.html">ptr_set_adapter</a></li>
+<li><a class="reference" href="ptr_multiset_adapter.html">ptr_multiset_adapter</a></li>
+<li><a class="reference" href="ptr_map_adapter.html">ptr_map_adapter</a></li>
+<li><tt class="docutils literal"><span class="pre">ptr_multi_map_adapter</span></tt><ul>
+<li><a class="reference" href="ptr_set.html">ptr_set</a></li>
+<li><a class="reference" href="ptr_multiset.html">ptr_multi_set</a></li>
+<li><a class="reference" href="ptr_map.html">ptr_map</a></li>
 <li><a class="reference" href="ptr_multimap.html">ptr_multimap</a></li>
-<li><a class="reference" href="ptr_container.html#map-iterator-operations">new map iterators</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
 </ul>
 <p><strong>Navigate:</strong></p>
 <ul class="simple">
@@ -318,6 +330,16 @@
     &gt;
     class ptr_multimap_adapter
     {
+ public: // <a class="reference" href="#typedefs">typedefs</a>
+ typedef VoidPtrMap::key_type key_type;
+ typedef T* mapped_type;
+ typedef T&amp; mapped_reference;
+ typedef const T&amp; const_mapped_reference;
+ typedef ... value_type;
+ typedef ... reference;
+ typedef ... const_reference;
+ typedef ... pointer;
+ typedef ... const_pointer;
         
     public: // <a class="reference" href="#modifiers">modifiers</a>
         iterator insert( key_type&amp; k, T* x );
@@ -338,6 +360,34 @@
 </div>
 <div class="section">
 <h1><a id="semantics" name="semantics">Semantics</a></h1>
+<p>. <span class="target" id="typedefs">typedefs</span>:</p>
+<div class="section">
+<h2><a id="semantics-typedefs" name="semantics-typedefs">Semantics: typedefs</a></h2>
+<p>The following types are implementation defined:</p>
+<pre class="literal-block">
+typedef ... value_type;
+typedef ... reference;
+typedef ... const_reference;
+typedef ... pointer;
+typedef ... const_pointer;
+</pre>
+<p>However, the structure of the type mimics <tt class="docutils literal"><span class="pre">std::pair</span></tt> s.t. one
+can use <tt class="docutils literal"><span class="pre">first</span></tt> and <tt class="docutils literal"><span class="pre">second</span></tt> members. The reference-types
+are not real references and the pointer-types are not real pointers.
+However, one may still write</p>
+<pre class="literal-block">
+map_type::value_type a_value = *m.begin();
+a_value.second-&gt;foo();
+map_type::reference a_reference = *m.begin();
+a_reference.second-&gt;foo();
+map_type::const_reference a_creference = *const_begin(m);
+map_type::pointer a_pointer = &amp;*m.begin();
+a_pointer-&gt;second-&gt;foo();
+map_type::const_pointer a_cpointer = &amp;*const_begin(m);
+</pre>
+<p>The difference compared to <tt class="docutils literal"><span class="pre">std::map&lt;Key,T*&gt;</span></tt> is that constness
+is propagated to the pointer (that is, to <tt class="docutils literal"><span class="pre">second</span></tt>) in <tt class="docutils literal"><span class="pre">const_itertor</span></tt>.</p>
+</div>
 <div class="section">
 <h2><a id="semantics-modifiers" name="semantics-modifiers"><span id="modifiers"></span>Semantics: modifiers</a></h2>
 <ul>
@@ -416,11 +466,11 @@
 </blockquote>
 </li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/ptr_multimap_adapter.rst
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_multimap_adapter.rst (original)
+++ trunk/libs/ptr_container/doc/ptr_multimap_adapter.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -11,17 +11,21 @@
 an underlying multimap-like container. The interface of the class is an extension
 of the interface from ``associative_ptr_container``.
 
-**See also:**
+**Hierarchy:**
 
-- reversible_ptr_container_
-- associative_ptr_container_
-- ptr_multimap_
-- `new map iterators`__
-
-.. _reversible_ptr_container: reversible_ptr_container.html
-.. _associative_ptr_container: associative_ptr_container.html
-.. _ptr_multimap: ptr_multimap.html
-__ ptr_container.html#map-iterator-operations
+- `reversible_ptr_container <reversible_ptr_container.html>`_
+
+ - `associative_ptr_container <associative_ptr_container.html>`_
+
+ - `ptr_set_adapter <ptr_set_adapter.html>`_
+ - `ptr_multiset_adapter <ptr_multiset_adapter.html>`_
+ - `ptr_map_adapter <ptr_map_adapter.html>`_
+ - ``ptr_multi_map_adapter``
+
+ - `ptr_set <ptr_set.html>`_
+ - `ptr_multi_set <ptr_multiset.html>`_
+ - `ptr_map <ptr_map.html>`_
+ - `ptr_multimap <ptr_multimap.html>`_
 
 **Navigate:**
 
@@ -43,6 +47,16 @@
>
             class ptr_multimap_adapter
             {
+ public: // `typedefs`_
+ typedef VoidPtrMap::key_type key_type;
+ typedef T* mapped_type;
+ typedef T& mapped_reference;
+ typedef const T& const_mapped_reference;
+ typedef ... value_type;
+ typedef ... reference;
+ typedef ... const_reference;
+ typedef ... pointer;
+ typedef ... const_pointer;
                 
             public: // `modifiers`_
                 iterator insert( key_type& k, T* x );
@@ -64,6 +78,36 @@
 Semantics
 ---------
 
+. _`typedefs`:
+
+Semantics: typedefs
+^^^^^^^^^^^^^^^^^^^
+
+The following types are implementation defined::
+
+ typedef ... value_type;
+ typedef ... reference;
+ typedef ... const_reference;
+ typedef ... pointer;
+ typedef ... const_pointer;
+
+However, the structure of the type mimics ``std::pair`` s.t. one
+can use ``first`` and ``second`` members. The reference-types
+are not real references and the pointer-types are not real pointers.
+However, one may still write ::
+
+ map_type::value_type a_value = *m.begin();
+ a_value.second->foo();
+ map_type::reference a_reference = *m.begin();
+ a_reference.second->foo();
+ map_type::const_reference a_creference = *const_begin(m);
+ map_type::pointer a_pointer = &*m.begin();
+ a_pointer->second->foo();
+ map_type::const_pointer a_cpointer = &*const_begin(m);
+
+The difference compared to ``std::map<Key,T*>`` is that constness
+is propagated to the pointer (that is, to ``second``) in ``const_itertor``.
+
 .. _`modifiers`:
 
 Semantics: modifiers
@@ -143,6 +187,12 @@
 
    - Exception safety: Basic guarantee
  
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
 
-:copyright: Thorsten Ottosen 2004-2005.
 

Modified: trunk/libs/ptr_container/doc/ptr_multiset.html
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_multiset.html (original)
+++ trunk/libs/ptr_container/doc/ptr_multiset.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -292,11 +292,27 @@
 <h2 class="subtitle" id="class-ptr-multiset">Class <tt class="docutils literal"><span class="pre">ptr_multiset</span></tt></h2>
 <p>A <tt class="docutils literal"><span class="pre">ptr_multiset&lt;T&gt;</span></tt> is a pointer container that uses an underlying <tt class="docutils literal"><span class="pre">std::multiset&lt;void*&gt;</span></tt>
 to store the pointers.</p>
-<p><strong>See also:</strong></p>
+<p><strong>Hierarchy:</strong></p>
 <ul class="simple">
-<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a></li>
-<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a></li>
+<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a><ul>
+<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a><ul>
+<li><a class="reference" href="ptr_set_adapter.html">ptr_set_adapter</a></li>
 <li><a class="reference" href="ptr_multiset_adapter.html">ptr_multiset_adapter</a></li>
+<li><a class="reference" href="ptr_map_adapter.html">ptr_map_adapter</a></li>
+<li><a class="reference" href="ptr_multimap_adapter.html">ptr_multi_map_adapter</a><ul>
+<li><a class="reference" href="ptr_set.html">ptr_set</a></li>
+<li><tt class="docutils literal"><span class="pre">ptr_multi_set</span></tt></li>
+<li><a class="reference" href="ptr_map.html">ptr_map</a></li>
+<li><a class="reference" href="ptr_multimap.html">ptr_multimap</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+<p><strong>See also:</strong></p>
+<ul class="simple">
 <li><a class="reference" href="indirect_fun.html">void_ptr_indirect_fun</a></li>
 </ul>
 <p><strong>Navigate:</strong></p>
@@ -333,11 +349,11 @@
 <ul class="simple">
 <li>Using <tt class="docutils literal"><span class="pre">nullable&lt;T&gt;</span></tt> as <tt class="docutils literal"><span class="pre">Key</span></tt> is meaningless and not allowed</li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/ptr_multiset.rst
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_multiset.rst (original)
+++ trunk/libs/ptr_container/doc/ptr_multiset.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -10,18 +10,26 @@
 A ``ptr_multiset<T>`` is a pointer container that uses an underlying ``std::multiset<void*>``
 to store the pointers.
 
+**Hierarchy:**
+
+- `reversible_ptr_container <reversible_ptr_container.html>`_
+
+ - `associative_ptr_container <associative_ptr_container.html>`_
+
+ - `ptr_set_adapter <ptr_set_adapter.html>`_
+ - `ptr_multiset_adapter <ptr_multiset_adapter.html>`_
+ - `ptr_map_adapter <ptr_map_adapter.html>`_
+ - `ptr_multi_map_adapter <ptr_multimap_adapter.html>`_
+
+ - `ptr_set <ptr_set.html>`_
+ - ``ptr_multi_set``
+ - `ptr_map <ptr_map.html>`_
+ - `ptr_multimap <ptr_multimap.html>`_
+
 **See also:**
 
-- reversible_ptr_container_
-- associative_ptr_container_
-- ptr_multiset_adapter_
 - `void_ptr_indirect_fun <indirect_fun.html>`_
 
-.. _reversible_ptr_container: reversible_ptr_container.html
-.. _associative_ptr_container: associative_ptr_container.html
-.. _ptr_multiset_adapter: ptr_multiset_adapter.html
-.. _`indirect predicates`: indirect_fun.html
-
 **Navigate:**
 
 - `home <ptr_container.html>`_
@@ -60,6 +68,12 @@
 
 - Using ``nullable<T>`` as ``Key`` is meaningless and not allowed
 
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
 
-:copyright: Thorsten Ottosen 2004-2005.
 

Modified: trunk/libs/ptr_container/doc/ptr_multiset_adapter.html
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_multiset_adapter.html (original)
+++ trunk/libs/ptr_container/doc/ptr_multiset_adapter.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -294,11 +294,24 @@
 <p>This class is used to build custom pointer containers with
 an underlying multiset-like container. The interface of the class is an extension
 of the interface from <tt class="docutils literal"><span class="pre">associative_ptr_container</span></tt>.</p>
-<p><strong>See also:</strong></p>
+<p><strong>Hierarchy:</strong></p>
 <ul class="simple">
-<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a></li>
-<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a></li>
-<li><a class="reference" href="ptr_multiset.html">ptr_multiset</a></li>
+<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a><ul>
+<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a><ul>
+<li><a class="reference" href="ptr_set_adapter.html">ptr_set_adapter</a></li>
+<li><tt class="docutils literal"><span class="pre">ptr_multiset_adapter</span></tt></li>
+<li><a class="reference" href="ptr_map_adapter.html">ptr_map_adapter</a></li>
+<li><a class="reference" href="ptr_multimap_adapter.html">ptr_multi_map_adapter</a><ul>
+<li><a class="reference" href="ptr_set.html">ptr_set</a></li>
+<li><a class="reference" href="ptr_multiset.html">ptr_multi_set</a></li>
+<li><a class="reference" href="ptr_map.html">ptr_map</a></li>
+<li><a class="reference" href="ptr_multimap.html">ptr_multimap</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
 </ul>
 <p><strong>Navigate:</strong></p>
 <ul class="simple">
@@ -404,11 +417,11 @@
 </blockquote>
 </li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/ptr_multiset_adapter.rst
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_multiset_adapter.rst (original)
+++ trunk/libs/ptr_container/doc/ptr_multiset_adapter.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -11,15 +11,21 @@
 an underlying multiset-like container. The interface of the class is an extension
 of the interface from ``associative_ptr_container``.
 
-**See also:**
+**Hierarchy:**
 
-- reversible_ptr_container_
-- associative_ptr_container_
-- ptr_multiset_
-
-.. _reversible_ptr_container: reversible_ptr_container.html
-.. _associative_ptr_container: associative_ptr_container.html
-.. _ptr_multiset: ptr_multiset.html
+- `reversible_ptr_container <reversible_ptr_container.html>`_
+
+ - `associative_ptr_container <associative_ptr_container.html>`_
+
+ - `ptr_set_adapter <ptr_set_adapter.html>`_
+ - ``ptr_multiset_adapter``
+ - `ptr_map_adapter <ptr_map_adapter.html>`_
+ - `ptr_multi_map_adapter <ptr_multimap_adapter.html>`_
+
+ - `ptr_set <ptr_set.html>`_
+ - `ptr_multi_set <ptr_multiset.html>`_
+ - `ptr_map <ptr_map.html>`_
+ - `ptr_multimap <ptr_multimap.html>`_
 
 **Navigate:**
 
@@ -126,6 +132,12 @@
 
    - Exception safety: Basic guarantee
  
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
 
-:copyright: Thorsten Ottosen 2004-2005.
 

Modified: trunk/libs/ptr_container/doc/ptr_sequence_adapter.html
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_sequence_adapter.html (original)
+++ trunk/libs/ptr_container/doc/ptr_sequence_adapter.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -294,15 +294,24 @@
 <p>This section describes all the common operations for all the pointer
 sequences:</p>
 <ul class="simple">
-<li><a class="reference" href="ptr_vector.html">ptr_vector</a>,</li>
-<li><a class="reference" href="ptr_list.html">ptr_list</a>,</li>
-<li><a class="reference" href="ptr_deque.html">ptr_deque</a>,</li>
+<li><a class="reference" href="ptr_vector.html">ptr_vector</a></li>
+<li><a class="reference" href="ptr_list.html">ptr_list</a></li>
+<li><a class="reference" href="ptr_deque.html">ptr_deque</a></li>
 </ul>
 <p>The <tt class="docutils literal"><span class="pre">ptr_sequence_adapter</span></tt> is also a concrete class that you can use to create custom pointer
 containers from.</p>
-<p><strong>See also:</strong></p>
+<p><strong>Hierarchy:</strong></p>
 <ul class="simple">
-<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a></li>
+<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a><ul>
+<li><tt class="docutils literal"><span class="pre">ptr_sequence_adapter</span></tt><ul>
+<li><a class="reference" href="ptr_vector.html">ptr_vector</a></li>
+<li><a class="reference" href="ptr_list.html">ptr_list</a></li>
+<li><a class="reference" href="ptr_deque.html">ptr_deque</a></li>
+<li><a class="reference" href="ptr_array.html">ptr_array</a></li>
+</ul>
+</li>
+</ul>
+</li>
 </ul>
 <p><strong>Navigate:</strong></p>
 <ul class="simple">
@@ -352,14 +361,16 @@
         iterator erase( const Range&amp; r );
 
     public: // <a class="reference" href="#pointer-container-requirements">pointer container requirements</a>
-
- void transfer( iterator before, iterator object,
- ptr_sequence_adapter&amp; from );
- void transfer( iterator before, iterator first, iterator last,
- ptr_sequence_adapter&amp; from );
- void template&lt; class Range&gt;
- void transfer( iterator before, const Range&amp; r, ptr_sequence_adapter&amp; from );
- void transfer( iterator before, ptr_sequence_adapter&amp; from );
+ template&lt; class PtrSequence &gt;
+ void transfer( iterator before, typename PtrSequence::iterator object,
+ PtrSequence&amp; from );
+ template&lt; class PtrSequence &gt;
+ void transfer( iterator before, typename PtrSequence::iterator first, typename PtrSequence::iterator last,
+ PtrSequence&amp; from );
+ void template&lt; class PtrSequence, class Range &gt;
+ void transfer( iterator before, const Range&amp; r, PtrSequence&amp; from );
+ template&lt; class PtrSequence &gt;
+ void transfer( iterator before, PtrSequence&amp; from );
 
     public: // <a class="reference" href="#algorithms">algorithms</a>
 
@@ -608,47 +619,49 @@
 </div>
 <div class="section">
 <h2><a id="semantics-pointer-container-requirements" name="semantics-pointer-container-requirements"><span id="pointer-container-requirements"></span>Semantics: pointer container requirements</a></h2>
-<p>You cannot use <tt class="docutils literal"><span class="pre">transfer()</span></tt> to move elements between two
-different types of containers. This is to avoid
-problems with different allocators. The requirement might be
-weakened in the future.</p>
+<p>You can use <tt class="docutils literal"><span class="pre">transfer()</span></tt> to move elements between two containers of the same type. Furthermore,
+you can also move elements from a container of type <tt class="docutils literal"><span class="pre">T</span></tt> to a container of type <tt class="docutils literal"><span class="pre">U</span></tt> as long as
+<tt class="docutils literal"><span class="pre">T::value_type</span></tt> is convertible to <tt class="docutils literal"><span class="pre">U::value_type</span></tt>. An example would be transferring from <tt class="docutils literal"><span class="pre">boost::ptr_vector&lt;Derived&gt;</span></tt>
+to <tt class="docutils literal"><span class="pre">boost::ptr_deque&lt;Base&gt;</span></tt>.</p>
+<p>(<strong>Remark:</strong> <em>When moving elements between two different containers, it is your responsibility to make sure the allocators are compatible.</em>
+<em>The special latitude of being able to transfer between two different containers is only available for Sequences and not for Associative Containers.</em>)</p>
+<!-- -->
 <ul>
-<li><p class="first"><tt class="docutils literal"><span class="pre">void</span> <span class="pre">transfer(</span> <span class="pre">iterator</span> <span class="pre">before,</span> <span class="pre">iterator</span> <span class="pre">object,</span> <span class="pre">ptr_sequence_adapter&amp;</span> <span class="pre">from</span> <span class="pre">);</span></tt></p>
+<li><p class="first"><tt class="docutils literal"><span class="pre">template&lt;</span> <span class="pre">class</span> <span class="pre">PtrSequence</span> <span class="pre">&gt;</span> <span class="pre">void</span> <span class="pre">transfer(</span> <span class="pre">iterator</span> <span class="pre">before,</span> <span class="pre">typename</span> <span class="pre">PtrSequence::iterator</span> <span class="pre">object,</span> <span class="pre">PtrSequence&amp;</span> <span class="pre">from</span> <span class="pre">);</span></tt></p>
 <blockquote>
 <ul class="simple">
-<li>Requirements: <tt class="docutils literal"><span class="pre">not</span> <span class="pre">from.empty()</span></tt></li>
 <li>Effects: Inserts the object defined by <tt class="docutils literal"><span class="pre">object</span></tt> into the container and remove it from <tt class="docutils literal"><span class="pre">from</span></tt>.
 Insertion takes place before <tt class="docutils literal"><span class="pre">before</span></tt>.</li>
-<li>Postconditions: <tt class="docutils literal"><span class="pre">size()</span></tt> is one more, <tt class="docutils literal"><span class="pre">from.size()</span></tt> is one less.</li>
+<li>Postconditions: If <tt class="docutils literal"><span class="pre">from.empty()</span></tt>, nothing happens. Otherwise
+<tt class="docutils literal"><span class="pre">size()</span></tt> is one more, <tt class="docutils literal"><span class="pre">from.size()</span></tt> is one less.</li>
 <li>Exception safety: Strong guarantee</li>
 </ul>
 </blockquote>
 </li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">void</span> <span class="pre">transfer(</span> <span class="pre">iterator</span> <span class="pre">before,</span> <span class="pre">iterator</span> <span class="pre">first,</span> <span class="pre">iterator</span> <span class="pre">last,</span> <span class="pre">ptr_sequence_adapter&amp;</span> <span class="pre">from</span> <span class="pre">);</span></tt></p>
+<li><p class="first"><tt class="docutils literal"><span class="pre">template&lt;</span> <span class="pre">class</span> <span class="pre">PtrSequence</span> <span class="pre">&gt;</span> <span class="pre">void</span> <span class="pre">transfer(</span> <span class="pre">iterator</span> <span class="pre">before,</span> <span class="pre">typename</span> <span class="pre">PtrSequence::iterator</span> <span class="pre">first,</span> <span class="pre">typename</span> <span class="pre">PtrSequence::iterator</span> <span class="pre">last,</span> <span class="pre">PtrSequence&amp;</span> <span class="pre">from</span> <span class="pre">);</span></tt></p>
 <blockquote>
 <ul class="simple">
-<li>Requirements: <tt class="docutils literal"><span class="pre">not</span> <span class="pre">from.empty()</span></tt></li>
+<li>Requirements: <tt class="docutils literal"><span class="pre">from.size()</span> <span class="pre">&gt;=</span> <span class="pre">std::distance(first,last)</span></tt></li>
 <li>Effects: Inserts the objects defined by the range <tt class="docutils literal"><span class="pre">[first,last)</span></tt> into the container and remove it from <tt class="docutils literal"><span class="pre">from</span></tt>.
 Insertion takes place before <tt class="docutils literal"><span class="pre">before</span></tt>.</li>
-<li>Postconditions: Let <tt class="docutils literal"><span class="pre">N</span> <span class="pre">==</span> <span class="pre">std::distance(first,last);</span></tt> then <tt class="docutils literal"><span class="pre">size()</span></tt> is <tt class="docutils literal"><span class="pre">N</span></tt> more, <tt class="docutils literal"><span class="pre">from.size()</span></tt> is <tt class="docutils literal"><span class="pre">N</span></tt> less.</li>
+<li>Postconditions: If <tt class="docutils literal"><span class="pre">from.empty()</span></tt>, nothing happens. Otherwise,
+let <tt class="docutils literal"><span class="pre">N</span> <span class="pre">==</span> <span class="pre">std::distance(first,last);</span></tt> then <tt class="docutils literal"><span class="pre">size()</span></tt> is <tt class="docutils literal"><span class="pre">N</span></tt> more, <tt class="docutils literal"><span class="pre">from.size()</span></tt> is <tt class="docutils literal"><span class="pre">N</span></tt> less.</li>
 <li>Exception safety: Strong guarantee</li>
+<li>Complexity: Linear or better</li>
 </ul>
 </blockquote>
 </li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">template&lt;</span> <span class="pre">class</span> <span class="pre">Range&gt;</span> <span class="pre">void</span> <span class="pre">transfer(</span> <span class="pre">iterator</span> <span class="pre">before,</span> <span class="pre">const</span> <span class="pre">Range&amp;</span> <span class="pre">r,</span> <span class="pre">ptr_sequence_adapter&amp;</span> <span class="pre">from</span> <span class="pre">);</span></tt></p>
+<li><p class="first"><tt class="docutils literal"><span class="pre">void</span> <span class="pre">template&lt;</span> <span class="pre">class</span> <span class="pre">PtrSequence,</span> <span class="pre">class</span> <span class="pre">Range</span> <span class="pre">&gt;</span> <span class="pre">void</span> <span class="pre">transfer(</span> <span class="pre">iterator</span> <span class="pre">before,</span> <span class="pre">const</span> <span class="pre">Range&amp;</span> <span class="pre">r,</span> <span class="pre">PtrSequence&amp;</span> <span class="pre">from</span> <span class="pre">);</span></tt></p>
 <blockquote>
 <ul class="simple">
 <li>Effects: <tt class="docutils literal"><span class="pre">transfer(before,</span> <span class="pre">boost::begin(r),</span> <span class="pre">boost::end(r),</span> <span class="pre">from);</span></tt></li>
 </ul>
 </blockquote>
 </li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">void</span> <span class="pre">transfer(</span> <span class="pre">iterator</span> <span class="pre">before,</span> <span class="pre">ptr_sequence_adapter&amp;</span> <span class="pre">from</span> <span class="pre">);</span></tt></p>
+<li><p class="first"><tt class="docutils literal"><span class="pre">template&lt;</span> <span class="pre">class</span> <span class="pre">PtrSequence&gt;</span> <span class="pre">void</span> <span class="pre">transfer(</span> <span class="pre">iterator</span> <span class="pre">before,</span> <span class="pre">PtrSequence&amp;</span> <span class="pre">from</span> <span class="pre">);</span></tt></p>
 <blockquote>
 <ul class="simple">
-<li>Effects: Transfers all objects from <tt class="docutils literal"><span class="pre">from</span></tt> into the container. Insertion
-takes place before <tt class="docutils literal"><span class="pre">before</span></tt>.</li>
-<li>Postconditions: <tt class="docutils literal"><span class="pre">from.empty();</span></tt></li>
-<li>Exception safety: Strong guarantee</li>
+<li>Effects: <tt class="docutils literal"><span class="pre">transfer(before,</span> <span class="pre">from,</span> <span class="pre">from);</span></tt></li>
 </ul>
 </blockquote>
 </li>
@@ -722,11 +735,11 @@
 </blockquote>
 </li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/ptr_sequence_adapter.rst
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_sequence_adapter.rst (original)
+++ trunk/libs/ptr_container/doc/ptr_sequence_adapter.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -10,23 +10,24 @@
 This section describes all the common operations for all the pointer
 sequences:
 
-- ptr_vector_,
-- ptr_list_,
-- ptr_deque_,
-
-.. _ptr_vector : ptr_vector.html
-.. _ptr_list : ptr_list.html
-.. _ptr_deque : ptr_deque.html
+- `ptr_vector <ptr_vector.html>`_
+- `ptr_list <ptr_list.html>`_
+- `ptr_deque <ptr_deque.html>`_
 
 
 The ``ptr_sequence_adapter`` is also a concrete class that you can use to create custom pointer
 containers from.
 
-**See also:**
+**Hierarchy:**
 
-- reversible_ptr_container__
+- `reversible_ptr_container <reversible_ptr_container.html>`_
 
-__ reversible_ptr_container.html
+ - ``ptr_sequence_adapter``
+
+ - `ptr_vector <ptr_vector.html>`_
+ - `ptr_list <ptr_list.html>`_
+ - `ptr_deque <ptr_deque.html>`_
+ - `ptr_array <ptr_array.html>`_
 
 **Navigate:**
 
@@ -79,14 +80,16 @@
                 iterator erase( const Range& r );
 
             public: // `pointer container requirements`_
-
- void transfer( iterator before, iterator object,
- ptr_sequence_adapter& from );
- void transfer( iterator before, iterator first, iterator last,
- ptr_sequence_adapter& from );
- void template< class Range>
- void transfer( iterator before, const Range& r, ptr_sequence_adapter& from );
- void transfer( iterator before, ptr_sequence_adapter& from );
+ template< class PtrSequence >
+ void transfer( iterator before, typename PtrSequence::iterator object,
+ PtrSequence& from );
+ template< class PtrSequence >
+ void transfer( iterator before, typename PtrSequence::iterator first, typename PtrSequence::iterator last,
+ PtrSequence& from );
+ void template< class PtrSequence, class Range >
+ void transfer( iterator before, const Range& r, PtrSequence& from );
+ template< class PtrSequence >
+ void transfer( iterator before, PtrSequence& from );
 
             public: // `algorithms`_
 
@@ -330,47 +333,48 @@
 Semantics: pointer container requirements
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-You cannot use ``transfer()`` to move elements between two
-different types of containers. This is to avoid
-problems with different allocators. The requirement might be
-weakened in the future.
+You can use ``transfer()`` to move elements between two containers of the same type. Furthermore,
+you can also move elements from a container of type ``T`` to a container of type ``U`` as long as
+``T::value_type`` is convertible to ``U::value_type``. An example would be transferring from ``boost::ptr_vector<Derived>``
+to ``boost::ptr_deque<Base>``.
 
+(**Remark:** *When moving elements between two different containers, it is your responsibility to make sure the allocators are compatible.*
+*The special latitude of being able to transfer between two different containers is only available for Sequences and not for Associative Containers.*)
 
-- ``void transfer( iterator before, iterator object, ptr_sequence_adapter& from );``
+..
 
- - Requirements: ``not from.empty()``
+- ``template< class PtrSequence > void transfer( iterator before, typename PtrSequence::iterator object, PtrSequence& from );``
 
     - Effects: Inserts the object defined by ``object`` into the container and remove it from ``from``.
       Insertion takes place before ``before``.
 
- - Postconditions: ``size()`` is one more, ``from.size()`` is one less.
+ - Postconditions: If ``from.empty()``, nothing happens. Otherwise
+ ``size()`` is one more, ``from.size()`` is one less.
 
     - Exception safety: Strong guarantee
 
 
-- ``void transfer( iterator before, iterator first, iterator last, ptr_sequence_adapter& from );``
+- ``template< class PtrSequence > void transfer( iterator before, typename PtrSequence::iterator first, typename PtrSequence::iterator last, PtrSequence& from );``
 
- - Requirements: ``not from.empty()``
+ - Requirements: ``from.size() >= std::distance(first,last)``
 
     - Effects: Inserts the objects defined by the range ``[first,last)`` into the container and remove it from ``from``.
       Insertion takes place before ``before``.
 
- - Postconditions: Let ``N == std::distance(first,last);`` then ``size()`` is ``N`` more, ``from.size()`` is ``N`` less.
+ - Postconditions: If ``from.empty()``, nothing happens. Otherwise,
+ let ``N == std::distance(first,last);`` then ``size()`` is ``N`` more, ``from.size()`` is ``N`` less.
 
     - Exception safety: Strong guarantee
+
+ - Complexity: Linear or better
 
-- ``template< class Range> void transfer( iterator before, const Range& r, ptr_sequence_adapter& from );``
+- ``void template< class PtrSequence, class Range > void transfer( iterator before, const Range& r, PtrSequence& from );``
 
     - Effects: ``transfer(before, boost::begin(r), boost::end(r), from);``
 
-- ``void transfer( iterator before, ptr_sequence_adapter& from );``
-
- - Effects: Transfers all objects from ``from`` into the container. Insertion
- takes place before ``before``.
+- ``template< class PtrSequence> void transfer( iterator before, PtrSequence& from );``
 
- - Postconditions: ``from.empty();``
-
- - Exception safety: Strong guarantee
+ - Effects: ``transfer(before, from, from);``
 
 .. _`algorithms`:
 
@@ -420,6 +424,12 @@
     - Postconditions: (Container versions) ``r.empty()``
     - Exception safety: nothrow guarantee (the behavior is undefined if the comparison operator throws)
 
+.. raw:: html
+
+ <hr>
     
-:copyright: Thorsten Ottosen 2004-2005.
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
+
     

Modified: trunk/libs/ptr_container/doc/ptr_set.html
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_set.html (original)
+++ trunk/libs/ptr_container/doc/ptr_set.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -292,11 +292,27 @@
 <h2 class="subtitle" id="class-ptr-set">Class <tt class="docutils literal"><span class="pre">ptr_set</span></tt></h2>
 <p>A <tt class="docutils literal"><span class="pre">ptr_set&lt;T&gt;</span></tt> is a pointer container that uses an underlying <tt class="docutils literal"><span class="pre">std::set&lt;void*&gt;</span></tt>
 to store the pointers.</p>
-<p><strong>See also:</strong></p>
+<p><strong>Hierarchy:</strong></p>
 <ul class="simple">
-<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a></li>
-<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a></li>
+<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a><ul>
+<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a><ul>
 <li><a class="reference" href="ptr_set_adapter.html">ptr_set_adapter</a></li>
+<li><a class="reference" href="ptr_multiset_adapter.html">ptr_multiset_adapter</a></li>
+<li><a class="reference" href="ptr_map_adapter.html">ptr_map_adapter</a></li>
+<li><a class="reference" href="ptr_multimap_adapter.html">ptr_multi_map_adapter</a><ul>
+<li><tt class="docutils literal"><span class="pre">ptr_set</span></tt></li>
+<li><a class="reference" href="ptr_multiset.html">ptr_multi_set</a></li>
+<li><a class="reference" href="ptr_map.html">ptr_map</a></li>
+<li><a class="reference" href="ptr_multimap.html">ptr_multimap</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+<p><strong>See also:</strong></p>
+<ul class="simple">
 <li><a class="reference" href="indirect_fun.html">void_ptr_indirect_fun</a></li>
 </ul>
 <p><strong>Navigate:</strong></p>
@@ -334,11 +350,11 @@
 <ul class="simple">
 <li>Using <tt class="docutils literal"><span class="pre">nullable&lt;T&gt;</span></tt> as <tt class="docutils literal"><span class="pre">Key</span></tt> is meaningless and not allowed</li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/ptr_set.rst
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_set.rst (original)
+++ trunk/libs/ptr_container/doc/ptr_set.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -10,17 +10,27 @@
 A ``ptr_set<T>`` is a pointer container that uses an underlying ``std::set<void*>``
 to store the pointers.
 
+**Hierarchy:**
+
+- `reversible_ptr_container <reversible_ptr_container.html>`_
+
+ - `associative_ptr_container <associative_ptr_container.html>`_
+
+ - `ptr_set_adapter <ptr_set_adapter.html>`_
+ - `ptr_multiset_adapter <ptr_multiset_adapter.html>`_
+ - `ptr_map_adapter <ptr_map_adapter.html>`_
+ - `ptr_multi_map_adapter <ptr_multimap_adapter.html>`_
+
+ - ``ptr_set``
+ - `ptr_multi_set <ptr_multiset.html>`_
+ - `ptr_map <ptr_map.html>`_
+ - `ptr_multimap <ptr_multimap.html>`_
+
+
 **See also:**
 
-- reversible_ptr_container_
-- associative_ptr_container_
-- ptr_set_adapter_
 - `void_ptr_indirect_fun <indirect_fun.html>`_
 
-.. _reversible_ptr_container: reversible_ptr_container.html
-.. _associative_ptr_container: associative_ptr_container.html
-.. _ptr_set_adapter: ptr_set_adapter.html
-
 **Navigate:**
 
 - `home <ptr_container.html>`_
@@ -60,6 +70,12 @@
 
 - Using ``nullable<T>`` as ``Key`` is meaningless and not allowed
 
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
 
-:copyright: Thorsten Ottosen 2004-2005.
 

Modified: trunk/libs/ptr_container/doc/ptr_set_adapter.html
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_set_adapter.html (original)
+++ trunk/libs/ptr_container/doc/ptr_set_adapter.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -294,11 +294,24 @@
 <p>This class is used to build custom pointer containers with
 an underlying set-like container. The interface of the class is an extension
 of the interface from <tt class="docutils literal"><span class="pre">associative_ptr_container</span></tt>.</p>
-<p><strong>See also:</strong></p>
+<p><strong>Hierarchy:</strong></p>
 <ul class="simple">
-<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a></li>
-<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a></li>
+<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a><ul>
+<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a><ul>
+<li><tt class="docutils literal"><span class="pre">ptr_set_adapter</span></tt></li>
+<li><a class="reference" href="ptr_multiset_adapter.html">ptr_multiset_adapter</a></li>
+<li><a class="reference" href="ptr_map_adapter.html">ptr_map_adapter</a></li>
+<li><a class="reference" href="ptr_multimap_adapter.html">ptr_multi_map_adapter</a><ul>
 <li><a class="reference" href="ptr_set.html">ptr_set</a></li>
+<li><a class="reference" href="ptr_multiset.html">ptr_multi_set</a></li>
+<li><a class="reference" href="ptr_map.html">ptr_map</a></li>
+<li><a class="reference" href="ptr_multimap.html">ptr_multimap</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
 </ul>
 <p><strong>Navigate:</strong></p>
 <ul class="simple">
@@ -404,11 +417,11 @@
 </blockquote>
 </li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/ptr_set_adapter.rst
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_set_adapter.rst (original)
+++ trunk/libs/ptr_container/doc/ptr_set_adapter.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -11,11 +11,21 @@
 an underlying set-like container. The interface of the class is an extension
 of the interface from ``associative_ptr_container``.
 
-**See also:**
+**Hierarchy:**
 
-- reversible_ptr_container_
-- associative_ptr_container_
-- ptr_set_
+- `reversible_ptr_container <reversible_ptr_container.html>`_
+
+ - `associative_ptr_container <associative_ptr_container.html>`_
+
+ - ``ptr_set_adapter``
+ - `ptr_multiset_adapter <ptr_multiset_adapter.html>`_
+ - `ptr_map_adapter <ptr_map_adapter.html>`_
+ - `ptr_multi_map_adapter <ptr_multimap_adapter.html>`_
+
+ - `ptr_set <ptr_set.html>`_
+ - `ptr_multi_set <ptr_multiset.html>`_
+ - `ptr_map <ptr_map.html>`_
+ - `ptr_multimap <ptr_multimap.html>`_
 
 **Navigate:**
 
@@ -124,6 +134,12 @@
 
    - Effects: ``return transfer( from.begin(), from.end(), from );``.
 
+.. raw:: html
+
+ <hr>
  
-:copyright: Thorsten Ottosen 2004-2005.
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
+
 

Modified: trunk/libs/ptr_container/doc/ptr_vector.html
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_vector.html (original)
+++ trunk/libs/ptr_container/doc/ptr_vector.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -293,12 +293,19 @@
 <h1><a id="class-ptr-vector" name="class-ptr-vector">Class <tt class="docutils literal"><span class="pre">ptr_vector</span></tt></a></h1>
 <p>A <tt class="docutils literal"><span class="pre">ptr_vector&lt;T&gt;</span></tt> is a pointer container that uses an underlying <tt class="docutils literal"><span class="pre">std::vector&lt;void*&gt;</span></tt>
 to store the pointers.</p>
-<p><strong>See also:</strong></p>
+<p><strong>Hierarchy:</strong></p>
 <ul class="simple">
-<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a></li>
-<li><a class="reference" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a></li>
+<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a><ul>
+<li><a class="reference" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a><ul>
+<li><tt class="docutils literal"><span class="pre">ptr_vector</span></tt></li>
+<li><a class="reference" href="ptr_list.html">ptr_list</a></li>
+<li><a class="reference" href="ptr_deque.html">ptr_deque</a></li>
 <li><a class="reference" href="ptr_array.html">ptr_array</a></li>
 </ul>
+</li>
+</ul>
+</li>
+</ul>
 <p><strong>Navigate:</strong></p>
 <ul class="simple">
 <li><a class="reference" href="ptr_container.html">home</a></li>
@@ -440,11 +447,11 @@
 </blockquote>
 </li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/ptr_vector.rst
==============================================================================
--- trunk/libs/ptr_container/doc/ptr_vector.rst (original)
+++ trunk/libs/ptr_container/doc/ptr_vector.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -10,15 +10,16 @@
 A ``ptr_vector<T>`` is a pointer container that uses an underlying ``std::vector<void*>``
 to store the pointers.
 
-**See also:**
+**Hierarchy:**
 
-- reversible_ptr_container_
-- ptr_sequence_adapter_
-- ptr_array_
-
-.. _reversible_ptr_container: reversible_ptr_container.html
-.. _ptr_sequence_adapter: ptr_sequence_adapter.html
-.. _ptr_array: ptr_array.html
+- `reversible_ptr_container <reversible_ptr_container.html>`_
+
+ - `ptr_sequence_adapter <ptr_sequence_adapter.html>`_
+
+ - ``ptr_vector``
+ - `ptr_list <ptr_list.html>`_
+ - `ptr_deque <ptr_deque.html>`_
+ - `ptr_array <ptr_array.html>`_
 
 **Navigate:**
 
@@ -154,6 +155,12 @@
 
     - Exception safety: Nothrow guarantee
 
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
 
-:copyright: Thorsten Ottosen 2004-2005.
 

Modified: trunk/libs/ptr_container/doc/reference.html
==============================================================================
--- trunk/libs/ptr_container/doc/reference.html (original)
+++ trunk/libs/ptr_container/doc/reference.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -291,8 +291,8 @@
 <h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
 <h2 class="subtitle" id="reference">Reference</h2>
 <p>The documentation is divided into a an explanation for
-each container. All the common interface is explained only once,
-but links are always provided to the relevant links.
+each container. When containers have the same interface, that common interface is explained only once,
+but links are always provided to more relevant information.
 Please make sure you understand
 the <a class="reference" href="reference.html#the-clonable-concept">Clonable</a> concept and
 the <a class="reference" href="reference.html#the-clone-allocator-concept">Clone Allocator</a> concept.</p>
@@ -300,40 +300,63 @@
 <li><a class="reference" href="conventions.html">Conventions</a></li>
 <li><a class="reference" href="#the-clonable-concept">The Clonable concept</a></li>
 <li><a class="reference" href="#the-clone-allocator-concept">The Clone Allocator concept</a></li>
-<li>Class <a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a></li>
-<li>Class <a class="reference" href="associative_ptr_container.html">associative_ptr_container</a></li>
-<li><a class="reference" href="#pointer-container-adapters">Pointer container adapters</a><ul>
-<li><a class="reference" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a></li>
-<li><a class="reference" href="ptr_set_adapter.html">ptr_set_adapter</a></li>
-<li><a class="reference" href="ptr_multiset_adapter.html">ptr_multiset_adapter</a></li>
-<li><a class="reference" href="ptr_map_adapter.html">ptr_map_adapter</a></li>
-<li><a class="reference" href="ptr_multimap_adapter.html">ptr_multimap_adapter</a></li>
-</ul>
-</li>
-<li><a class="reference" href="#sequence-containers">Sequence containers</a><ul>
+<li><a class="reference" href="#class-hierarchy">Class hierarchy</a>:<ul>
+<li><a class="reference" href="reversible_ptr_container.html">reversible_ptr_container</a><ul>
+<li><a class="reference" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a><ul>
 <li><a class="reference" href="ptr_vector.html">ptr_vector</a></li>
-<li><a class="reference" href="ptr_deque.html">ptr_deque</a></li>
 <li><a class="reference" href="ptr_list.html">ptr_list</a></li>
+<li><a class="reference" href="ptr_deque.html">ptr_deque</a></li>
 <li><a class="reference" href="ptr_array.html">ptr_array</a></li>
 </ul>
 </li>
-<li><a class="reference" href="#associative-containers">Associative containers</a><ul>
+<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a><ul>
+<li><a class="reference" href="ptr_set_adapter.html">ptr_set_adapter</a></li>
+<li><a class="reference" href="ptr_multiset_adapter.html">ptr_multiset_adapter</a></li>
+<li><a class="reference" href="ptr_map_adapter.html">ptr_map_adapter</a></li>
+<li><a class="reference" href="ptr_multimap_adapter.html">ptr_multi_map_adapter</a><ul>
 <li><a class="reference" href="ptr_set.html">ptr_set</a></li>
-<li><a class="reference" href="ptr_multiset.html">ptr_multiset</a></li>
+<li><a class="reference" href="ptr_multiset.html">ptr_multi_set</a></li>
 <li><a class="reference" href="ptr_map.html">ptr_map</a></li>
 <li><a class="reference" href="ptr_multimap.html">ptr_multimap</a></li>
 </ul>
 </li>
-<li><a class="reference" href="#map-iterator-operations">Map iterator operations</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a class="reference" href="#serialization">Serialization</a></li>
 <li><a class="reference" href="indirect_fun.html">Indirected functions</a></li>
 <li><a class="reference" href="#class-nullable">Class nullable</a></li>
 <li><a class="reference" href="#exception-classes">Exception classes</a></li>
+<li><a class="reference" href="#disabling-the-use-of-exceptions">Disabling the use of exceptions</a></li>
 </ul>
+<!-- - Class `reversible_ptr_container <reversible_ptr_container.html>`_
+- Class `associative_ptr_container <associative_ptr_container.html>`_
+- `Pointer container adapters`_
+
+ - `ptr_sequence_adapter <ptr_sequence_adapter.html>`_
+ - `ptr_set_adapter <ptr_set_adapter.html>`_
+ - `ptr_multiset_adapter <ptr_multiset_adapter.html>`_
+ - `ptr_map_adapter <ptr_map_adapter.html>`_
+ - `ptr_multimap_adapter <ptr_multimap_adapter.html>`_
+- `Sequence containers`_
+
+ - `ptr_vector <ptr_vector.html>`_
+ - `ptr_deque <ptr_deque.html>`_
+ - `ptr_list <ptr_list.html>`_
+ - `ptr_array <ptr_array.html>`_
+- `Associative containers`_
+
+ - `ptr_set <ptr_set.html>`_
+ - `ptr_multiset <ptr_multiset.html>`_
+ - `ptr_map <ptr_map.html>`_
+ - `ptr_multimap <ptr_multimap.html>`_ -->
 <div class="section">
 <h1><a id="the-clonable-concept" name="the-clonable-concept">The Clonable concept</a></h1>
 <p><strong>Refinement of</strong></p>
 <ul class="simple">
-<li>Copy Constructible</li>
 <li>Heap Allocable</li>
 <li>Heap Deallocable</li>
 </ul>
@@ -365,22 +388,26 @@
 <p><strong>Valid expressions</strong></p>
 <table border="1" class="docutils">
 <colgroup>
-<col width="24%" />
-<col width="18%" />
-<col width="58%" />
+<col width="19%" />
+<col width="14%" />
+<col width="46%" />
+<col width="20%" />
 </colgroup>
 <tbody valign="top">
 <tr><td><strong>Expression</strong></td>
 <td><strong>Type</strong></td>
 <td><strong>Semantics</strong></td>
+<td><strong>Postcondition</strong></td>
 </tr>
 <tr><td><tt class="docutils literal"><span class="pre">new_clone(a);</span></tt></td>
 <td><tt class="docutils literal"><span class="pre">T*</span></tt></td>
 <td>Allocate a new object that can be considered equivalent to the <tt class="docutils literal"><span class="pre">a</span></tt> object</td>
+<td><tt class="docutils literal"><span class="pre">typeid(*new_clone(a))</span> <span class="pre">==</span> <span class="pre">typeid(a)</span></tt></td>
 </tr>
 <tr><td><tt class="docutils literal"><span class="pre">delete_clone(ptr);</span></tt></td>
 <td><tt class="docutils literal"><span class="pre">void</span></tt></td>
 <td>Deallocate an object previously allocated with <tt class="docutils literal"><span class="pre">allocate_clone()</span></tt>. Must not throw</td>
+<td>&nbsp;</td>
 </tr>
 </tbody>
 </table>
@@ -413,6 +440,7 @@
 the function is the boost namespace, but it can be placed together with
 the rest of the interface of the class. If you are implementing a class
 inline in headers, remember to forward declare the functions.</p>
+<p><strong>Warning: We are considering to remove the default implementation above. Therefore always make sure that you overload the functions for your types and do not rely on the defaults in any way.</strong></p>
 </div>
 </div>
 <div class="section">
@@ -425,13 +453,13 @@
 <p>More information can be found below:</p>
 <div class="contents local topic">
 <ul class="simple">
-<li><a class="reference" href="#clone-allocator-requirements" id="id14" name="id14">Clone Allocator requirements</a></li>
-<li><a class="reference" href="#class-heap-clone-allocator" id="id15" name="id15">Class <tt class="docutils literal"><span class="pre">heap_clone_allocator</span></tt></a></li>
-<li><a class="reference" href="#class-view-clone-allocator" id="id16" name="id16">Class <tt class="docutils literal"><span class="pre">view_clone_allocator</span></tt></a></li>
+<li><a class="reference" href="#clone-allocator-requirements" id="id19" name="id19">Clone Allocator requirements</a></li>
+<li><a class="reference" href="#class-heap-clone-allocator" id="id20" name="id20">Class <tt class="docutils literal"><span class="pre">heap_clone_allocator</span></tt></a></li>
+<li><a class="reference" href="#class-view-clone-allocator" id="id21" name="id21">Class <tt class="docutils literal"><span class="pre">view_clone_allocator</span></tt></a></li>
 </ul>
 </div>
 <div class="section">
-<h2><a class="toc-backref" href="#id14" id="clone-allocator-requirements" name="clone-allocator-requirements">Clone Allocator requirements</a></h2>
+<h2><a class="toc-backref" href="#id19" id="clone-allocator-requirements" name="clone-allocator-requirements">Clone Allocator requirements</a></h2>
 <p><strong>Notation</strong></p>
 <table border="1" class="docutils">
 <colgroup>
@@ -457,29 +485,36 @@
 <p><strong>Valid expressions</strong></p>
 <table border="1" class="docutils">
 <colgroup>
-<col width="25%" />
-<col width="6%" />
-<col width="69%" />
+<col width="23%" />
+<col width="7%" />
+<col width="39%" />
+<col width="31%" />
 </colgroup>
 <tbody valign="top">
 <tr><td><strong>Expression</strong></td>
 <td><strong>Type</strong></td>
 <td><strong>Semantics</strong></td>
+<td><strong>Postcondition</strong></td>
 </tr>
 <tr><td><tt class="docutils literal"><span class="pre">CloneAllocator::allocate_clone(a);</span></tt></td>
 <td><tt class="docutils literal"><span class="pre">T*</span></tt></td>
-<td>Allocate a new object that can be considered equivalent to the <tt class="docutils literal"><span class="pre">a</span></tt> object</td>
+<td>Allocate a new object that can be considered equivalent to the
+<tt class="docutils literal"><span class="pre">a</span></tt> object</td>
+<td><tt class="docutils literal"><span class="pre">typeid(*CloneAllocator::allocate_clone(a))</span> <span class="pre">==</span> <span class="pre">typeid(a)</span></tt></td>
 </tr>
 <tr><td><tt class="docutils literal"><span class="pre">CloneAllocator::deallocate_clone(ptr);</span></tt></td>
 <td><tt class="docutils literal"><span class="pre">void</span></tt></td>
-<td>Deallocate an object previously allocated with <tt class="docutils literal"><span class="pre">CloneAllocator::allocate_clone()</span></tt> or a compatible allocator. Must not throw.</td>
+<td>Deallocate an object previously allocated with
+<tt class="docutils literal"><span class="pre">CloneAllocator::allocate_clone()</span></tt> or a compatible allocator.
+Must not throw.</td>
+<td>&nbsp;</td>
 </tr>
 </tbody>
 </table>
 <p>The library comes with two predefined clone allocators.</p>
 </div>
 <div class="section">
-<h2><a class="toc-backref" href="#id15" id="class-heap-clone-allocator" name="class-heap-clone-allocator">Class <tt class="docutils literal docutils literal"><span class="pre">heap_clone_allocator</span></tt></a></h2>
+<h2><a class="toc-backref" href="#id20" id="class-heap-clone-allocator" name="class-heap-clone-allocator">Class <tt class="docutils literal docutils literal"><span class="pre">heap_clone_allocator</span></tt></a></h2>
 <p>This is the default clone allocator used by all pointer containers. For most
 purposes you will never have to change this default.</p>
 <p><strong>Definition</strong></p>
@@ -506,7 +541,7 @@
 schemes by relying on <tt class="docutils literal"><span class="pre">new_clone()</span></tt> and <tt class="docutils literal"><span class="pre">delete_clone()</span></tt>.</p>
 </div>
 <div class="section">
-<h2><a class="toc-backref" href="#id16" id="class-view-clone-allocator" name="class-view-clone-allocator">Class <tt class="docutils literal docutils literal"><span class="pre">view_clone_allocator</span></tt></a></h2>
+<h2><a class="toc-backref" href="#id21" id="class-view-clone-allocator" name="class-view-clone-allocator">Class <tt class="docutils literal docutils literal"><span class="pre">view_clone_allocator</span></tt></a></h2>
 <p>This class provides a way to remove ownership properties of the
 pointer containers. As its name implies, this means that you can
 instead use the pointer containers as a view into an existing
@@ -531,14 +566,21 @@
     };
 }
 </pre>
-<p><strong>See also</strong></p>
-<ul class="simple">
-<li><a class="reference" href="examples.html#changing-the-clone-allocator">Changing the clone allocator</a></li>
-</ul>
+<!-- **See also**
+
+- `Changing the clone allocator <examples.html#changing-the-clone-allocator>`_ -->
 </div>
 </div>
 <div class="section">
-<h1><a id="pointer-container-adapters" name="pointer-container-adapters">Pointer container adapters</a></h1>
+<h1><a id="class-hierarchy" name="class-hierarchy">Class hierarchy</a></h1>
+<p>The library consists of the following types of classes:</p>
+<ol class="arabic simple">
+<li>Pointer container adapters</li>
+</ol>
+<!-- -->
+<ol class="arabic simple" start="2">
+<li>Pointer containers</li>
+</ol>
 <p>The pointer container adapters are used when you
 want to make a pointer container starting from
 your own &quot;normal&quot; container. For example, you
@@ -547,67 +589,143 @@
 to use your map class as a basis for a new
 pointer container.</p>
 <p>The library provides an adapter for each type
-of standard container:</p>
+of standard container highlighted as links below:</p>
 <ul class="simple">
-<li><a class="reference" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a></li>
+<li><tt class="docutils literal"><span class="pre">reversible_ptr_container</span></tt><ul>
+<li><a class="reference" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a><ul>
+<li><tt class="docutils literal"><span class="pre">ptr_vector</span></tt></li>
+<li><tt class="docutils literal"><span class="pre">ptr_list</span></tt></li>
+<li><tt class="docutils literal"><span class="pre">ptr_deque</span></tt></li>
+<li><tt class="docutils literal"><span class="pre">ptr_array</span></tt></li>
+</ul>
+</li>
+<li><tt class="docutils literal"><span class="pre">associative_ptr_container</span></tt><ul>
 <li><a class="reference" href="ptr_set_adapter.html">ptr_set_adapter</a></li>
 <li><a class="reference" href="ptr_multiset_adapter.html">ptr_multiset_adapter</a></li>
 <li><a class="reference" href="ptr_map_adapter.html">ptr_map_adapter</a></li>
-<li><a class="reference" href="ptr_multimap_adapter.html">ptr_multimap_adapter</a></li>
+<li><a class="reference" href="ptr_multimap_adapter.html">ptr_multi_map_adapter</a><ul>
+<li><tt class="docutils literal"><span class="pre">ptr_set</span></tt></li>
+<li><tt class="docutils literal"><span class="pre">ptr_multi_set</span></tt></li>
+<li><tt class="docutils literal"><span class="pre">ptr_map</span></tt></li>
+<li><tt class="docutils literal"><span class="pre">ptr_multimap</span></tt></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
 </ul>
-</div>
-<div class="section">
-<h1><a id="pointer-containers" name="pointer-containers">Pointer containers</a></h1>
 <p>The pointer containers of this library are all built using
-the <a class="reference" href="#pointer-container-adapters">pointer container adapters</a>. There is a pointer container
-for each type of &quot;normal&quot; standard container:</p>
-<div class="section">
-<h2><a id="sequence-containers" name="sequence-containers">Sequence containers</a></h2>
-<blockquote>
+the adapters. There is a pointer container
+for each type of &quot;normal&quot; standard container highlighted as links below.</p>
 <ul class="simple">
+<li><tt class="docutils literal"><span class="pre">reversible_ptr_container</span></tt><ul>
+<li><tt class="docutils literal"><span class="pre">ptr_sequence_adapter</span></tt><ul>
 <li><a class="reference" href="ptr_vector.html">ptr_vector</a></li>
-<li><a class="reference" href="ptr_deque.html">ptr_deque</a></li>
 <li><a class="reference" href="ptr_list.html">ptr_list</a></li>
+<li><a class="reference" href="ptr_deque.html">ptr_deque</a></li>
 <li><a class="reference" href="ptr_array.html">ptr_array</a></li>
 </ul>
-</blockquote>
-</div>
-<div class="section">
-<h2><a id="associative-containers" name="associative-containers">Associative containers</a></h2>
-<blockquote>
-<ul class="simple">
+</li>
+<li><tt class="docutils literal"><span class="pre">associative_ptr_container</span></tt><ul>
+<li><tt class="docutils literal"><span class="pre">ptr_set_adapter</span></tt></li>
+<li><tt class="docutils literal"><span class="pre">ptr_multiset_adapter</span></tt></li>
+<li><tt class="docutils literal"><span class="pre">ptr_map_adapter</span></tt></li>
+<li><tt class="docutils literal"><span class="pre">ptr_multi_map_adapter</span></tt><ul>
 <li><a class="reference" href="ptr_set.html">ptr_set</a></li>
-<li><a class="reference" href="ptr_multiset.html">ptr_multiset</a></li>
+<li><a class="reference" href="ptr_multiset.html">ptr_multi_set</a></li>
 <li><a class="reference" href="ptr_map.html">ptr_map</a></li>
 <li><a class="reference" href="ptr_multimap.html">ptr_multimap</a></li>
 </ul>
-</blockquote>
-</div>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
 </div>
 <div class="section">
-<h1><a id="map-iterator-operations" name="map-iterator-operations">Map iterator operations</a></h1>
-<p>The map iterators are a bit different compared to the normal ones. The
-reason is that it is a bit clumsy to access the key and the mapped object
-through i-&gt;first and i-&gt;second, and one tends to forget what is what.
-Moreover, and more importantly, we also want to hide the pointer as much as possibble.
-The new style can be illustrated with a small example:</p>
+<h1><a id="serialization" name="serialization">Serialization</a></h1>
+<p>As of version 1.34.0 of Boost, the library support
+serialization as defined by <a class="reference" href="../../serialization/index.html">Boost.Serialization</a>.</p>
+<p>Of course, for serialization to work it is required
+that the stored type itself is serializable. For maps, both
+the key type and the mapped type must be serializable.</p>
+<p>When dealing with serialization (and serialization of polymophic objects in particular),
+pay special attention to these parts of Boost.Serialization:</p>
+<ol class="arabic">
+<li><p class="first">Output/saving requires a const-reference:</p>
 <pre class="literal-block">
-typedef ptr_map&lt;string,int&gt; map_t;
-map_t m;
-m[ &quot;foo&quot; ] = 4; // insert pair
-m[ &quot;bar&quot; ] = 5; // ditto
+//
+// serialization helper: we can't save a non-const object
+//
+template&lt; class T &gt;
+inline T const&amp; as_const( T const&amp; r )
+{
+ return r;
+}
 ...
-for( map_t::iterator i = m.begin(); i != m.end(); ++i )
+Container cont;
+
+std::ofstream ofs(&quot;filename&quot;);
+boost::archive::text_oarchive oa(ofs);
+oa &lt;&lt; as_const(cont);
+</pre>
+<p>See <a class="reference" href="../../serialization/doc/rationale.html#trap">Compile time trap when saving a non-const value</a> for
+details.</p>
+</li>
+</ol>
+<ol class="arabic" start="2">
+<li><p class="first">Derived classes need to call <tt class="docutils literal"><span class="pre">base_object()</span></tt> function:</p>
+<pre class="literal-block">
+struct Derived : Base
 {
- *i += 42; // add 42 to each value
- cout &lt;&lt; &quot;value=&quot; &lt;&lt; *i &lt;&lt; &quot;, key=&quot; &lt;&lt; i.key() &lt;&lt; &quot;n&quot;;
-}
+ template&lt; class Archive &gt;
+ void serialize( Archive&amp; ar, const unsigned int version )
+ {
+ ar &amp; boost::serialization::base_object&lt;Base&gt;( *this );
+ ...
+ }
+};
 </pre>
-<p>So the difference from the normal map iterator is that</p>
-<ul class="simple">
-<li><tt class="docutils literal"><span class="pre">operator*()</span></tt> returns a reference to the mapped object (normally it returns a reference to a <tt class="docutils literal"><span class="pre">std::pair</span></tt>, and</li>
-<li>that the key can be accessed through the <tt class="docutils literal"><span class="pre">key()</span></tt> function.</li>
-</ul>
+<p>For details, see <a class="reference" href="../../serialization/doc/tutorial.html#derivedclasses">Derived Classes</a>.</p>
+</li>
+</ol>
+<ol class="arabic" start="3">
+<li><p class="first">You need to use <tt class="docutils literal"><span class="pre">BOOST_CLASS_EXPORT</span></tt> to register the
+derived classes in your class hierarchy:</p>
+<pre class="literal-block">
+BOOST_CLASS_EXPORT( Derived )
+</pre>
+<p>See <a class="reference" href="../../serialization/doc/traits.html#export">Export Key</a> and <a class="reference" href="../../serialization/doc/special.html">Object Tracking</a>
+for details.</p>
+</li>
+</ol>
+<p>Remember these three issues and it will save you a lot of trouble.</p>
+<!-- Map iterator operations
++++++++++++++++++++++++
+
+The map iterators are a bit different compared to the normal ones. The
+reason is that it is a bit clumsy to access the key and the mapped object
+through i->first and i->second, and one tends to forget what is what.
+Moreover, and more importantly, we also want to hide the pointer as much as possibble.
+The new style can be illustrated with a small example::
+
+ typedef ptr_map<string,int> map_t;
+ map_t m;
+ m[ "foo" ] = 4; // insert pair
+ m[ "bar" ] = 5; // ditto
+ ...
+ for( map_t::iterator i = m.begin(); i != m.end(); ++i )
+ {
+ *i += 42; // add 42 to each value
+ cout << "value=" << *i << ", key=" << i.key() << "n";
+ }
+
+So the difference from the normal map iterator is that
+
+- ``operator*()`` returns a reference to the mapped object (normally it returns a reference to a ``std::pair``, and
+- that the key can be accessed through the ``key()`` function. -->
 </div>
 <div class="section">
 <h1><a id="class-nullable" name="class-nullable">Class <tt class="docutils literal"><span class="pre">nullable</span></tt></a></h1>
@@ -629,8 +747,9 @@
 does not make sense to do</p>
 <pre class="literal-block">
 boost::ptr_vector&lt; boost::nullable&lt;T&gt; &gt; vec;
-vec.push_back( new boost::nullable&lt;T&gt; ); // no no
-boost::nullable&lt;T&gt;&amp; ref = vec[0]; // also no no
+vec.push_back( 0 ); // ok
+vec.push_back( new boost::nullable&lt;T&gt; ); // no no!
+boost::nullable&lt;T&gt;&amp; ref = vec[0]; // also no no!
 </pre>
 </div>
 <div class="section">
@@ -660,14 +779,32 @@
     };
 }
 </pre>
+</div>
+<div class="section">
+<h1><a id="disabling-the-use-of-exceptions" name="disabling-the-use-of-exceptions">Disabling the use of exceptions</a></h1>
+<p>As of version 1.34.0 of Boost, the library allows you to disable exceptions
+completely. This means the library is more fit for domains where exceptions
+are not used. Furthermore, it also speeds up a operations a little. Instead
+of throwing an exception, the library simply calls <a class="reference" href="../../utility/assert.html">BOOST_ASSERT</a>.</p>
+<p>To diable exceptions, simly define this macro before including any header:</p>
+<pre class="literal-block">
+#define BOOST_PTR_CONTAINER_NO_EXCEPTIONS 1
+#include &lt;boost/ptr_container/ptr_vector.hpp&gt;
+</pre>
+<p>It is, however, recommended that you define the macro on the command-line, so
+you are absolutely certain that all headers are compiled the same way. Otherwise
+you might end up breaking the One Definition Rule.</p>
+<p>If <tt class="docutils literal"><span class="pre">BOOST_NO_EXCEPTIONS</span></tt> is defined, then <tt class="docutils literal"><span class="pre">BOOST_PTR_CONTAINER_NO_EXCEPTIONS</span></tt>
+is also defined.</p>
+<hr><p><strong>Navigate:</strong></p>
 <ul class="simple">
 <li><a class="reference" href="ptr_container.html">home</a></li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/reference.rst
==============================================================================
--- trunk/libs/ptr_container/doc/reference.rst (original)
+++ trunk/libs/ptr_container/doc/reference.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -9,8 +9,8 @@
 =========
 
 The documentation is divided into a an explanation for
-each container. All the common interface is explained only once,
-but links are always provided to the relevant links.
+each container. When containers have the same interface, that common interface is explained only once,
+but links are always provided to more relevant information.
 Please make sure you understand
 the `Clonable <reference.html#the-clonable-concept>`_ concept and
 the `Clone Allocator <reference.html#the-clone-allocator-concept>`_ concept.
@@ -18,33 +18,60 @@
 - `Conventions <conventions.html>`_
 - `The Clonable concept`_
 - `The Clone Allocator concept`_
-- Class `reversible_ptr_container <reversible_ptr_container.html>`_
-- Class `associative_ptr_container <associative_ptr_container.html>`_
-- `Pointer container adapters`_
 
- - `ptr_sequence_adapter <ptr_sequence_adapter.html>`_
- - `ptr_set_adapter <ptr_set_adapter.html>`_
- - `ptr_multiset_adapter <ptr_multiset_adapter.html>`_
- - `ptr_map_adapter <ptr_map_adapter.html>`_
- - `ptr_multimap_adapter <ptr_multimap_adapter.html>`_
-- `Sequence containers`_
-
- - `ptr_vector <ptr_vector.html>`_
- - `ptr_deque <ptr_deque.html>`_
- - `ptr_list <ptr_list.html>`_
- - `ptr_array <ptr_array.html>`_
-- `Associative containers`_
-
- - `ptr_set <ptr_set.html>`_
- - `ptr_multiset <ptr_multiset.html>`_
- - `ptr_map <ptr_map.html>`_
- - `ptr_multimap <ptr_multimap.html>`_
-- `Map iterator operations`_
+- `Class hierarchy`_:
+
+ - `reversible_ptr_container <reversible_ptr_container.html>`_
+
+ - `ptr_sequence_adapter <ptr_sequence_adapter.html>`_
+
+ - `ptr_vector <ptr_vector.html>`_
+ - `ptr_list <ptr_list.html>`_
+ - `ptr_deque <ptr_deque.html>`_
+ - `ptr_array <ptr_array.html>`_
+
+ - `associative_ptr_container <associative_ptr_container.html>`_
+
+ - `ptr_set_adapter <ptr_set_adapter.html>`_
+ - `ptr_multiset_adapter <ptr_multiset_adapter.html>`_
+ - `ptr_map_adapter <ptr_map_adapter.html>`_
+ - `ptr_multi_map_adapter <ptr_multimap_adapter.html>`_
+
+ - `ptr_set <ptr_set.html>`_
+ - `ptr_multi_set <ptr_multiset.html>`_
+ - `ptr_map <ptr_map.html>`_
+ - `ptr_multimap <ptr_multimap.html>`_
+
+- `Serialization`_
 - `Indirected functions <indirect_fun.html>`_
 - `Class nullable`_
-- `Exception classes`_
+- `Exception classes`_
+- `Disabling the use of exceptions`_
 
 
+..
+ - Class `reversible_ptr_container <reversible_ptr_container.html>`_
+ - Class `associative_ptr_container <associative_ptr_container.html>`_
+ - `Pointer container adapters`_
+
+ - `ptr_sequence_adapter <ptr_sequence_adapter.html>`_
+ - `ptr_set_adapter <ptr_set_adapter.html>`_
+ - `ptr_multiset_adapter <ptr_multiset_adapter.html>`_
+ - `ptr_map_adapter <ptr_map_adapter.html>`_
+ - `ptr_multimap_adapter <ptr_multimap_adapter.html>`_
+ - `Sequence containers`_
+
+ - `ptr_vector <ptr_vector.html>`_
+ - `ptr_deque <ptr_deque.html>`_
+ - `ptr_list <ptr_list.html>`_
+ - `ptr_array <ptr_array.html>`_
+ - `Associative containers`_
+
+ - `ptr_set <ptr_set.html>`_
+ - `ptr_multiset <ptr_multiset.html>`_
+ - `ptr_map <ptr_map.html>`_
+ - `ptr_multimap <ptr_multimap.html>`_
+
 
 
 The Clonable concept
@@ -52,7 +79,6 @@
 
 **Refinement of**
 
-- Copy Constructible
 - Heap Allocable
 - Heap Deallocable
 
@@ -70,11 +96,11 @@
        
 **Valid expressions**
 
-===================================== =========================== ========================================================================================
- **Expression** **Type** **Semantics**
- ``new_clone(a);`` ``T*`` Allocate a new object that can be considered equivalent to the ``a`` object
+===================================== =========================== ======================================================================================== ===================================
+ **Expression** **Type** **Semantics** **Postcondition**
+ ``new_clone(a);`` ``T*`` Allocate a new object that can be considered equivalent to the ``a`` object ``typeid(*new_clone(a)) == typeid(a)``
    ``delete_clone(ptr);`` ``void`` Deallocate an object previously allocated with ``allocate_clone()``. Must not throw
-===================================== =========================== ========================================================================================
+===================================== =========================== ======================================================================================== ===================================
 
 
 Default implementation
@@ -102,7 +128,7 @@
 
 
 Notice that this implementation makes normal Copy Constructible classes are automatically
-Clonable unless ``operator new()`` or ``operator delete()`` are hidden.
+Clonable unless ``operator new()`` or ``operator delete()`` are hidden.
 
 The two functions represent a layer of indirection which is necessary to support
 classes that are not Copy Constructible by default. Notice that the implementation
@@ -111,6 +137,8 @@
 the function is the boost namespace, but it can be placed together with
 the rest of the interface of the class. If you are implementing a class
 inline in headers, remember to forward declare the functions.
+
+**Warning: We are considering to remove the default implementation above. Therefore always make sure that you overload the functions for your types and do not rely on the defaults in any way.**
 
 The Clone Allocator concept
 +++++++++++++++++++++++++++
@@ -140,11 +168,14 @@
 
 **Valid expressions**
 
-====================================================== ============= ======================================================================================================================================================
- **Expression** **Type** **Semantics**
- ``CloneAllocator::allocate_clone(a);`` ``T*`` Allocate a new object that can be considered equivalent to the ``a`` object
- ``CloneAllocator::deallocate_clone(ptr);`` ``void`` Deallocate an object previously allocated with ``CloneAllocator::allocate_clone()`` or a compatible allocator. Must not throw.
-====================================================== ============= ======================================================================================================================================================
+============================================== ============= ============================================================================= =============================================================
+ **Expression** **Type** **Semantics** **Postcondition**
+ ``CloneAllocator::allocate_clone(a);`` ``T*`` Allocate a new object that can be considered equivalent to the
+ ``a`` object ``typeid(*CloneAllocator::allocate_clone(a)) == typeid(a)``
+ ``CloneAllocator::deallocate_clone(ptr);`` ``void`` Deallocate an object previously allocated with
+ ``CloneAllocator::allocate_clone()`` or a compatible allocator.
+ Must not throw.
+============================================== ============= ============================================================================= =============================================================
 
 
 
@@ -211,12 +242,20 @@
         };
     }
 
-**See also**
+.. **See also**
+
+ - `Changing the clone allocator <examples.html#changing-the-clone-allocator>`_
+
+Class hierarchy
++++++++++++++++
 
-- `Changing the clone allocator <examples.html#changing-the-clone-allocator>`_
+The library consists of the following types of classes:
 
-Pointer container adapters
-++++++++++++++++++++++++++
+1. Pointer container adapters
+
+..
+
+2. Pointer containers
 
 The pointer container adapters are used when you
 want to make a pointer container starting from
@@ -227,78 +266,146 @@
 pointer container.
 
 The library provides an adapter for each type
-of standard container:
+of standard container highlighted as links below:
 
-- ptr_sequence_adapter_
-- ptr_set_adapter_
-- ptr_multiset_adapter_
-- ptr_map_adapter_
-- ptr_multimap_adapter_
-
-.. _ptr_sequence_adapter: ptr_sequence_adapter.html
-.. _ptr_set_adapter: ptr_set_adapter.html
-.. _ptr_multiset_adapter: ptr_multiset_adapter.html
-.. _ptr_map_adapter: ptr_map_adapter.html
-.. _ptr_multimap_adapter: ptr_multimap_adapter.html
+- ``reversible_ptr_container``
 
+ - `ptr_sequence_adapter <ptr_sequence_adapter.html>`_
 
-Pointer containers
-++++++++++++++++++
+ - ``ptr_vector``
+ - ``ptr_list``
+ - ``ptr_deque``
+ - ``ptr_array``
+
+ - ``associative_ptr_container``
+
+ - `ptr_set_adapter <ptr_set_adapter.html>`_
+ - `ptr_multiset_adapter <ptr_multiset_adapter.html>`_
+ - `ptr_map_adapter <ptr_map_adapter.html>`_
+ - `ptr_multi_map_adapter <ptr_multimap_adapter.html>`_
+
+ - ``ptr_set``
+ - ``ptr_multi_set``
+ - ``ptr_map``
+ - ``ptr_multimap``
 
-The pointer containers of this library are all built using
-the `pointer container adapters`_. There is a pointer container
-for each type of "normal" standard container:
 
-Sequence containers
--------------------
+The pointer containers of this library are all built using
+the adapters. There is a pointer container
+for each type of "normal" standard container highlighted as links below.
 
- - ptr_vector_
- - ptr_deque_
- - ptr_list_
- - ptr_array_
+- ``reversible_ptr_container``
 
-Associative containers
-----------------------
+ - ``ptr_sequence_adapter``
 
- - ptr_set_
- - ptr_multiset_
- - ptr_map_
- - ptr_multimap_
-
-.. _ptr_vector: ptr_vector.html
-.. _ptr_deque: ptr_deque.html
-.. _ptr_list: ptr_list.html
-.. _ptr_array: ptr_array.html
-.. _ptr_set: ptr_set.html
-.. _ptr_multiset: ptr_multiset.html
-.. _ptr_map: ptr_map.html
-.. _ptr_multimap: ptr_multimap.html
-
-
-Map iterator operations
-+++++++++++++++++++++++
-
-The map iterators are a bit different compared to the normal ones. The
-reason is that it is a bit clumsy to access the key and the mapped object
-through i->first and i->second, and one tends to forget what is what.
-Moreover, and more importantly, we also want to hide the pointer as much as possibble.
-The new style can be illustrated with a small example::
-
- typedef ptr_map<string,int> map_t;
- map_t m;
- m[ "foo" ] = 4; // insert pair
- m[ "bar" ] = 5; // ditto
- ...
- for( map_t::iterator i = m.begin(); i != m.end(); ++i )
- {
- *i += 42; // add 42 to each value
- cout << "value=" << *i << ", key=" << i.key() << "n";
- }
+ - `ptr_vector <ptr_vector.html>`_
+ - `ptr_list <ptr_list.html>`_
+ - `ptr_deque <ptr_deque.html>`_
+ - `ptr_array <ptr_array.html>`_
     
-So the difference from the normal map iterator is that
+ - ``associative_ptr_container``
+
+ - ``ptr_set_adapter``
+ - ``ptr_multiset_adapter``
+ - ``ptr_map_adapter``
+ - ``ptr_multi_map_adapter``
+
+ - `ptr_set <ptr_set.html>`_
+ - `ptr_multi_set <ptr_multiset.html>`_
+ - `ptr_map <ptr_map.html>`_
+ - `ptr_multimap <ptr_multimap.html>`_
+
+Serialization
++++++++++++++
+
+As of version 1.34.0 of Boost, the library support
+serialization as defined by `Boost.Serialization`__.
+
+.. __: ../../serialization/index.html
+
+Of course, for serialization to work it is required
+that the stored type itself is serializable. For maps, both
+the key type and the mapped type must be serializable.
+
+When dealing with serialization (and serialization of polymophic objects in particular),
+pay special attention to these parts of Boost.Serialization:
+
+1. Output/saving requires a const-reference::
+
+ //
+ // serialization helper: we can't save a non-const object
+ //
+ template< class T >
+ inline T const& as_const( T const& r )
+ {
+ return r;
+ }
+ ...
+ Container cont;
+
+ std::ofstream ofs("filename");
+ boost::archive::text_oarchive oa(ofs);
+ oa << as_const(cont);
+
+ See `Compile time trap when saving a non-const value`__ for
+ details.
+
+.. __: ../../serialization/doc/rationale.html#trap
 
-- ``operator*()`` returns a reference to the mapped object (normally it returns a reference to a ``std::pair``, and
-- that the key can be accessed through the ``key()`` function.
+2. Derived classes need to call ``base_object()`` function::
+
+ struct Derived : Base
+ {
+ template< class Archive >
+ void serialize( Archive& ar, const unsigned int version )
+ {
+ ar & boost::serialization::base_object<Base>( *this );
+ ...
+ }
+ };
+
+ For details, see `Derived Classes`_.
+
+.. _`Derived Classes`: ../../serialization/doc/tutorial.html#derivedclasses
+
+3. You need to use ``BOOST_CLASS_EXPORT`` to register the
+ derived classes in your class hierarchy::
+
+ BOOST_CLASS_EXPORT( Derived )
+
+ See `Export Key`__ and `Object Tracking`_
+ for details.
+
+.. __: ../../serialization/doc/traits.html#export
+.. _`Object Tracking`: ../../serialization/doc/special.html
+
+Remember these three issues and it will save you a lot of trouble.
+
+..
+ Map iterator operations
+ +++++++++++++++++++++++
+
+ The map iterators are a bit different compared to the normal ones. The
+ reason is that it is a bit clumsy to access the key and the mapped object
+ through i->first and i->second, and one tends to forget what is what.
+ Moreover, and more importantly, we also want to hide the pointer as much as possibble.
+ The new style can be illustrated with a small example::
+
+ typedef ptr_map<string,int> map_t;
+ map_t m;
+ m[ "foo" ] = 4; // insert pair
+ m[ "bar" ] = 5; // ditto
+ ...
+ for( map_t::iterator i = m.begin(); i != m.end(); ++i )
+ {
+ *i += 42; // add 42 to each value
+ cout << "value=" << *i << ", key=" << i.key() << "n";
+ }
+
+ So the difference from the normal map iterator is that
+
+ - ``operator*()`` returns a reference to the mapped object (normally it returns a reference to a ``std::pair``, and
+ - that the key can be accessed through the ``key()`` function.
 
 Class ``nullable``
 ++++++++++++++++++
@@ -321,8 +428,9 @@
 does not make sense to do ::
 
     boost::ptr_vector< boost::nullable<T> > vec;
- vec.push_back( new boost::nullable<T> ); // no no
- boost::nullable<T>& ref = vec[0]; // also no no
+ vec.push_back( 0 ); // ok
+ vec.push_back( new boost::nullable<T> ); // no no!
+ boost::nullable<T>& ref = vec[0]; // also no no!
 
 Exception classes
 +++++++++++++++++
@@ -352,9 +460,43 @@
                 bad_pointer( const char* what );
             };
         }
+
+Disabling the use of exceptions
++++++++++++++++++++++++++++++++
+
+As of version 1.34.0 of Boost, the library allows you to disable exceptions
+completely. This means the library is more fit for domains where exceptions
+are not used. Furthermore, it also speeds up a operations a little. Instead
+of throwing an exception, the library simply calls `BOOST_ASSERT`__.
+
+.. __: ../../utility/assert.html
+
+To diable exceptions, simly define this macro before including any header::
+
+ #define BOOST_PTR_CONTAINER_NO_EXCEPTIONS 1
+ #include <boost/ptr_container/ptr_vector.hpp>
+
+It is, however, recommended that you define the macro on the command-line, so
+you are absolutely certain that all headers are compiled the same way. Otherwise
+you might end up breaking the One Definition Rule.
+
+If ``BOOST_NO_EXCEPTIONS`` is defined, then ``BOOST_PTR_CONTAINER_NO_EXCEPTIONS``
+is also defined.
+
+.. raw:: html
+
+ <hr>
+
+**Navigate:**
 
 - `home <ptr_container.html>`_
 
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
+
+__ http://www.boost.org/LICENSE_1_0.txt
 
-:copyright: Thorsten Ottosen 2004-2005.
 

Modified: trunk/libs/ptr_container/doc/reversible_ptr_container.html
==============================================================================
--- trunk/libs/ptr_container/doc/reversible_ptr_container.html (original)
+++ trunk/libs/ptr_container/doc/reversible_ptr_container.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -293,6 +293,32 @@
 <h1><a id="class-reversible-ptr-container" name="class-reversible-ptr-container">Class <tt class="docutils literal"><span class="pre">reversible_ptr_container</span></tt></a></h1>
 <p>This class is not a real class that can be found in the library.
 Its purpose is to present the general interface of all the pointer containers.</p>
+<p><strong>Hierarchy:</strong></p>
+<ul class="simple">
+<li><tt class="docutils literal"><span class="pre">reversible_ptr_container</span></tt><ul>
+<li><a class="reference" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a><ul>
+<li><a class="reference" href="ptr_vector.html">ptr_vector</a></li>
+<li><a class="reference" href="ptr_list.html">ptr_list</a></li>
+<li><a class="reference" href="ptr_deque.html">ptr_deque</a></li>
+<li><a class="reference" href="ptr_array.html">ptr_array</a></li>
+</ul>
+</li>
+<li><a class="reference" href="associative_ptr_container.html">associative_ptr_container</a><ul>
+<li><a class="reference" href="ptr_set_adapter.html">ptr_set_adapter</a></li>
+<li><a class="reference" href="ptr_multiset_adapter.html">ptr_multiset_adapter</a></li>
+<li><a class="reference" href="ptr_map_adapter.html">ptr_map_adapter</a></li>
+<li><a class="reference" href="ptr_multimap_adapter.html">ptr_multi_map_adapter</a><ul>
+<li><a class="reference" href="ptr_set.html">ptr_set</a></li>
+<li><a class="reference" href="ptr_multiset.html">ptr_multi_set</a></li>
+<li><a class="reference" href="ptr_map.html">ptr_map</a></li>
+<li><a class="reference" href="ptr_multimap.html">ptr_multimap</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
 <p><strong>Navigate:</strong></p>
 <ul class="simple">
 <li><a class="reference" href="ptr_container.html">home</a></li>
@@ -352,13 +378,18 @@
         void clear():
     
     public: // <a class="reference" href="#pointer-container-requirements">pointer container requirements</a>
-
         auto_type replace( iterator position, T* x );
         template&lt; class U &gt;
         auto_type replace( iterator position, std::auto_ptr&lt;U&gt; x );
         std::auto_ptr&lt;reversible_ptr_container&gt; clone() const;
         std::auto_ptr&lt;reversible_ptr_container&gt; release();
         auto_type release( iterator position );
+
+ public: // <a class="reference" href="#serialization">serialization</a>
+ template&lt; class Archive &gt;
+ void save( Archive&amp; ar, const unsigned version ) const;
+ template&lt; class Archive &gt;
+ void load( Archive&amp; ar, const unsigned version );
     
     }; // class 'reversible_ptr_container'
 
@@ -446,12 +477,13 @@
 <li><tt class="docutils literal"><span class="pre">typedef</span> <span class="pre">...</span> <span class="pre">auto_type</span></tt></li>
 </ul>
 <p>This declaration hides a pointer pointer type. You can rely on the following
-operations:</p>
+operations</p>
 <pre class="literal-block">
 T* operator-&gt;() const;
 T&amp; operator*() const;
 T* release();
 ~auto_type();
+operator <em>implementation-defined bool</em>();
 </pre>
 <p>The destructor will delete the stored object. It might help to
 think it is just an <tt class="docutils literal"><span class="pre">std::auto_ptr&lt;T&gt;</span></tt>.</p>
@@ -626,10 +658,10 @@
 </ul>
 </blockquote>
 </li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">template&lt;class</span> <span class="pre">U&gt;</span> <span class="pre">auto_type</span> <span class="pre">replace(</span> <span class="pre">iterator</span> <span class="pre">position,</span> <span class="pre">std::auto_ptr&lt;U&gt;</span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
+<li><p class="first"><tt class="docutils literal"><span class="pre">template&lt;</span> <span class="pre">class</span> <span class="pre">U</span> <span class="pre">&gt;</span> <span class="pre">auto_type</span> <span class="pre">replace(</span> <span class="pre">iterator</span> <span class="pre">position,</span> <span class="pre">std::auto_ptr&lt;U&gt;</span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
 <blockquote>
 <ul class="simple">
-<li>Effects: <tt class="docutils literal"><span class="pre">return</span> <span class="pre">replace(</span> <span class="pre">position,</span> <span class="pre">x.release()</span> <span class="pre">)</span></tt></li>
+<li>Effects: <tt class="docutils literal"><span class="pre">return</span> <span class="pre">replace(</span> <span class="pre">position,</span> <span class="pre">x.release()</span> <span class="pre">);</span></tt></li>
 </ul>
 </blockquote>
 </li>
@@ -703,11 +735,39 @@
 </blockquote>
 </li>
 </ul>
-<table class="docutils field-list" frame="void" rules="none">
+</div>
+<div class="section">
+<h2><a id="semantics-serialization" name="semantics-serialization"><span id="serialization"></span>Semantics: serialization</a></h2>
+<p>All containers can be serialized by means of
+<a class="reference" href="../../serialization/index.html">Boost.Serialization</a>. For an overview, see
+<a class="reference" href="reference.html#serialization">Serialization of Pointer Containers</a>.</p>
+<ul>
+<li><p class="first"><tt class="docutils literal"><span class="pre">template&lt;</span> <span class="pre">class</span> <span class="pre">Archive</span> <span class="pre">&gt;</span> <span class="pre">void</span> <span class="pre">save(</span> <span class="pre">Archive&amp;</span> <span class="pre">ar,</span> <span class="pre">const</span> <span class="pre">unsigned</span> <span class="pre">version</span> <span class="pre">)</span> <span class="pre">const;</span></tt></p>
+<blockquote>
+<ul class="simple">
+<li>Effects: Saves the container to the archive.</li>
+<li>Remarks: This function is called automatically be stream operators in
+Boost.Serialization</li>
+</ul>
+</blockquote>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">template&lt;</span> <span class="pre">class</span> <span class="pre">Archive</span> <span class="pre">&gt;</span>
+<span class="pre">void</span> <span class="pre">load(</span> <span class="pre">Archive&amp;</span> <span class="pre">ar,</span> <span class="pre">const</span> <span class="pre">unsigned</span> <span class="pre">version</span> <span class="pre">);</span></tt></p>
+<blockquote>
+<ul class="simple">
+<li>Effects: Clears the container and then loads a new container from the archive.</li>
+<li>Remarks: This function is called automatically be stream operators in
+Boost.Serialization</li>
+<li>Exception safety: Basic guarantee</li>
+</ul>
+</blockquote>
+</li>
+</ul>
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/reversible_ptr_container.rst
==============================================================================
--- trunk/libs/ptr_container/doc/reversible_ptr_container.rst (original)
+++ trunk/libs/ptr_container/doc/reversible_ptr_container.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -10,6 +10,29 @@
 This class is not a real class that can be found in the library.
 Its purpose is to present the general interface of all the pointer containers.
 
+**Hierarchy:**
+
+- ``reversible_ptr_container``
+
+ - `ptr_sequence_adapter <ptr_sequence_adapter.html>`_
+
+ - `ptr_vector <ptr_vector.html>`_
+ - `ptr_list <ptr_list.html>`_
+ - `ptr_deque <ptr_deque.html>`_
+ - `ptr_array <ptr_array.html>`_
+
+ - `associative_ptr_container <associative_ptr_container.html>`_
+
+ - `ptr_set_adapter <ptr_set_adapter.html>`_
+ - `ptr_multiset_adapter <ptr_multiset_adapter.html>`_
+ - `ptr_map_adapter <ptr_map_adapter.html>`_
+ - `ptr_multi_map_adapter <ptr_multimap_adapter.html>`_
+
+ - `ptr_set <ptr_set.html>`_
+ - `ptr_multi_set <ptr_multiset.html>`_
+ - `ptr_map <ptr_map.html>`_
+ - `ptr_multimap <ptr_multimap.html>`_
+
 **Navigate:**
 
 - `home <ptr_container.html>`_
@@ -71,13 +94,18 @@
                 void clear():
             
             public: // `pointer container requirements`_
-
                 auto_type replace( iterator position, T* x );
                 template< class U >
                 auto_type replace( iterator position, std::auto_ptr<U> x );
                 std::auto_ptr<reversible_ptr_container> clone() const;
                 std::auto_ptr<reversible_ptr_container> release();
                 auto_type release( iterator position );
+
+ public: // `serialization`_
+ template< class Archive >
+ void save( Archive& ar, const unsigned version ) const;
+ template< class Archive >
+ void load( Archive& ar, const unsigned version );
             
             }; // class 'reversible_ptr_container'
 
@@ -167,12 +195,15 @@
 - ``typedef ... auto_type``
 
 This declaration hides a pointer pointer type. You can rely on the following
-operations::
+operations
+
+.. parsed-literal::
 
     T* operator->() const;
     T& operator*() const;
     T* release();
     ~auto_type();
+ operator *implementation-defined bool*\ ();
 
 The destructor will delete the stored object. It might help to
 think it is just an ``std::auto_ptr<T>``.
@@ -399,6 +430,41 @@
 
     - Returns: ``*i.base() == 0;``
 
+.. _`serialization`:
+
+Semantics: serialization
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+All containers can be serialized by means of
+`Boost.Serialization`__. For an overview, see
+`Serialization of Pointer Containers`_.
+
+.. __: ../../serialization/index.html
+.. _`Serialization of Pointer Containers`: reference.html#serialization
+
+- ``template< class Archive > void save( Archive& ar, const unsigned version ) const;``
+
+ - Effects: Saves the container to the archive.
+
+ - Remarks: This function is called automatically be stream operators in
+ Boost.Serialization
+
+- ``template< class Archive >
+ void load( Archive& ar, const unsigned version );``
+
+ - Effects: Clears the container and then loads a new container from the archive.
+
+ - Remarks: This function is called automatically be stream operators in
+ Boost.Serialization
+
+ - Exception safety: Basic guarantee
+
+
+.. raw:: html
+
+ <hr>
+
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
 
-:copyright: Thorsten Ottosen 2004-2005.
+__ http://www.boost.org/LICENSE_1_0.txt
 

Modified: trunk/libs/ptr_container/doc/todo.txt
==============================================================================
--- trunk/libs/ptr_container/doc/todo.txt (original)
+++ trunk/libs/ptr_container/doc/todo.txt 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -1,34 +1,83 @@
+#//
+#// Boost.Pointer Container
+#//
+#// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/ptr_container/
+#//
 
-2. add new ptr_map typedefs
+1. use splice() to speed up transfer for list
 
-3. remove ptr_map iterators description
+5. small usage exmaple with each class
 
-4. ptr_map definition
+10. update tutorial to show boost::assign link + auto_ptr
 
-5. small usage exmaple with each class
 
-7. update concept for clonable: typeid(x) == typeid(clone)
+11. should find_key() be added to ptr_map?
 
-8. use static class hierarchy to ease navigation
 
-9. guidelines on good OO programming:
 
- 1. base classes abstract
-
- 2. make virtuals private
+13. transfer for set/map may need to
+be revisted (rg. !from.empty() precondition)
 
- 3. derive from boost::copyable
 
- 4. don't allow nulls if you can avoid it, Null Object
+15. Some of the headlines are too big...
 
-10. update tutorial to show boost::assign link
 
-11. should find_key() be added to ptr_map?
+18. range-based sort() needs to be provided for list. use stable_sort for this purpose.
+
+
+19. use flat_set,flat_map internally when certain situations arise, eg. when the size of the objects
+ is small, eg. 4bytes (does this affect key=string?
+
+
+
+21. map::at() should throw bad_index
+
+auto_type skal være converter-bar til std::auto_ptr<U>, if the deleter is
+trivial (heap_clone_allocator)
+
+(Spørg Thomas Witt om denne ændring can komme med...kan ikke ødelægge existerende kode, som
+vill have kaldt .release()) Kræve en hel del ambiguity resolution pga auto_ptr augument er
+templates og ikke non-templates! Desuden kan vi ikke bruge non-template argument, da alle
+converterings operatorer for auto_ptr tager en & argument og ikke en by-value!!! måske
+skal der blot et hack til, hvor vi tilføjer en ny ukenkt klasse og overloader kun for
+den, og så laver en implicit konvertering til denne i static_move_ptr
+
+The easiert implementation would be to detect its presence in the
+body of the range based overloads and then dispatch to that implementation.
+
+
+22. hvor gode er kompilere til at optimere release() for en auto_ptr. Hvordan med move_ptr
+and auto_ptr interaction? Contracts må kunne fortælle kompileren at den skal
+genere optimeret kode
+
+template< class T >
+class auto_ptr
+{
+ T* get() const;
+
+ //
+ // this expresses that the constructor is a no-op if
+ // the condition is true. This might be useful in many other
+ // context
+ //
+ ~auto_ptr()
+ precondition { if( get() == 0 ) return; }
+
+ T* release()
+ postcondition { get() == 0; }
+}
 
-12. serialization
+...
 
-13. no exceptions
+std::auto_ptr<T> p( new T );
+foo( p.release() );
+// don't generate destructor
 
+Does raw_storage iterator have an impact on in-place consrtcution
 
 
-
\ No newline at end of file

Modified: trunk/libs/ptr_container/doc/tutorial.html
==============================================================================
--- trunk/libs/ptr_container/doc/tutorial.html (original)
+++ trunk/libs/ptr_container/doc/tutorial.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -303,6 +303,7 @@
 <li><a class="reference" href="#null-values">Null values</a></li>
 <li><a class="reference" href="#clonability">Clonability</a></li>
 <li><a class="reference" href="#new-functions">New functions</a></li>
+<li><a class="reference" href="#std-auto-ptr-u-overloads">std::auto_ptr&lt;U&gt; overloads</a></li>
 <li><a class="reference" href="#algorithms">Algorithms</a></li>
 </ul>
 <div class="section">
@@ -315,8 +316,9 @@
 class animal : <a class="reference" href="http://www.boost.org/libs/utility/utility.htm#Class_noncopyable">boost::noncopyable</a>
 {
 public:
- virtual ~animal() {}
- virtual void eat() = 0;
+ virtual ~animal() {}
+ virtual void eat() = 0;
+ virtual int age() const = 0;
     // ...
 };
 
@@ -453,7 +455,23 @@
 animals[&quot;bobo&quot;].set_name(&quot;bobo&quot;);
 </pre>
 <p>This requires a default constructor for animals and
-a function to do the initialization, in this case <tt class="docutils literal"><span class="pre">set_name()</span></tt>;</p>
+a function to do the initialization, in this case <tt class="docutils literal"><span class="pre">set_name()</span></tt>.</p>
+<p>A better alternative is to use <a class="reference" href="../../assign/index.html">Boost.Assign</a>
+to help you out. In particular, consider</p>
+<ul class="simple">
+<li><a class="reference" href="../../assign/doc/index.html#ptr_push_back">ptr_push_back(), ptr_push_front(), ptr_insert() and ptr_map_insert()</a></li>
+<li><a class="reference" href="../../assign/doc/index.html#ptr_list_of">ptr_list_of()</a></li>
+</ul>
+<p>For example, the above insertion may now be written</p>
+<pre class="literal-block">
+boost::ptr_multimap&lt;std::string,animal&gt; animals;
+
+using namespace boost::assign;
+ptr_map_insert&lt;monkey&gt;( animals )( &quot;bobo&quot;, &quot;bobo&quot; );
+ptr_map_insert&lt;elephant&gt;( animals )( &quot;bobo&quot;, &quot;bobo&quot; );
+ptr_map_insert&lt;whale&gt;( animals )( &quot;anna&quot;, &quot;anna&quot; );
+ptr_map_insert&lt;emu&gt;( animals )( &quot;anna&quot;, &quot;anna&quot; );
+</pre>
 </div>
 <div class="section">
 <h1><a id="null-values" name="null-values">Null values</a></h1>
@@ -519,7 +537,7 @@
 another_zoo.assign( zoo.begin(), zoo.end() );
 </pre>
 <p>will fill another zoo with clones of the first zoo. Similarly,
-insert() can now insert clones into your pointer container</p>
+<tt class="docutils literal"><span class="pre">insert()</span></tt> can now insert clones into your pointer container</p>
 <pre class="literal-block">
 another_zoo.insert( another_zoo.begin(), zoo.begin(), zoo.end() );
 </pre>
@@ -542,7 +560,15 @@
 <p>You can think of <tt class="docutils literal"><span class="pre">auto_type</span></tt> as a non-copyable form of
 <tt class="docutils literal"><span class="pre">std::auto_ptr</span></tt>. Notice that when you release an object, the
 pointer is removed from the container and the containers size
-shrinks. You can also release the entire container if you
+shrinks. For containers that store nulls, we can exploit that
+<tt class="docutils literal"><span class="pre">auto_type</span></tt> is convertible to <tt class="docutils literal"><span class="pre">bool</span></tt>:</p>
+<pre class="literal-block">
+if( ptr_vector&lt; nullable&lt;T&gt; &gt;::auto_type r = vec.pop_back() )
+{
+ ...
+}
+</pre>
+<p>You can also release the entire container if you
 want to return it from a function</p>
 <pre class="literal-block">
 std::auto_ptr&lt; boost::ptr_deque&lt;animal&gt; &gt; get_zoo()
@@ -570,24 +596,26 @@
 zoo_type::auto_type old_animal = zoo.replace( zoo.begin(), new monkey(&quot;bibi&quot;) );
 zoo.replace( 2, old_animal.release() ); // for random access containers
 </pre>
-<p>A map is a little different to iterator over than standard maps.
+<p>A map is slightly different to iterator over than standard maps.
 Now we say</p>
 <pre class="literal-block">
 typedef boost::ptr_map&lt;std::string, boost::nullable&lt;animal&gt; &gt; animal_map;
 animal_map map;
 ...
-for( animal_map::iterator i = map.begin();
- i != map.end(); ++i )
+for( animal_map::const_iterator i = map.begin(), e = map.end(); i != e; ++i )
 {
- std::cout &lt;&lt; &quot;\n key: &quot; &lt;&lt; i.key();
+ std::cout &lt;&lt; &quot;\n key: &quot; &lt;&lt; i-&gt;first;
     std::cout &lt;&lt; &quot;\n age: &quot;;
     
     if( boost::is_null(i) )
         std::cout &lt;&lt; &quot;unknown&quot;;
     else
- std::cout &lt;&lt; i-&gt;age();
+ std::cout &lt;&lt; i-&gt;second-&gt;age();
  }
 </pre>
+<p>Except for the check for null, this looks like it would with a normal map. But if <tt class="docutils literal"><span class="pre">age()</span></tt> had
+not been a <tt class="docutils literal"><span class="pre">const</span></tt> member function,
+it would not have compiled.</p>
 <p>Maps can also be indexed with bounds-checking</p>
 <pre class="literal-block">
 try
@@ -601,6 +629,24 @@
 </pre>
 </div>
 <div class="section">
+<h1><a id="std-auto-ptr-u-overloads" name="std-auto-ptr-u-overloads"><tt class="docutils literal"><span class="pre">std::auto_ptr&lt;U&gt;</span></tt> overloads</a></h1>
+<p>Evetime there is a function that takes a <tt class="docutils literal"><span class="pre">T*</span></tt> parameter, there is
+also a function taking an <tt class="docutils literal"><span class="pre">std::auto_ptr&lt;U&gt;</span></tt> parameter. This is of course done
+to make the library intregrate seamless with <tt class="docutils literal"><span class="pre">std::auto_ptr</span></tt>. For example</p>
+<pre class="literal-block">
+std::ptr_vector&lt;Base&gt; vec;
+vec.push_back( new Base );
+</pre>
+<p>is complemented by</p>
+<pre class="literal-block">
+std::auto_ptr&lt;Derived&gt; p( new Derived );
+vec.push_back( p );
+</pre>
+<p>Notice that the template argument for <tt class="docutils literal"><span class="pre">std::auto_ptr</span></tt> does not need to
+follow the template argument for <tt class="docutils literal"><span class="pre">ptr_vector</span></tt> as long as <tt class="docutils literal"><span class="pre">Derived*</span></tt>
+can be implicitly converted to <tt class="docutils literal"><span class="pre">Base*</span></tt>.</p>
+</div>
+<div class="section">
 <h1><a id="algorithms" name="algorithms">Algorithms</a></h1>
 <p>Unfortunately it is not possible to use pointer containers with
 mutating algorithms from the standard library. However,
@@ -631,18 +677,21 @@
 BOOST_ASSERT( another_zoo.empty() );
 </pre>
 <p>That is all; now you have learned all the basics!</p>
+<hr><p><strong>See also</strong></p>
+<ul class="simple">
+<li><a class="reference" href="guidelines.html">Usage guidelines</a></li>
+<li><a class="reference" href="../../conversion/cast.htm#Polymorphic_castl">Cast utilities</a></li>
+</ul>
 <p><strong>Navigate</strong></p>
-<blockquote>
 <ul class="simple">
 <li><a class="reference" href="ptr_container.html">home</a></li>
 <li><a class="reference" href="examples.html">examples</a></li>
 </ul>
-</blockquote>
-<table class="docutils field-list" frame="void" rules="none">
+<hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />
 <tbody valign="top">
-<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
+<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td>
 </tr>
 </tbody>
 </table>

Modified: trunk/libs/ptr_container/doc/tutorial.rst
==============================================================================
--- trunk/libs/ptr_container/doc/tutorial.rst (original)
+++ trunk/libs/ptr_container/doc/tutorial.rst 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -21,6 +21,7 @@
 * `Null values`_
 * `Clonability`_
 * `New functions`_
+* `std::auto_ptr<U> overloads`_
 * `Algorithms`_
 
 Basic usage
@@ -37,8 +38,9 @@
     class animal : `boost::noncopyable <http://www.boost.org/libs/utility/utility.htm#Class_noncopyable>`_
     {
     public:
- virtual ~animal() {}
- virtual void eat() = 0;
+ virtual ~animal() {}
+ virtual void eat() = 0;
+ virtual int age() const = 0;
         // ...
     };
     
@@ -181,7 +183,25 @@
     animals["bobo"].set_name("bobo");
 
 This requires a default constructor for animals and
-a function to do the initialization, in this case ``set_name()``;
+a function to do the initialization, in this case ``set_name()``.
+
+A better alternative is to use `Boost.Assign <../../assign/index.html>`_
+to help you out. In particular, consider
+
+- `ptr_push_back(), ptr_push_front(), ptr_insert() and ptr_map_insert() <../../assign/doc/index.html#ptr_push_back>`_
+
+- `ptr_list_of() <../../assign/doc/index.html#ptr_list_of>`_
+
+For example, the above insertion may now be written ::
+
+ boost::ptr_multimap<std::string,animal> animals;
+
+ using namespace boost::assign;
+ ptr_map_insert<monkey>( animals )( "bobo", "bobo" );
+ ptr_map_insert<elephant>( animals )( "bobo", "bobo" );
+ ptr_map_insert<whale>( animals )( "anna", "anna" );
+ ptr_map_insert<emu>( animals )( "anna", "anna" );
+
     
 Null values
 -----------
@@ -249,7 +269,7 @@
     another_zoo.assign( zoo.begin(), zoo.end() );
 
 will fill another zoo with clones of the first zoo. Similarly,
-insert() can now insert clones into your pointer container ::
+``insert()`` can now insert clones into your pointer container ::
 
     another_zoo.insert( another_zoo.begin(), zoo.begin(), zoo.end() );
 
@@ -273,7 +293,15 @@
 You can think of ``auto_type`` as a non-copyable form of
 ``std::auto_ptr``. Notice that when you release an object, the
 pointer is removed from the container and the containers size
-shrinks. You can also release the entire container if you
+shrinks. For containers that store nulls, we can exploit that
+``auto_type`` is convertible to ``bool``::
+
+ if( ptr_vector< nullable<T> >::auto_type r = vec.pop_back() )
+ {
+ ...
+ }
+
+You can also release the entire container if you
 want to return it from a function ::
 
     std::auto_ptr< boost::ptr_deque<animal> > get_zoo()
@@ -302,23 +330,26 @@
     zoo_type::auto_type old_animal = zoo.replace( zoo.begin(), new monkey("bibi") );
     zoo.replace( 2, old_animal.release() ); // for random access containers
 
-A map is a little different to iterator over than standard maps.
+A map is slightly different to iterator over than standard maps.
 Now we say ::
 
     typedef boost::ptr_map<std::string, boost::nullable<animal> > animal_map;
     animal_map map;
     ...
- for( animal_map::iterator i = map.begin();
- i != map.end(); ++i )
+ for( animal_map::const_iterator i = map.begin(), e = map.end(); i != e; ++i )
     {
- std::cout << "\n key: " << i.key();
+ std::cout << "\n key: " << i->first;
         std::cout << "\n age: ";
         
         if( boost::is_null(i) )
             std::cout << "unknown";
         else
- std::cout << i->age();
+ std::cout << i->second->age();
      }
+
+Except for the check for null, this looks like it would with a normal map. But if ``age()`` had
+not been a ``const`` member function,
+it would not have compiled.
             
 Maps can also be indexed with bounds-checking ::
 
@@ -331,6 +362,25 @@
         // "bobo" not found
     }
 
+``std::auto_ptr<U>`` overloads
+------------------------------
+
+Evetime there is a function that takes a ``T*`` parameter, there is
+also a function taking an ``std::auto_ptr<U>`` parameter. This is of course done
+to make the library intregrate seamless with ``std::auto_ptr``. For example ::
+
+ std::ptr_vector<Base> vec;
+ vec.push_back( new Base );
+
+is complemented by ::
+
+ std::auto_ptr<Derived> p( new Derived );
+ vec.push_back( p );
+
+Notice that the template argument for ``std::auto_ptr`` does not need to
+follow the template argument for ``ptr_vector`` as long as ``Derived*``
+can be implicitly converted to ``Base*``.
+
 Algorithms
 ----------
 
@@ -367,11 +417,26 @@
          
 That is all; now you have learned all the basics!
 
+.. raw:: html
+
+ <hr>
+
+**See also**
+
+- `Usage guidelines <guidelines.html>`_
+
+- `Cast utilities <../../conversion/cast.htm#Polymorphic_castl>`_
+
 **Navigate**
 
- - `home <ptr_container.html>`_
- - `examples <examples.html>`_
+- `home <ptr_container.html>`_
+- `examples <examples.html>`_
+
+.. raw:: html
+
+ <hr>
 
+:Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
 
-:copyright: Thorsten Ottosen 2004-2005.
+__ http://www.boost.org/LICENSE_1_0.txt
 

Added: trunk/libs/ptr_container/doc/tutorial_example.html
==============================================================================
--- (empty file)
+++ trunk/libs/ptr_container/doc/tutorial_example.html 2007-10-24 11:02:01 EDT (Wed, 24 Oct 2007)
@@ -0,0 +1,365 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> </title>
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+
+<body>
+ <pre><span class=comment>//
+// Boost.Pointer Container
+//
+// Copyright Thorsten Ottosen 2003-2005. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/ptr_container/
+//
+
+//
+// This example is intended to get you started.
+// Notice how the smart container
+//
+// 1. takes ownership of objects
+// 2. transfers ownership
+// 3. applies indirection to iterators
+// 4. clones objects from other smart containers
+//
+
+//
+// First we select which container to use.
+//</span>
+<span class=preprocessor>#include</span> <span class=special>&lt;</span><span class=identifier>boost</span><span class=special>/</span><span class=identifier>ptr_container</span><span class=special>/</span><span class=identifier>ptr_deque</span><span class=special>.</span><span class=identifier>hpp</span><span class=special>&gt;</span>
+
+<span class=comment>//
+// we need these later in the example
+//</span>
+<span class=preprocessor>#include</span> <span class=special>&lt;</span><span class=identifier>boost</span><span class=special>/</span><span class=identifier>assert</span><span class=special>.</span><span class=identifier>hpp</span><span class=special>&gt;</span>
+<span class=preprocessor>#include</span> <span class=special>&lt;</span><span class=identifier>string</span><span class=special>&gt;</span>
+<span class=preprocessor>#include</span> <span class=special>&lt;</span><span class=identifier>exception</span><span class=special>&gt;</span>
+
+
+<span class=comment>//
+// Then we define a small polymorphic class
+// hierarchy.
+//</span>
+
+<span class=keyword>class</span> <span class=identifier>animal</span> <span class=special>:</span> <span class=identifier>boost</span><span class=special>::</span><span class=identifier>noncopyable</span>
+<span class=special>{</span>
+ <span class=keyword>virtual</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>do_speak</span><span class=special>()</span> <span class=keyword>const</span> <span class=special>=</span> <span class=number>0</span><span class=special>;</span>
+ <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>name_</span><span class=special>;</span>
+
+<span class=keyword>protected</span><span class=special>:</span>
+ <span class=comment>//
+ // Animals cannot be copied...
+ //</span>
+ <span class=identifier>animal</span><span class=special>(</span> <span class=keyword>const</span> <span class=identifier>animal</span><span class=special>&amp;</span> <span class=identifier>r</span> <span class=special>)</span> <span class=special>:</span> <span class=identifier>name_</span><span class=special>(</span> <span class=identifier>r</span><span class=special>.</span><span class=identifier>name_</span> <span class=special>)</span> <span class=special>{</span> <span class=special>}</span>
+ <span class=keyword>void</span> <span class=keyword>operator</span><span class=special>=(</span> <span class=keyword>const</span> <span class=identifier>animal</span><span class=special>&amp;</span> <span class=special>);</span>
+
+<span class=keyword>private</span><span class=special>:</span>
+ <span class=comment>//
+ // ...but due to advances in genetics, we can clone them!
+ //</span>
+
+ <span class=keyword>virtual</span> <span class=identifier>animal</span><span class=special>*</span> <span class=identifier>do_clone</span><span class=special>()</span> <span class=keyword>const</span> <span class=special>=</span> <span class=number>0</span><span class=special>;</span>
+
+<span class=keyword>public</span><span class=special>:</span>
+ <span class=identifier>animal</span><span class=special>(</span> <span class=keyword>const</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span><span class=special>&amp;</span> <span class=identifier>name</span> <span class=special>)</span> <span class=special>:</span> <span class=identifier>name_</span><span class=special>(</span><span class=identifier>name</span><span class=special>)</span> <span class=special>{</span> <span class=special>}</span>
+ <span class=keyword>virtual</span> <span class=special>~</span><span class=identifier>animal</span><span class=special>()</span> <span class=keyword>throw</span><span class=special>()</span> <span class=special>{</span> <span class=special>}</span>
+
+ <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>speak</span><span class=special>()</span> <span class=keyword>const</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>do_speak</span><span class=special>();</span>
+ <span class=special>}</span>
+
+ <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>name</span><span class=special>()</span> <span class=keyword>const</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>name_</span><span class=special>;</span>
+ <span class=special>}</span>
+
+ <span class=identifier>animal</span><span class=special>*</span> <span class=identifier>clone</span><span class=special>()</span> <span class=keyword>const</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>do_clone</span><span class=special>();</span>
+ <span class=special>}</span>
+<span class=special>};</span>
+
+<span class=comment>//
+// An animal is still not Clonable. We need this last hook.
+//
+// Notice that we pass the animal by const reference
+// and return by pointer.
+//</span>
+
+<span class=identifier>animal</span><span class=special>*</span> <span class=identifier>new_clone</span><span class=special>(</span> <span class=keyword>const</span> <span class=identifier>animal</span><span class=special>&amp;</span> <span class=identifier>a</span> <span class=special>)</span>
+<span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>a</span><span class=special>.</span><span class=identifier>clone</span><span class=special>();</span>
+<span class=special>}</span>
+
+<span class=comment>//
+// We do not need to define 'delete_clone()' since
+// since the default is to call the default 'operator delete()'.
+//</span>
+
+<span class=keyword>const</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>muuuh</span> <span class=special>=</span> <span class=string>&quot;Muuuh!&quot;</span><span class=special>;</span>
+<span class=keyword>const</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>oiink</span> <span class=special>=</span> <span class=string>&quot;Oiiink&quot;</span><span class=special>;</span>
+
+<span class=keyword>class</span> <span class=identifier>cow</span> <span class=special>:</span> <span class=keyword>public</span> <span class=identifier>animal</span>
+<span class=special>{</span>
+ <span class=keyword>virtual</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>do_speak</span><span class=special>()</span> <span class=keyword>const</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>muuuh</span><span class=special>;</span>
+ <span class=special>}</span>
+
+ <span class=keyword>virtual</span> <span class=identifier>animal</span><span class=special>*</span> <span class=identifier>do_clone</span><span class=special>()</span> <span class=keyword>const</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=keyword>new</span> <span class=identifier>cow</span><span class=special>(</span> <span class=special>*</span><span class=keyword>this</span> <span class=special>);</span>
+ <span class=special>}</span>
+
+<span class=keyword>public</span><span class=special>:</span>
+ <span class=identifier>cow</span><span class=special>(</span> <span class=keyword>const</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span><span class=special>&amp;</span> <span class=identifier>name</span> <span class=special>)</span> <span class=special>:</span> <span class=identifier>animal</span><span class=special>(</span><span class=identifier>name</span><span class=special>)</span> <span class=special>{</span> <span class=special>}</span>
+<span class=special>};</span>
+
+<span class=keyword>class</span> <span class=identifier>pig</span> <span class=special>:</span> <span class=keyword>public</span> <span class=identifier>animal</span>
+<span class=special>{</span>
+ <span class=keyword>virtual</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span> <span class=identifier>do_speak</span><span class=special>()</span> <span class=keyword>const</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>oiink</span><span class=special>;</span>
+ <span class=special>}</span>
+
+ <span class=keyword>virtual</span> <span class=identifier>animal</span><span class=special>*</span> <span class=identifier>do_clone</span><span class=special>()</span> <span class=keyword>const</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=keyword>new</span> <span class=identifier>pig</span><span class=special>(</span> <span class=special>*</span><span class=keyword>this</span> <span class=special>);</span>
+ <span class=special>}</span>
+
+<span class=keyword>public</span><span class=special>:</span>
+ <span class=identifier>pig</span><span class=special>(</span> <span class=keyword>const</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>string</span><span class=special>&amp;</span> <span class=identifier>name</span> <span class=special>)</span> <span class=special>:</span> <span class=identifier>animal</span><span class=special>(</span><span class=identifier>name</span><span class=special>)</span> <span class=special>{</span> <span class=special>}</span>
+<span class=special>};</span>
+
+<span class=comment>//
+// Then we, of course, need a place to put all
+// those animals.
+//</span>
+
+<span class=keyword>class</span> <span class=identifier>farm</span>
+<span class=special>{</span>
+ <span class=comment>//
+ // This is where the smart containers are handy
+ //</span>
+ <span class=keyword>typedef</span> <span class=identifier>boost</span><span class=special>::</span><span class=identifier>ptr_deque</span><span class=special>&lt;</span><span class=identifier>animal</span><span class=special>&gt;</span> <span class=identifier>barn_type</span><span class=special>;</span>
+ <span class=identifier>barn_type</span> <span class=identifier>barn</span><span class=special>;</span>
+
+ <span class=comment>//
+ // An error type
+ //</span>
+ <span class=keyword>struct</span> <span class=identifier>farm_trouble</span> <span class=special>:</span> <span class=keyword>public</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>exception</span> <span class=special>{</span> <span class=special>};</span>
+
+<span class=keyword>public</span><span class=special>:</span>
+ <span class=comment>//
+ // We would like to make it possible to
+ // iterate over the animals in the farm
+ //</span>
+ <span class=keyword>typedef</span> <span class=identifier>barn_type</span><span class=special>::</span><span class=identifier>iterator</span> <span class=identifier>animal_iterator</span><span class=special>;</span>
+
+ <span class=comment>//
+ // We also need to count the farm's size...
+ //</span>
+ <span class=keyword>typedef</span> <span class=identifier>barn_type</span><span class=special>::</span><span class=identifier>size_type</span> <span class=identifier>size_type</span><span class=special>;</span>
+
+ <span class=comment>//
+ // And we also want to transfer an animal
+ // safely around. The easiest way to think
+ // about '::auto_type' is to imagine a simplified
+ // 'std::auto_ptr&lt;T&gt;' ... this means you can expect
+ //
+ // T* operator-&gt;()
+ // T* release()
+ // deleting destructor
+ //
+ // but not more.
+ //</span>
+ <span class=keyword>typedef</span> <span class=identifier>barn_type</span><span class=special>::</span><span class=identifier>auto_type</span> <span class=identifier>animal_transport</span><span class=special>;</span>
+
+ <span class=comment>//
+ // Create an empty farm.
+ //</span>
+ <span class=identifier>farm</span><span class=special>()</span> <span class=special>{</span> <span class=special>}</span>
+
+ <span class=comment>//
+ // We need a constructor that can make a new
+ // farm by cloning a range of animals.
+ //</span>
+ <span class=identifier>farm</span><span class=special>(</span> <span class=identifier>animal_iterator</span> <span class=identifier>begin</span><span class=special>,</span> <span class=identifier>animal_iterator</span> <span class=identifier>end</span> <span class=special>)</span>
+ <span class=special>:</span>
+ <span class=comment>//
+ // Objects are always cloned before insertion
+ // unless we explicitly add a pointer or
+ // use 'release()'. Therefore we actually
+ // clone all animals in the range
+ //</span>
+ <span class=identifier>barn</span><span class=special>(</span> <span class=identifier>begin</span><span class=special>,</span> <span class=identifier>end</span> <span class=special>)</span> <span class=special>{</span> <span class=special>}</span>
+
+ <span class=comment>//
+ // ... so we need some other function too
+ //</span>
+
+ <span class=identifier>animal_iterator</span> <span class=identifier>begin</span><span class=special>()</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>barn</span><span class=special>.</span><span class=identifier>begin</span><span class=special>();</span>
+ <span class=special>}</span>
+
+ <span class=identifier>animal_iterator</span> <span class=identifier>end</span><span class=special>()</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>barn</span><span class=special>.</span><span class=identifier>end</span><span class=special>();</span>
+ <span class=special>}</span>
+
+ <span class=comment>//
+ // Here it is quite ok to have an 'animal*' argument.
+ // The smart container will handle all ownership
+ // issues.
+ //</span>
+ <span class=keyword>void</span> <span class=identifier>buy_animal</span><span class=special>(</span> <span class=identifier>animal</span><span class=special>*</span> <span class=identifier>a</span> <span class=special>)</span>
+ <span class=special>{</span>
+ <span class=identifier>barn</span><span class=special>.</span><span class=identifier>push_back</span><span class=special>(</span> <span class=identifier>a</span> <span class=special>);</span>
+ <span class=special>}</span>
+
+ <span class=comment>//
+ // The farm can also be in economical trouble and
+ // therefore be in the need to sell animals.
+ //</span>
+ <span class=identifier>animal_transport</span> <span class=identifier>sell_animal</span><span class=special>(</span> <span class=identifier>animal_iterator</span> <span class=identifier>to_sell</span> <span class=special>)</span>
+ <span class=special>{</span>
+ <span class=keyword>if</span><span class=special>(</span> <span class=identifier>to_sell</span> <span class=special>==</span> <span class=identifier>end</span><span class=special>()</span> <span class=special>)</span>
+ <span class=keyword>throw</span> <span class=identifier>farm_trouble</span><span class=special>();</span>
+
+ <span class=comment>//
+ // Here we remove the animal from the barn,
+ // but the animal is not deleted yet...it's
+ // up to the buyer to decide what
+ // to do with it.
+ //</span>
+ <span class=keyword>return</span> <span class=identifier>barn</span><span class=special>.</span><span class=identifier>release</span><span class=special>(</span> <span class=identifier>to_sell</span> <span class=special>);</span>
+ <span class=special>}</span>
+
+ <span class=comment>//
+ // How big a farm do we have?
+ //</span>
+ <span class=identifier>size_type</span> <span class=identifier>size</span><span class=special>()</span> <span class=keyword>const</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>barn</span><span class=special>.</span><span class=identifier>size</span><span class=special>();</span>
+ <span class=special>}</span>
+
+ <span class=comment>//
+ // If things are bad, we might choose to sell all animals :-(
+ //</span>
+ <span class=identifier>std</span><span class=special>::</span><span class=identifier>auto_ptr</span><span class=special>&lt;</span><span class=identifier>barn_type</span><span class=special>&gt;</span> <span class=identifier>sell_farm</span><span class=special>()</span>
+ <span class=special>{</span>
+ <span class=keyword>return</span> <span class=identifier>barn</span><span class=special>.</span><span class=identifier>release</span><span class=special>();</span>
+ <span class=special>}</span>
+
+ <span class=comment>//
+ // However, if things are good, we might buy somebody
+ // else's farm :-)
+ //</span>
+
+ <span class=keyword>void</span> <span class=identifier>buy_farm</span><span class=special>(</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>auto_ptr</span><span class=special>&lt;</span><span class=identifier>barn_type</span><span class=special>&gt;</span> <span class=identifier>other</span> <span class=special>)</span>
+ <span class=special>{</span>
+ <span class=comment>//
+ // This line inserts all the animals from 'other'
+ // and is guaranteed either to succeed or to have no
+ // effect
+ //</span>
+ <span class=identifier>barn</span><span class=special>.</span><span class=identifier>transfer</span><span class=special>(</span> <span class=identifier>barn</span><span class=special>.</span><span class=identifier>end</span><span class=special>(),</span> <span class=comment>// insert new animals at the end</span>
+ <span class=special>*</span><span class=identifier>other</span> <span class=special>);</span> <span class=comment>// we want to transfer all animals,
+ // so we use the whole container as argument
+ //
+ // You might think you would have to do
+ //
+ // other.release();
+ //
+ // but '*other' is empty and can go out of scope as it wants
+ //</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>other</span><span class=special>-&gt;</span><span class=identifier>empty</span><span class=special>()</span> <span class=special>);</span>
+ <span class=special>}</span>
+
+<span class=special>};</span> <span class=comment>// class 'farm'.</span>
+
+<span class=keyword>int</span> <span class=identifier>main</span><span class=special>()</span>
+<span class=special>{</span>
+ <span class=comment>//
+ // First we make a farm
+ //</span>
+ <span class=identifier>farm</span> <span class=identifier>animal_farm</span><span class=special>;</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>size</span><span class=special>()</span> <span class=special>==</span> <span class=number>0u</span> <span class=special>);</span>
+
+ <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>buy_animal</span><span class=special>(</span> <span class=keyword>new</span> <span class=identifier>pig</span><span class=special>(</span><span class=string>&quot;Betty&quot;</span><span class=special>)</span> <span class=special>);</span>
+ <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>buy_animal</span><span class=special>(</span> <span class=keyword>new</span> <span class=identifier>pig</span><span class=special>(</span><span class=string>&quot;Benny&quot;</span><span class=special>)</span> <span class=special>);</span>
+ <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>buy_animal</span><span class=special>(</span> <span class=keyword>new</span> <span class=identifier>pig</span><span class=special>(</span><span class=string>&quot;Jeltzin&quot;</span><span class=special>)</span> <span class=special>);</span>
+ <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>buy_animal</span><span class=special>(</span> <span class=keyword>new</span> <span class=identifier>cow</span><span class=special>(</span><span class=string>&quot;Hanz&quot;</span><span class=special>)</span> <span class=special>);</span>
+ <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>buy_animal</span><span class=special>(</span> <span class=keyword>new</span> <span class=identifier>cow</span><span class=special>(</span><span class=string>&quot;Mary&quot;</span><span class=special>)</span> <span class=special>);</span>
+ <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>buy_animal</span><span class=special>(</span> <span class=keyword>new</span> <span class=identifier>cow</span><span class=special>(</span><span class=string>&quot;Frederik&quot;</span><span class=special>)</span> <span class=special>);</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>size</span><span class=special>()</span> <span class=special>==</span> <span class=number>6u</span> <span class=special>);</span>
+
+ <span class=comment>//
+ // Then we make another farm...it will actually contain
+ // a clone of the other farm.
+ //</span>
+ <span class=identifier>farm</span> <span class=identifier>new_farm</span><span class=special>(</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>begin</span><span class=special>(),</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>end</span><span class=special>()</span> <span class=special>);</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>new_farm</span><span class=special>.</span><span class=identifier>size</span><span class=special>()</span> <span class=special>==</span> <span class=number>6u</span> <span class=special>);</span>
+
+ <span class=comment>//
+ // Is it really clones in the new farm?
+ //</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>new_farm</span><span class=special>.</span><span class=identifier>begin</span><span class=special>()-&gt;</span><span class=identifier>name</span><span class=special>()</span> <span class=special>==</span> <span class=string>&quot;Betty&quot;</span> <span class=special>);</span>
+
+ <span class=comment>//
+ // Then we search for an animal, Mary (the Crown Princess of Denmark),
+ // because we would like to buy her ...
+ //</span>
+ <span class=keyword>typedef</span> <span class=identifier>farm</span><span class=special>::</span><span class=identifier>animal_iterator</span> <span class=identifier>iterator</span><span class=special>;</span>
+ <span class=identifier>iterator</span> <span class=identifier>to_sell</span><span class=special>;</span>
+ <span class=keyword>for</span><span class=special>(</span> <span class=identifier>iterator</span> <span class=identifier>i</span> <span class=special>=</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>begin</span><span class=special>(),</span>
+ <span class=identifier>end</span> <span class=special>=</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>end</span><span class=special>();</span>
+ <span class=identifier>i</span> <span class=special>!=</span> <span class=identifier>end</span><span class=special>;</span> <span class=special>++</span><span class=identifier>i</span> <span class=special>)</span>
+ <span class=special>{</span>
+ <span class=keyword>if</span><span class=special>(</span> <span class=identifier>i</span><span class=special>-&gt;</span><span class=identifier>name</span><span class=special>()</span> <span class=special>==</span> <span class=string>&quot;Mary&quot;</span> <span class=special>)</span>
+ <span class=special>{</span>
+ <span class=identifier>to_sell</span> <span class=special>=</span> <span class=identifier>i</span><span class=special>;</span>
+ <span class=keyword>break</span><span class=special>;</span>
+ <span class=special>}</span>
+ <span class=special>}</span>
+
+ <span class=identifier>farm</span><span class=special>::</span><span class=identifier>animal_transport</span> <span class=identifier>mary</span> <span class=special>=</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>sell_animal</span><span class=special>(</span> <span class=identifier>to_sell</span> <span class=special>);</span>
+
+
+ <span class=keyword>if</span><span class=special>(</span> <span class=identifier>mary</span><span class=special>-&gt;</span><span class=identifier>speak</span><span class=special>()</span> <span class=special>==</span> <span class=identifier>muuuh</span> <span class=special>)</span>
+ <span class=comment>//
+ // Great, Mary is a cow, and she may live longer
+ //</span>
+ <span class=identifier>new_farm</span><span class=special>.</span><span class=identifier>buy_animal</span><span class=special>(</span> <span class=identifier>mary</span><span class=special>.</span><span class=identifier>release</span><span class=special>()</span> <span class=special>);</span>
+ <span class=keyword>else</span>
+ <span class=comment>//
+ // Then the animal would be destroyed (!)
+ // when we go out of scope.
+ //</span>
+ <span class=special>;</span>
+
+ <span class=comment>//
+ // Now we can observe some changes to the two farms...
+ //</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>size</span><span class=special>()</span> <span class=special>==</span> <span class=number>5u</span> <span class=special>);</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>new_farm</span><span class=special>.</span><span class=identifier>size</span><span class=special>()</span> <span class=special>==</span> <span class=number>7u</span> <span class=special>);</span>
+
+ <span class=comment>//
+ // The new farm has however underestimated how much
+ // it cost to feed Mary and its owner is forced to sell the farm...
+ //</span>
+ <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>buy_farm</span><span class=special>(</span> <span class=identifier>new_farm</span><span class=special>.</span><span class=identifier>sell_farm</span><span class=special>()</span> <span class=special>);</span>
+
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>new_farm</span><span class=special>.</span><span class=identifier>size</span><span class=special>()</span> <span class=special>==</span> <span class=number>0u</span> <span class=special>);</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=identifier>animal_farm</span><span class=special>.</span><span class=identifier>size</span><span class=special>()</span> <span class=special>==</span> <span class=number>12u</span> <span class=special>);</span>
+<span class=special>}</span>
+</pre>
+</body>
+
+</html>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk