Boost logo

Boost-Commit :

From: nesotto_at_[hidden]
Date: 2007-10-27 17:50:17


Author: nesotto
Date: 2007-10-27 17:50:14 EDT (Sat, 27 Oct 2007)
New Revision: 40511
URL: http://svn.boost.org/trac/boost/changeset/40511

Log:
update of all new functionality
Text files modified:
   trunk/libs/ptr_container/doc/conventions.html | 49 ++++-----
   trunk/libs/ptr_container/doc/conventions.rst | 12 --
   trunk/libs/ptr_container/doc/examples.html | 16 +-
   trunk/libs/ptr_container/doc/examples.rst | 44 ++++----
   trunk/libs/ptr_container/doc/faq.html | 37 +++----
   trunk/libs/ptr_container/doc/faq.rst | 5 -
   trunk/libs/ptr_container/doc/guidelines.html | 4
   trunk/libs/ptr_container/doc/guidelines.rst | 58 +++++-----
   trunk/libs/ptr_container/doc/headers.html | 30 +++++-
   trunk/libs/ptr_container/doc/headers.rst | 20 +++
   trunk/libs/ptr_container/doc/ptr_array.html | 38 +++++++
   trunk/libs/ptr_container/doc/ptr_array.rst | 40 +++++++-
   trunk/libs/ptr_container/doc/ptr_container.html | 59 ++++++++++-
   trunk/libs/ptr_container/doc/ptr_container.rst | 115 +++++++++++++++++------
   trunk/libs/ptr_container/doc/ptr_multiset.html | 2
   trunk/libs/ptr_container/doc/ptr_multiset.rst | 2
   trunk/libs/ptr_container/doc/ptr_sequence_adapter.html | 22 ++++
   trunk/libs/ptr_container/doc/ptr_sequence_adapter.rst | 38 ++++++-
   trunk/libs/ptr_container/doc/ptr_set.html | 2
   trunk/libs/ptr_container/doc/ptr_set.rst | 2
   trunk/libs/ptr_container/doc/ptr_vector.html | 35 ++++++
   trunk/libs/ptr_container/doc/ptr_vector.rst | 38 ++++++-
   trunk/libs/ptr_container/doc/reference.html | 38 +++---
   trunk/libs/ptr_container/doc/reference.rst | 194 ++++++++++++++++++++--------------------
   trunk/libs/ptr_container/doc/reversible_ptr_container.html | 118 +++++++++++++++++-------
   trunk/libs/ptr_container/doc/reversible_ptr_container.rst | 121 ++++++++++++++++--------
   trunk/libs/ptr_container/doc/tutorial.html | 42 +++++--
   trunk/libs/ptr_container/doc/tutorial.rst | 53 ++++++----
   trunk/libs/ptr_container/doc/tutorial_example.html | 2
   29 files changed, 813 insertions(+), 423 deletions(-)

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -295,21 +295,20 @@
 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="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>
+<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="#stored-elements-are-required-to-be-cloneable-for-a-subset-of-the-operations" id="id6" name="id6">Stored elements are required to be Cloneable 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="id7" name="id7">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="id8" name="id8">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="id9" name="id9">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="id10" name="id10">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="id11" name="id11">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="id12" name="id12">Iterators are invalidated as in the corresponding standard container</a></li>
 </ul>
 </div>
 <div class="section">
-<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>
+<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>
 <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 +324,7 @@
 </pre>
 </div>
 <div class="section">
-<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>
+<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>
 <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,57 +335,49 @@
 stored pointers.</p>
 </div>
 <div class="section">
-<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>
+<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>
 <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="#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
-needed anyway, every container has a <tt class="docutils literal"><span class="pre">clone()</span></tt> member function
-(see <a class="reference" href="examples.html">Example 3</a>).</p>
-</div>
-<div class="section">
-<h1><a id="stored-elements-are-required-to-be-clonable-for-a-subset-of-the-operations" name="stored-elements-are-required-to-be-clonable-for-a-subset-of-the-operations">Stored elements are required to be <a class="reference" href="reference.html#the-clonable-concept">Clonable</a> for a subset of the operations</a></h1>
+<h1><a id="stored-elements-are-required-to-be-cloneable-for-a-subset-of-the-operations" name="stored-elements-are-required-to-be-cloneable-for-a-subset-of-the-operations">Stored elements are required to be <a class="reference" href="reference.html#the-Cloneable-concept">Cloneable</a> for a subset of the operations</a></h1>
 <p>This is because most polymorphic objects cannot be copied directly, but
 they can often be so by a use of a member function (see <a class="reference" href="examples.html">Example 4</a>). Often
 it does not even make sense to clone an object in which case a large
 subset of the operations are still workable.</p>
 </div>
 <div class="section">
-<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>
+<h1><a class="toc-backref" href="#id7" 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="#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>
+<h1><a class="toc-backref" href="#id8" 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="#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>
+<h1><a class="toc-backref" href="#id9" 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="#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>
+<h1><a class="toc-backref" href="#id10" 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="#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>
+<h1><a class="toc-backref" href="#id11" 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="#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>
+<h1><a class="toc-backref" href="#id12" 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>

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -51,17 +51,9 @@
 Similarly, ``operator==()`` for ``container<Foo>`` compares all objects
 with ``operator==(const Foo&, const Foo&)``.
 
-The containers are neither Copy Constructible nor Assignable
-------------------------------------------------------------
 
-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
-needed anyway, every container has a ``clone()`` member function
-(see `Example 3 <examples.html>`_).
-
-Stored elements are required to be `Clonable <reference.html#the-clonable-concept>`_ for a subset of the operations
--------------------------------------------------------------------------------------------------------------------
+Stored elements are required to be `Cloneable <reference.html#the-Cloneable-concept>`_ for a subset of the operations
+---------------------------------------------------------------------------------------------------------------------
 
 This is because most polymorphic objects cannot be copied directly, but
 they can often be so by a use of a member function (see `Example 4 <examples.html>`_). Often

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -296,7 +296,7 @@
 <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="#making-a-non-copyable-type-cloneable" id="id5" name="id5">4. Making a non-copyable type Cloneable</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>
@@ -335,12 +335,12 @@
 ptr_vector&lt;T&gt; vec2( vec1.clone() ); // deep copy objects of 'vec1' and use them to construct 'vec2', could be very expensive
 vec2 = vec1.release(); // give up ownership of pointers in 'vec1' and pass the ownership to 'vec2', rather cheap
 vec2.release(); // give up ownership; the objects will be deallocated if not assigned to another container
-vec1 = vec2; // compile time error: 'operator=()' not defined
-ptr_vector&lt;T&gt; vec3( vec1 ); // compile time error: copy-constructor not defined
+vec1 = vec2; // deep copy objects of 'vec2' and assign them to 'vec1', could be very expensive
+ptr_vector&lt;T&gt; vec3( vec1 ); // deep copy objects of 'vec1', could be very expensive
 </pre>
 </div>
 <div class="section">
-<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>
+<h1><a class="toc-backref" href="#id5" id="making-a-non-copyable-type-cloneable" name="making-a-non-copyable-type-cloneable"><span id="example-4"></span>4. Making a non-copyable type Cloneable</a></h1>
 <pre class="literal-block">
  // a class that has no normal copy semantics
 class X : boost::noncopyable { public: X* clone() const; ... };
@@ -349,7 +349,7 @@
 X* new_clone( const X&amp; x )
 { return x.clone(); }
                                                                    
-// we can now use the interface that requires clonability
+// we can now use the interface that requires cloneability
 ptr_vector&lt;X&gt; vec1, vec2;
 ...
 vec2 = vec1.clone(); // 'clone()' requires cloning &lt;g&gt;
@@ -359,7 +359,7 @@
 <div class="section">
 <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
+class X { ... }; // assume 'X' is Cloneable
 X x; // and 'X' can be stack-allocated
 ptr_list&lt;X&gt; list;
 list.push_back( new_clone( x ) ); // insert a clone
@@ -396,7 +396,7 @@
 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>
+<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&gt;</span></tt> without any problems.</p>
 </div>
 <div class="section">
 <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>
@@ -429,7 +429,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> </title>
-<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="stylesheet" href="default.css" type="text/css">
 </head>
 
 <body>

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -23,8 +23,8 @@
         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
- std::auto_ptr<T> p( 0 );
- my_container.push_back( p ); // throws bad_ptr
+ std::auto_ptr<T> p( 0 );
+ my_container.push_back( p ); // throws bad_ptr
 
 .. _`Example 2`:
 
@@ -55,14 +55,14 @@
         ptr_vector<T> vec2( vec1.clone() ); // deep copy objects of 'vec1' and use them to construct 'vec2', could be very expensive
         vec2 = vec1.release(); // give up ownership of pointers in 'vec1' and pass the ownership to 'vec2', rather cheap
         vec2.release(); // give up ownership; the objects will be deallocated if not assigned to another container
- vec1 = vec2; // compile time error: 'operator=()' not defined
- ptr_vector<T> vec3( vec1 ); // compile time error: copy-constructor not defined
+ vec1 = vec2; // deep copy objects of 'vec2' and assign them to 'vec1', could be very expensive
+ ptr_vector<T> vec3( vec1 ); // deep copy objects of 'vec1', could be very expensive
 
 
 .. _`Example 4`:
 
-4. Making a non-copyable type Clonable
-++++++++++++++++++++++++++++++++++++++
+4. Making a non-copyable type Cloneable
++++++++++++++++++++++++++++++++++++++++
 
 ::
         
@@ -73,7 +73,7 @@
         X* new_clone( const X& x )
         { return x.clone(); }
                                                                            
- // we can now use the interface that requires clonability
+ // we can now use the interface that requires cloneability
         ptr_vector<X> vec1, vec2;
         ...
         vec2 = vec1.clone(); // 'clone()' requires cloning <g>
@@ -87,15 +87,15 @@
 
 ::
 
- class X { ... }; // assume 'X' is Clonable
+ class X { ... }; // assume 'X' is Cloneable
         X x; // and 'X' can be stack-allocated
         ptr_list<X> list;
         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 );
+ std::auto_ptr<X> p( new X );
+ list.push_back( p ); // give up ownership
+ BOOST_ASSERT( p.get() == 0 );
 
 
 .. _`Example 6`:
@@ -114,8 +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
-
+ deq.push_back( ptr.release() ); // give ownership back to the container
+
 
 .. _`Example 7`:
 
@@ -133,7 +133,7 @@
         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.
+We can also transfer objects from ``ptr_container<Derived>`` to ``ptr_container<Base>`` without any problems.
 
 .. _`Example 8`:
 
@@ -164,18 +164,18 @@
 features at work. The example provide lots of comments.
 
 .. raw:: html
- :file: tutorial_example.html
+ :file: tutorial_example.html
 
 ..
- 10. Changing the Clone Allocator
- ++++++++++++++++++++++++++++++++
+ 10. Changing the Clone Allocator
+ ++++++++++++++++++++++++++++++++
 
- This example shows how we can change
- the Clone Allocator to use the pointer containers
- as view into other containers:
+ This example shows how we can change
+ the Clone Allocator to use the pointer containers
+ as view into other containers:
 
- .. raw:: html
- :file: tut2.html
+ .. raw:: html
+ :file: tut2.html
 
 .. raw:: html
 

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -292,27 +292,22 @@
 <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="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>
+<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-smart-pointers" id="id11" name="id11">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="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>
 </ul>
 </div>
 <div class="section">
-<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="#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>
+<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>
 <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="#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>
+<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>
 <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 +315,7 @@
 provided as member functions. -->
 </div>
 <div class="section">
-<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>
+<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>
 <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 +323,7 @@
 Passing the key as a reference achieves just that.</p>
 </div>
 <div class="section">
-<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>
+<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>
 <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,13 +343,13 @@
 </pre>
 </div>
 <div class="section">
-<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>
+<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>
 <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="#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>
+<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>
 <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
@@ -363,7 +358,7 @@
 elegant solution.</p>
 </div>
 <div class="section">
-<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>
+<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-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,7 +369,7 @@
 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="#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>
+<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>
 <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>

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -9,11 +9,6 @@
 ===
 
 .. contents:: :local:
-
-Since a pointer container is not Copy Constructible and Assignable, I cannot put them into standard containers; what do I do?
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-Since they are `Clonable <ptr_container.html#the-clonable-concept>`_, you simply put them in a pointer container.
  
 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?
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -323,14 +323,14 @@
 </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
+<p>Idiomatic 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>
+<p>This 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>

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -35,7 +35,7 @@
 Recommended practice for Object-Oriented Programming
 ----------------------------------------------------
 
-Idiomtic Object-Oriented Programming in C++ looks a bit different from
+Idiomatic 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
@@ -44,16 +44,16 @@
 1. Make base classes abstract and without data
 ++++++++++++++++++++++++++++++++++++++++++++++
 
-The has the following advantages:
+This has the following advantages:
 
- a. It reduces *coupling* because you do not have to maintain or update state
+ 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:
@@ -72,26 +72,26 @@
 
 In code::
 
- class Polymorphic
- {
- private:
- virtual int do_foo() = 0;
-
+ class Polymorphic
+ {
+ private:
+ virtual int do_foo() = 0;
+
         public:
- int foo()
- {
- return do_foo();
- }
- ...
- };
-
+ 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
+ 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`__.
 
@@ -104,10 +104,10 @@
 it does not prevent it for classes further down the hierarchy. This is where
 `boost::noncopyable`__ is handy to use::
 
- class Polymorphic : boost::noncopyable
- {
- ...
- };
+ class Polymorphic : boost::noncopyable
+ {
+ ...
+ };
 
 .. __ : http://www.boost.org/libs/utility/utility.htm#Class_noncopyable
 

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -323,6 +323,9 @@
 <td>classes <a class="reference" href="ptr_map.html">ptr_map</a> and <a class="reference" href="ptr_multimap.html">ptr_multimap</a>
 (and <tt class="docutils literal"><span class="pre">std::map</span></tt> and <tt class="docutils literal"><span class="pre">std::multimap</span></tt>)</td>
 </tr>
+<tr><td><tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/ptr_container.hpp&gt;</span></tt></td>
+<td>all classes</td>
+</tr>
 <tr><td><tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/ptr_sequence_adapter.hpp&gt;</span></tt></td>
 <td>class <a class="reference" href="ptr_sequence_adapter.html">ptr_sequence_adapter</a></td>
 </tr>
@@ -333,11 +336,7 @@
 <td>classes <a class="reference" href="ptr_map_adapter.html">ptr_map_adapter</a> and <a class="reference" href="ptr_multimap_adapter.html">ptr_multimap_adapter</a></td>
 </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 <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>
+<td>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> and <a class="reference" href="reference.html#exception-classes">bad_pointer</a></td>
 </tr>
 <tr><td><tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/indirect_fun.hpp&gt;</span></tt></td>
 <td>class <a class="reference" href="indirect_fun.html">indirect_fun</a></td>
@@ -345,6 +344,27 @@
 <tr><td><tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/nullable.hpp&gt;</span></tt></td>
 <td>class <a class="reference" href="reference.html#class-nullable">nullable</a></td>
 </tr>
+<tr><td><tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/serialize_ptr_deque.hpp&gt;</span></tt></td>
+<td>class <a class="reference" href="ptr_deque.html">ptr_deque</a> with serialization support</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/serialize_ptr_list.hpp&gt;</span></tt></td>
+<td>class <a class="reference" href="ptr_list.html">ptr_list</a> with serialization support</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/serialize_ptr_vector.hpp&gt;</span></tt></td>
+<td>class <a class="reference" href="ptr_vector.html">ptr_vector</a> with serialization support</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/serialize_ptr_array.hpp&gt;</span></tt></td>
+<td>class <a class="reference" href="ptr_array.html">ptr_array</a> with serialization support</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/serialize_ptr_set.hpp&gt;</span></tt></td>
+<td>classes <a class="reference" href="ptr_set.html">ptr_set</a> and <a class="reference" href="ptr_multiset.html">ptr_multiset</a> with serialization support</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/serialize_ptr_map.hpp&gt;</span></tt></td>
+<td>classes <a class="reference" href="ptr_map.html">ptr_map</a> and <a class="reference" href="ptr_multimap.html">ptr_multimap</a> with serialization support</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/serialize_ptr_container.hpp&gt;</span></tt></td>
+<td>all classes with serialization support</td>
+</tr>
 </tbody>
 </table>
 <p><strong>Navigate:</strong></p>

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -28,17 +28,33 @@
 ``<boost/ptr_container/ptr_map.hpp>`` classes `ptr_map <ptr_map.html>`_ and `ptr_multimap <ptr_multimap.html>`_
                                                            (and ``std::map`` and ``std::multimap``)
 
+``<boost/ptr_container/ptr_container.hpp>`` all classes
+
 ``<boost/ptr_container/ptr_sequence_adapter.hpp>`` class `ptr_sequence_adapter <ptr_sequence_adapter.html>`_
 
 ``<boost/ptr_container/ptr_set_adapter.hpp>`` classes `ptr_set_adapter <ptr_set_adapter.html>`_ and `ptr_multiset_adapter <ptr_multiset_adapter.html>`_
 
 ``<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/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/serialize_ptr_deque.hpp>`` class `ptr_deque <ptr_deque.html>`_ with serialization support
+
+``<boost/ptr_container/serialize_ptr_list.hpp>`` class `ptr_list <ptr_list.html>`_ with serialization support
+
+``<boost/ptr_container/serialize_ptr_vector.hpp>`` class `ptr_vector <ptr_vector.html>`_ with serialization support
+
+``<boost/ptr_container/serialize_ptr_array.hpp>`` class `ptr_array <ptr_array.html>`_ with serialization support
+
+``<boost/ptr_container/serialize_ptr_set.hpp>`` classes `ptr_set <ptr_set.html>`_ and `ptr_multiset <ptr_multiset.html>`_ with serialization support
+
+``<boost/ptr_container/serialize_ptr_map.hpp>`` classes `ptr_map <ptr_map.html>`_ and `ptr_multimap <ptr_multimap.html>`_ with serialization support
+
+``<boost/ptr_container/serialize_ptr_container.hpp>`` all classes with serialization support
+
 ======================================================= =============================================================
 
 .. _`heap_clone_allocator`: reference.html#the-clone-allocator-concept

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -327,7 +327,15 @@
     {
     public: // <a class="reference" href="#construct-copy-destroy">construct/copy/destroy</a>
         ptr_array();
- ptr_array( std::auto_ptr&lt;ptr_array&gt;&amp; r );
+ explicit ptr_array( const ptr_array&amp; r );
+ template&lt; class U &gt;
+ explicit ptr_array( const ptr_array&lt;U,N&gt;&amp; r );
+ explicit ptr_array( std::auto_ptr&lt;ptr_array&gt;&amp; r );
+
+ ptr_array&amp; operator=( const ptr_array&amp; r );
+ template&lt; class U &gt;
+ ptr_array&amp; operator=( const ptr_array&lt;U,N&gt;&amp; r );
+ ptr_array&amp; operator=( std::auto_ptr&lt;this_type&gt; r );
 
     public: // <a class="reference" href="reversible_ptr_container.html#iterators">iterators</a>
 
@@ -380,10 +388,18 @@
 <li><p class="first"><tt class="docutils literal"><span class="pre">ptr_array();</span></tt></p>
 <blockquote>
 <ul class="simple">
-<li>Effects: construct array where each element is null</li>
+<li>Effects: constructs array where each element is null</li>
 </ul>
 </blockquote>
 </li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">explicit</span> <span class="pre">ptr_array(</span> <span class="pre">const</span> <span class="pre">ptr_array&amp;</span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
+</li>
+<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">explicit</span> <span class="pre">ptr_array(</span> <span class="pre">const</span> <span class="pre">ptr_array&lt;U,N&gt;&amp;</span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
+<ul class="simple">
+<li>Effects: Constructs array by cloning <tt class="docutils literal"><span class="pre">r</span></tt></li>
+</ul>
+</li>
 <li><p class="first"><tt class="docutils literal"><span class="pre">ptr_array(</span> <span class="pre">std::auto_ptr&lt;ptr_array&gt;&amp;</span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
 <blockquote>
 <ul class="simple">
@@ -391,6 +407,24 @@
 </ul>
 </blockquote>
 </li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">ptr_array&amp;</span> <span class="pre">operator=(</span> <span class="pre">const</span> <span class="pre">ptr_array&amp;</span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
+</li>
+<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">ptr_array&amp;</span> <span class="pre">operator=(</span> <span class="pre">const</span> <span class="pre">ptr_array&lt;U,N&gt;&amp;</span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
+<blockquote>
+<ul class="simple">
+<li>Effects: Assigns a clone of <tt class="docutils literal"><span class="pre">r</span></tt></li>
+<li>Exception safety: Strong guarantee</li>
+</ul>
+</blockquote>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">ptr_array&amp;</span> <span class="pre">operator=(</span> <span class="pre">std::auto_ptr&lt;this_type&gt;</span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
+<blockquote>
+<ul class="simple">
+<li>Effects: take ownership of the supplied pointers</li>
+<li>Throws: Nothing</li>
+</ul>
+</blockquote>
+</li>
 </ul>
 </div>
 <div class="section">

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -46,7 +46,15 @@
             {
             public: // `construct/copy/destroy`_
                 ptr_array();
- ptr_array( std::auto_ptr<ptr_array>& r );
+ explicit ptr_array( const ptr_array& r );
+ template< class U >
+ explicit ptr_array( const ptr_array<U,N>& r );
+ explicit ptr_array( std::auto_ptr<ptr_array>& r );
+
+ ptr_array& operator=( const ptr_array& r );
+ template< class U >
+ ptr_array& operator=( const ptr_array<U,N>& r );
+ ptr_array& operator=( std::auto_ptr<this_type> r );
 
             public: // `iterators`_
 
@@ -73,11 +81,11 @@
  
                 template< size_t idx >
                 auto_type replace( T* r );
- template< size_t idx, class U >
- auto_type replace( std::auto_ptr<U> r );
+ template< size_t idx, class U >
+ auto_type replace( std::auto_ptr<U> r );
                 auto_type replace( size_t idx, T* r );
- template< class U >
- auto_type replace( size_t idx, std::auto_ptr<U> r );
+ template< class U >
+ auto_type replace( size_t idx, std::auto_ptr<U> r );
 
             public: // `pointer container requirements`_
                 std::auto_ptr<ptr_array> clone() const;
@@ -106,12 +114,32 @@
 
 - ``ptr_array();``
 
- - Effects: construct array where each element is null
+ - Effects: constructs array where each element is null
+
+- ``explicit ptr_array( const ptr_array& r );``
+- ``template< class U >
+ explicit ptr_array( const ptr_array<U,N>& r );``
     
+ - Effects: Constructs array by cloning ``r``
+
 - ``ptr_array( std::auto_ptr<ptr_array>& r );``
 
     - Effects: take ownership of the supplied pointers
+
+- ``ptr_array& operator=( const ptr_array& r );``
+
+- ``template< class U > ptr_array& operator=( const ptr_array<U,N>& r );``
+
+ - Effects: Assigns a clone of ``r``
     
+ - Exception safety: Strong guarantee
+
+- ``ptr_array& operator=( std::auto_ptr<this_type> r );``
+
+ - Effects: take ownership of the supplied pointers
+
+ - Throws: Nothing
+
 .. _`element access`:
 
 Semantics: element access

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-27 17:50:14 EDT (Sat, 27 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="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)." />
+<meta name="date" content="27th of October 2007" />
+<meta name="copyright" content="Thorsten Ottosen 2004-2007. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt)." />
 <style type="text/css">
 
 /*
@@ -303,9 +303,9 @@
 <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>29th of April 2006</td></tr>
+<td>27th of October 2007</td></tr>
 <tr><th class="docinfo-name">Copyright:</th>
-<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>
+<td>Thorsten Ottosen 2004-2007. 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">
@@ -324,6 +324,8 @@
 <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="#upgrading-from-boost-v-1-34">Upgrading from Boost v. 1.34.*</a></li>
+<li><a class="reference" href="#future-developments">Future Developments</a></li>
 <li><a class="reference" href="#acknowledgements">Acknowledgements</a></li>
 <li><a class="reference" href="#references">References</a></li>
 </ul>
@@ -395,11 +397,11 @@
 </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>
+<li>Propagates constness such that 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>
+<li>Built-in support for deep-copy semantics via the <a class="reference" href="reference.html#the-cloneable-concept">the Cloneable concept</a></li>
 </ol>
 <p>The disadvantages are</p>
 <ol class="arabic simple">
@@ -452,6 +454,49 @@
 for pointer containers.</p>
 </div>
 <div class="section">
+<h1><a id="upgrading-from-boost-v-1-34" name="upgrading-from-boost-v-1-34">Upgrading from Boost v. <tt class="docutils literal"><span class="pre">1.34.*</span></tt></a></h1>
+<p>Serialization have now been made optional thanks to Sebastian Ramacher.
+You simply include <tt class="docutils literal"><span class="pre">&lt;boost/ptr_container/serialize.hpp&gt;</span></tt> or perhaps
+just one of the more specialized headers.</p>
+<p>All containers are now copy-constructible and assignable. So you can e.g. now
+do:</p>
+<pre class="literal-block">
+boost::ptr_vector&lt;Derived&gt; derived = ...;
+boost::ptr_vector&lt;Base&gt; base( derived );
+base = derived;
+</pre>
+<p>As the example shows, derived-to-base class conversions are also allowed.</p>
+<p>A few general functions have been added:</p>
+<pre class="literal-block">
+VoidPtrContainer&amp; base();
+const VoidPtrContainer&amp; base() const;
+</pre>
+<p>These allow direct access to the wrapped container which is
+somtimes needed when you want to provide extra functionality.</p>
+<p>A few new functions have been added to sequences:</p>
+<pre class="literal-block">
+void resize( size_type size );
+void resize( size_type size, T* to_clone );
+</pre>
+<p><tt class="docutils literal"><span class="pre">ptr_vector&lt;T&gt;</span></tt> has a few new helper functions to integrate better with C-arrays:</p>
+<pre class="literal-block">
+void transfer( iterator before, T** from, size_type size, bool delete_from = true );
+T** c_array();
+</pre>
+<p>Finally you can now also &quot;copy&quot; and &quot;assign&quot; an <tt class="docutils literal"><span class="pre">auto_type</span></tt> ptr by calling <tt class="docutils literal"><span class="pre">move()</span></tt>:</p>
+<pre class="literal-block">
+boost::ptr_vector&lt;T&gt;::auto_type move_ptr = ...;
+return boost::ptr_container::move( move_ptr );
+</pre>
+</div>
+<div class="section">
+<h1><a id="future-developments" name="future-developments">Future Developments</a></h1>
+<p>There are indications that the <tt class="docutils literal"><span class="pre">void*</span></tt> implementation has a slight
+performance overhead compared to a <tt class="docutils literal"><span class="pre">T*</span></tt> based implementation. Furthermore, a
+<tt class="docutils literal"><span class="pre">T*</span></tt> based implementation is so much easier to use type-safely
+with algorithms. Therefore I anticipate to move to a <tt class="docutils literal"><span class="pre">T*</span></tt> based implementation.</p>
+</div>
+<div class="section">
 <h1><a id="acknowledgements" name="acknowledgements">Acknowledgements</a></h1>
 <p>The following people have been very helpful:</p>
 <ul class="simple">
@@ -469,6 +514,8 @@
 <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>
+<li>Charles Brockman for his many comments on the documentation</li>
+<li>Sebastian Ramacher for implementing the optinal serialization support</li>
 </ul>
 </div>
 <div class="section">

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -10,8 +10,8 @@
 :Authors: Thorsten Ottosen
 :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__).
+:date: 27th of October 2007
+:Copyright: Thorsten Ottosen 2004-2007. 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
 
@@ -36,30 +36,32 @@
 * `Library headers`_
 * FAQ_
 * `Upgrading from Boost v. 1.33.*`_
+* `Upgrading from Boost v. 1.34.*`_
+* `Future Developments`_
 * 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>`_
-
+ - `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
@@ -128,13 +130,13 @@
    
 ..
  
-7. Propagates constness s.t. one cannot modify the objects via a ``const_iterator``.
+7. Propagates constness such that one cannot modify the objects via a ``const_iterator``.
 
 ..
 
-8. Built-in support for deep-copy semantics via the `The Clobable Concept`__
+8. Built-in support for deep-copy semantics via the `the Cloneable concept`__
 
-.. __: reference.html#the-clonable-concept
+.. __: reference.html#the-cloneable-concept
 
 The disadvantages are
 
@@ -172,19 +174,68 @@
 
 - ``std::auto_ptr<T>`` overloads::
 
- std::auto_ptr<T> p( new T );
- container.push_back( p );
+ 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
+ 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.
 
+====================================
+ Upgrading from Boost v. ``1.34.*``
+====================================
+
+Serialization have now been made optional thanks to Sebastian Ramacher.
+You simply include ``<boost/ptr_container/serialize.hpp>`` or perhaps
+just one of the more specialized headers.
+
+All containers are now copy-constructible and assignable. So you can e.g. now
+do::
+
+ boost::ptr_vector<Derived> derived = ...;
+ boost::ptr_vector<Base> base( derived );
+ base = derived;
+
+As the example shows, derived-to-base class conversions are also allowed.
+
+A few general functions have been added::
+
+ VoidPtrContainer& base();
+ const VoidPtrContainer& base() const;
+
+These allow direct access to the wrapped container which is
+somtimes needed when you want to provide extra functionality.
+
+A few new functions have been added to sequences::
+
+ void resize( size_type size );
+ void resize( size_type size, T* to_clone );
+
+``ptr_vector<T>`` has a few new helper functions to integrate better with C-arrays::
+
+ void transfer( iterator before, T** from, size_type size, bool delete_from = true );
+ T** c_array();
+
+Finally you can now also "copy" and "assign" an ``auto_type`` ptr by calling ``move()``::
+
+ boost::ptr_vector<T>::auto_type move_ptr = ...;
+ return boost::ptr_container::move( move_ptr );
+
+=====================
+ Future Developments
+=====================
+
+There are indications that the ``void*`` implementation has a slight
+performance overhead compared to a ``T*`` based implementation. Furthermore, a
+``T*`` based implementation is so much easier to use type-safely
+with algorithms. Therefore I anticipate to move to a ``T*`` based implementation.
+
 ================
 Acknowledgements
 ================
@@ -205,6 +256,8 @@
 - 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
+- Charles Brockman for his many comments on the documentation
+- Sebastian Ramacher for implementing the optinal serialization support
 
 ==========
 References

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -347,7 +347,7 @@
 </pre>
 <p><strong>Remarks:</strong></p>
 <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>
+<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 is not allowed</li>
 </ul>
 <hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -66,7 +66,7 @@
 
 **Remarks:**
 
-- Using ``nullable<T>`` as ``Key`` is meaningless and not allowed
+- Using ``nullable<T>`` as ``Key`` is meaningless and is not allowed
 
 .. raw:: html
 

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -359,6 +359,8 @@
         iterator erase( iterator first, iterator last );
         template&lt; class Range &gt;
         iterator erase( const Range&amp; r );
+ void resize( size_type size );
+ void resize( size_type size, T* to_clone );
 
     public: // <a class="reference" href="#pointer-container-requirements">pointer container requirements</a>
         template&lt; class PtrSequence &gt;
@@ -615,6 +617,26 @@
 </ul>
 </blockquote>
 </li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">void</span> <span class="pre">resize(</span> <span class="pre">size_type</span> <span class="pre">size</span> <span class="pre">);</span></tt></p>
+<blockquote>
+<ul class="simple">
+<li>Effects: Resizes the container. If elements are erased, it happens from the back. If elements are inserted, it happens at the back.</li>
+<li>Requirements: <tt class="docutils literal"><span class="pre">T</span></tt> is default constructible</li>
+<li>Postcondition: <tt class="docutils literal"><span class="pre">size()</span> <span class="pre">==</span> <span class="pre">size;</span></tt></li>
+<li>Exception safety: Basic guarantee under expansion; nothrow guarantee otherwise</li>
+</ul>
+</blockquote>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">void</span> <span class="pre">resize(</span> <span class="pre">size_type</span> <span class="pre">size,</span> <span class="pre">T*</span> <span class="pre">to_clone</span> <span class="pre">);</span></tt></p>
+<blockquote>
+<ul class="simple">
+<li>Effects: Resizes the container. If elements are erased, it happens from the back. If elements are inserted, clones of <tt class="docutils literal"><span class="pre">*to_clone</span></tt> are inserted at the back.</li>
+<li>Postcondition: <tt class="docutils literal"><span class="pre">size()</span> <span class="pre">==</span> <span class="pre">size;</span></tt></li>
+<li>Exception safety: Basic guarantee under expansion; nothrow guarantee otherwise</li>
+<li>Remarks: <tt class="docutils literal"><span class="pre">to_clone</span> <span class="pre">==</span> <span class="pre">0</span></tt> is valid if the container supports nulls. The container does not take ownership of <tt class="docutils literal"><span class="pre">to_clone</span></tt>.</li>
+</ul>
+</blockquote>
+</li>
 </ul>
 </div>
 <div class="section">

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -64,12 +64,12 @@
 
             public: // `modifiers`_
                 void push_back( T* x );
- template< class U >
- void push_back( std::auto_ptr<U> x );
+ template< class U >
+ void push_back( std::auto_ptr<U> x );
                 auto_type pop_back();
                 iterator insert( iterator position, T* x );
- template< class U >
- iterator insert( iterator position, std::auto_ptr<U> x );
+ template< class U >
+ iterator insert( iterator position, std::auto_ptr<U> x );
                 template< class InputIterator >
                 void insert( iterator position, InputIterator first, InputIterator last );
                 template< class InputRange >
@@ -78,17 +78,19 @@
                 iterator erase( iterator first, iterator last );
                 template< class Range >
                 iterator erase( const Range& r );
+ void resize( size_type size );
+ void resize( size_type size, T* to_clone );
 
             public: // `pointer container requirements`_
- template< class PtrSequence >
+ template< class PtrSequence >
                 void transfer( iterator before, typename PtrSequence::iterator object,
- PtrSequence& from );
- template< class PtrSequence >
+ 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 >
+ template< class PtrSequence >
                 void transfer( iterator before, PtrSequence& from );
 
             public: // `algorithms`_
@@ -328,6 +330,26 @@
 
     - Effects: ``erase( boost::begin(r), boost::end(r) );``
 
+- ``void resize( size_type size );``
+
+ - Effects: Resizes the container. If elements are erased, it happens from the back. If elements are inserted, it happens at the back.
+
+ - Requirements: ``T`` is default constructible
+
+ - Postcondition: ``size() == size;``
+
+ - Exception safety: Basic guarantee under expansion; nothrow guarantee otherwise
+
+- ``void resize( size_type size, T* to_clone );``
+
+ - Effects: Resizes the container. If elements are erased, it happens from the back. If elements are inserted, clones of ``*to_clone`` are inserted at the back.
+
+ - Postcondition: ``size() == size;``
+
+ - Exception safety: Basic guarantee under expansion; nothrow guarantee otherwise
+
+ - Remarks: ``to_clone == 0`` is valid if the container supports nulls. The container does not take ownership of ``to_clone``.
+
 .. _`pointer container requirements`:
 
 Semantics: pointer container requirements

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -348,7 +348,7 @@
 </pre>
 <p><strong>Remarks:</strong></p>
 <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>
+<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 is not allowed</li>
 </ul>
 <hr><table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -68,7 +68,7 @@
 
 **Remarks:**
 
-- Using ``nullable<T>`` as ``Key`` is meaningless and not allowed
+- Using ``nullable<T>`` as ``Key`` is meaningless and is not allowed
 
 .. raw:: html
 

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -330,7 +330,7 @@
                               &gt;
     {
     public: // <a class="reference" href="#construction">construction</a>
- ptr_vector( size_type to_reserve );
+ explicit ptr_vector( size_type to_reserve );
     
     public: // <a class="reference" href="#capacity">capacity</a>
         size_type capacity() const;
@@ -347,6 +347,11 @@
        template&lt; class U &gt;
        auto_type replace( size_type idx, std::auto_ptr&lt;U&gt; x );
        bool is_null( size_type idx ) const;
+
+ public: // <a class="reference" href="#c-array-support">C-array support</a>
+ void transfer( iterator before, T** from, size_type size, bool delete_from = true );
+ T** c_array();
+
     };
    
 } // namespace 'boost'
@@ -357,7 +362,7 @@
 <div class="section">
 <h2><a id="semantics-construction" name="semantics-construction"><span id="construction"></span>Semantics: construction</a></h2>
 <ul>
-<li><p class="first"><tt class="docutils literal"><span class="pre">ptr_vector(</span> <span class="pre">size_type</span> <span class="pre">to_reserve</span> <span class="pre">);</span></tt></p>
+<li><p class="first"><tt class="docutils literal"><span class="pre">explicit</span> <span class="pre">ptr_vector(</span> <span class="pre">size_type</span> <span class="pre">to_reserve</span> <span class="pre">);</span></tt></p>
 <blockquote>
 <ul class="simple">
 <li>constructs an empty vector with a buffer
@@ -447,11 +452,35 @@
 </blockquote>
 </li>
 </ul>
+</div>
+<div class="section">
+<h2><a id="semantics-c-array-support" name="semantics-c-array-support"><span id="c-array-support"></span>Semantics: C-array support</a></h2>
+<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">T**</span> <span class="pre">from,</span> <span class="pre">size_type</span> <span class="pre">size,</span> <span class="pre">bool</span> <span class="pre">delete_from</span> <span class="pre">=</span> <span class="pre">true</span> <span class="pre">);</span></tt></p>
+<blockquote>
+<ul class="simple">
+<li>Requirements: <tt class="docutils literal"><span class="pre">from</span> <span class="pre">!=</span> <span class="pre">0</span></tt></li>
+<li>Effects: Takes ownership of the dynamic array <tt class="docutils literal"><span class="pre">from</span></tt></li>
+<li>Exception safety: Strong guarantee if <tt class="docutils literal"><span class="pre">delete_from</span> <span class="pre">==</span> <span class="pre">true</span></tt>; if <tt class="docutils literal"><span class="pre">delete_from</span> <span class="pre">==</span> <span class="pre">false</span></tt>,
+and an exception is thrown, the container fails to take ownership.</li>
+<li>Remarks: Eventually calls <tt class="docutils literal"><span class="pre">delete[]</span> <span class="pre">from</span></tt> if <tt class="docutils literal"><span class="pre">delete_from</span> <span class="pre">==</span> <span class="pre">true</span></tt>.</li>
+</ul>
+</blockquote>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">T**</span> <span class="pre">c_array();</span></tt></p>
+<blockquote>
+<ul class="simple">
+<li>Returns: <tt class="docutils literal"><span class="pre">0</span></tt> if the container is empty; otherwise a pointer to the first element of the stored array</li>
+<li>Throws: Nothing</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-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 class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2007. 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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -47,7 +47,7 @@
>
             {
             public: // `construction`_
- ptr_vector( size_type to_reserve );
+ explicit ptr_vector( size_type to_reserve );
             
             public: // capacity_
                 size_type capacity() const;
@@ -61,9 +61,14 @@
 
             public: // `pointer container requirements`_
                auto_type replace( size_type idx, T* x );
- template< class U >
- auto_type replace( size_type idx, std::auto_ptr<U> x );
+ template< class U >
+ auto_type replace( size_type idx, std::auto_ptr<U> x );
                bool is_null( size_type idx ) const;
+
+ public: // `C-array support`_
+ void transfer( iterator before, T** from, size_type size, bool delete_from = true );
+ T** c_array();
+
             };
            
         } // namespace 'boost'
@@ -77,7 +82,7 @@
 Semantics: construction
 ^^^^^^^^^^^^^^^^^^^^^^^
 
-- ``ptr_vector( size_type to_reserve );``
+- ``explicit ptr_vector( size_type to_reserve );``
 
     - constructs an empty vector with a buffer
       of size least ``to_reserve``
@@ -155,11 +160,34 @@
 
     - Exception safety: Nothrow guarantee
 
+
+.. _`C-array support`:
+
+Semantics: C-array support
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- ``void transfer( iterator before, T** from, size_type size, bool delete_from = true );``
+
+ - Requirements: ``from != 0``
+
+ - Effects: Takes ownership of the dynamic array ``from``
+
+ - Exception safety: Strong guarantee if ``delete_from == true``; if ``delete_from == false``,
+ and an exception is thrown, the container fails to take ownership.
+
+ - Remarks: Eventually calls ``delete[] from`` if ``delete_from == true``.
+
+- ``T** c_array();``
+
+ - Returns: ``0`` if the container is empty; otherwise a pointer to the first element of the stored array
+
+ - 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__).
+:Copyright: Thorsten Ottosen 2004-2007. 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/reference.html
==============================================================================
--- trunk/libs/ptr_container/doc/reference.html (original)
+++ trunk/libs/ptr_container/doc/reference.html 2007-10-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -290,15 +290,15 @@
 <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="reference">Reference</h2>
-<p>The documentation is divided into a an explanation for
+<p>The documentation is divided into an explanation for
 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-Cloneable-concept">Cloneable</a> concept and
 the <a class="reference" href="reference.html#the-clone-allocator-concept">Clone Allocator</a> concept.</p>
 <ul class="simple">
 <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-cloneable-concept">The Cloneable concept</a></li>
 <li><a class="reference" href="#the-clone-allocator-concept">The Clone Allocator concept</a></li>
 <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>
@@ -354,16 +354,16 @@
   - `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>
+<h1><a id="the-cloneable-concept" name="the-cloneable-concept">The Cloneable concept</a></h1>
 <p><strong>Refinement of</strong></p>
 <ul class="simple">
 <li>Heap Allocable</li>
 <li>Heap Deallocable</li>
 </ul>
-<p>The Clonable concept is introduced to formalize the requirements for
-copying heap-allocated objects. A type <tt class="docutils literal"><span class="pre">T</span></tt> might be Clonable even though it
+<p>The Cloneable concept is introduced to formalize the requirements for
+copying heap-allocated objects. A type <tt class="docutils literal"><span class="pre">T</span></tt> might be Cloneable even though it
 is not Assignable or Copy Constructible. Notice that many operations on
-the containers does not even require the stored type to be Clonable.</p>
+the containers do not even require the stored type to be Cloneable.</p>
 <p><strong>Notation</strong></p>
 <table border="1" class="docutils">
 <colgroup>
@@ -381,7 +381,7 @@
 <tr><td><tt class="docutils literal"><span class="pre">T</span></tt></td>
 <td><tt class="docutils literal"><span class="pre">a</span></tt></td>
 <td><tt class="docutils literal"><span class="pre">ptr</span></tt></td>
-<td>A Clonable type</td>
+<td>A Cloneable type</td>
 </tr>
 </tbody>
 </table>
@@ -427,26 +427,26 @@
     template&lt; class T &gt;
     void delete_clone( const T* t )
     {
- checked_delete( r );
+ checked_delete( t );
     }
 }
 </pre>
-<p>Notice that this implementation makes normal Copy Constructible classes are automatically
-Clonable unless <tt class="docutils literal"><span class="pre">operator</span> <span class="pre">new()</span></tt> or <tt class="docutils literal"><span class="pre">operator</span> <span class="pre">delete()</span></tt> are hidden.</p>
+<p>Notice that this implementation makes normal Copy Constructible classes automatically
+Cloneable unless <tt class="docutils literal"><span class="pre">operator</span> <span class="pre">new()</span></tt> or <tt class="docutils literal"><span class="pre">operator</span> <span class="pre">delete()</span></tt> are hidden.</p>
 <p>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
 relies on argument-dependent lookup (ADL) to find the right version of
 <tt class="docutils literal"><span class="pre">new_clone()</span></tt> and <tt class="docutils literal"><span class="pre">delete_clone()</span></tt>. This means that one does not need to overload or specialize
-the function is the boost namespace, but it can be placed together with
+the function in 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>
+<p><strong>Warning: We are considering the removal of 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">
 <h1><a id="the-clone-allocator-concept" name="the-clone-allocator-concept">The Clone Allocator concept</a></h1>
 <p>The Clone Allocator concept is introduced to formalize the way
-pointer containers controls memory of
+pointer containers control memory of
 the stored objects (and not the pointers to the stored objects).
 The clone allocator allows
 users to apply custom allocators/deallocators for the cloned objects.</p>
@@ -530,7 +530,7 @@
         }
 
         template&lt; class U &gt;
- static void deallocate_clone( const U* r ) const
+ static void deallocate_clone( const U* r )
         {
             delete_clone( r );
         }
@@ -647,7 +647,7 @@
 <div class="section">
 <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>
+serialization via <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>
@@ -701,7 +701,7 @@
 for details.</p>
 </li>
 </ol>
-<p>Remember these three issues and it will save you a lot of trouble.</p>
+<p>Remember these three issues and it might save you some trouble.</p>
 <!-- Map iterator operations
 +++++++++++++++++++++++
 
@@ -786,7 +786,7 @@
 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>
+<p>To disable 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;
@@ -804,7 +804,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-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 class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2007. 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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -8,15 +8,15 @@
 Reference
 =========
 
-The documentation is divided into a an explanation for
+The documentation is divided into an explanation for
 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 `Cloneable <reference.html#the-Cloneable-concept>`_ concept and
 the `Clone Allocator <reference.html#the-clone-allocator-concept>`_ concept.
 
 - `Conventions <conventions.html>`_
-- `The Clonable concept`_
+- `The Cloneable concept`_
 - `The Clone Allocator concept`_
 
 - `Class hierarchy`_:
@@ -50,48 +50,48 @@
 
 
 ..
- - 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>`_
+ - 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
-++++++++++++++++++++
+The Cloneable concept
++++++++++++++++++++++
 
 **Refinement of**
 
 - Heap Allocable
 - Heap Deallocable
 
-The Clonable concept is introduced to formalize the requirements for
-copying heap-allocated objects. A type ``T`` might be Clonable even though it
+The Cloneable concept is introduced to formalize the requirements for
+copying heap-allocated objects. A type ``T`` might be Cloneable even though it
 is not Assignable or Copy Constructible. Notice that many operations on
-the containers does not even require the stored type to be Clonable.
+the containers do not even require the stored type to be Cloneable.
 
 **Notation**
 
 ======================= ============================================ =================== =====================
    **Type** **Object** (``const`` or non-``const``) **Pointer** **Describes**
- ``T`` ``a`` ``ptr`` A Clonable type
+ ``T`` ``a`` ``ptr`` A Cloneable type
 ======================= ============================================ =================== =====================
        
 **Valid expressions**
@@ -122,29 +122,29 @@
         template< class T >
         void delete_clone( const T* t )
         {
- checked_delete( r );
+ checked_delete( t );
         }
     }
 
 
-Notice that this implementation makes normal Copy Constructible classes are automatically
-Clonable unless ``operator new()`` or ``operator delete()`` are hidden.
+Notice that this implementation makes normal Copy Constructible classes automatically
+Cloneable 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
 relies on argument-dependent lookup (ADL) to find the right version of
 ``new_clone()`` and ``delete_clone()``. This means that one does not need to overload or specialize
-the function is the boost namespace, but it can be placed together with
+the function in 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.**
+**Warning: We are considering the removal of 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
 +++++++++++++++++++++++++++
 
 The Clone Allocator concept is introduced to formalize the way
-pointer containers controls memory of
+pointer containers control memory of
 the stored objects (and not the pointers to the stored objects).
 The clone allocator allows
 users to apply custom allocators/deallocators for the cloned objects.
@@ -174,7 +174,7 @@
                                                                      ``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.
+ Must not throw.
 ============================================== ============= ============================================================================= =============================================================
 
 
@@ -202,7 +202,7 @@
             }
     
             template< class U >
- static void deallocate_clone( const U* r ) const
+ static void deallocate_clone( const U* r )
             {
                 delete_clone( r );
             }
@@ -319,7 +319,7 @@
 +++++++++++++
 
 As of version 1.34.0 of Boost, the library support
-serialization as defined by `Boost.Serialization`__.
+serialization via `Boost.Serialization`__.
 
 .. __: ../../serialization/index.html
 
@@ -332,20 +332,20 @@
 
 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);
+ //
+ // 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.
@@ -354,58 +354,58 @@
 
 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 );
- ...
- }
- };
-
+ 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 )
+ 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.
+
+Remember these three issues and it might save you some 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.
+ 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``
 ++++++++++++++++++
@@ -460,7 +460,7 @@
                 bad_pointer( const char* what );
             };
         }
-
+
 Disabling the use of exceptions
 +++++++++++++++++++++++++++++++
 
@@ -471,11 +471,11 @@
 
 .. __: ../../utility/assert.html
 
-To diable exceptions, simly define this macro before including any header::
+To disable exceptions, simly define this macro before including any header::
 
- #define BOOST_PTR_CONTAINER_NO_EXCEPTIONS 1
- #include <boost/ptr_container/ptr_vector.hpp>
-
+ #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.
@@ -495,7 +495,7 @@
 
         <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-2007. 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/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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -351,12 +351,20 @@
     
     public: // <a class="reference" href="#construct-copy-destroy">construct/copy/destroy</a>
         reversible_ptr_container();
- reversible_ptr_container( auto_ptr&lt;reversible_ptr_container&gt; r );
+ explicit reversible_ptr_container( const reversible_ptr_container&amp; r );
+ template&lt; class Derived &gt;
+ explicit reversible_ptr_container( const reversible_ptr_container&lt;Derived&gt;&amp; r );
+ explicit reversible_ptr_container( std::auto_ptr&lt;reversible_ptr_container&gt; r );
         template&lt; class InputIterator &gt;
         reversible_ptr_container( InputIterator first, InputIterator last );
+
         ~reversible_ptr_container();
- void operator=( std::auto_ptr&lt;reversible_ptr_container&gt; r )
- allocator_type get_allocator() const;
+
+ reversible_ptr_container&amp; operator=( const reversible_ptr_container&amp; r );
+ template&lt;class Derived&gt;
+ reversible_ptr_container&amp; operator=( const reversible_ptr_container&lt;Derived&gt;&amp; r );
+ reversible_ptr_container&amp; operator=( std::auto_ptr&lt;reversible_ptr_container&gt; r );
+ allocator_type get_allocator() const;
     
     public: // <a class="reference" href="#iterators">iterators</a>
         iterator begin();
@@ -374,8 +382,10 @@
         bool empty() const;
     
     public: // <a class="reference" href="#modifiers">modifiers</a>
- void swap( reversible_ptr_container&amp; r );
- void clear():
+ void swap( reversible_ptr_container&amp; r );
+ void clear():
+ VoidPtrContainer&amp; base();
+ const VoidPtrContainer&amp; base() const;
     
     public: // <a class="reference" href="#pointer-container-requirements">pointer container requirements</a>
         auto_type replace( iterator position, T* x );
@@ -384,13 +394,7 @@
         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'
 
     // <a class="reference" href="#comparison">comparison</a>
@@ -422,7 +426,7 @@
     void swap( reversible_ptr_container&lt;T,CA,VPC&gt;&amp; x,
                reversible_ptr_container&lt;T,CA,VPC&gt;&amp; y );
 
- // <a class="reference" href="#clonability">clonability</a>
+ // <a class="reference" href="#cloneability">cloneability</a>
     template&lt; class T, class CA, class VPC &gt;
     reversible_ptr_container&lt;T,CA,VPC&gt;*
     new_clone( const reversible_ptr_container&lt;T,CA,VPC&gt;&amp; r );
@@ -430,6 +434,11 @@
     // <a class="reference" href="#null-predicate">null predicate</a>
     template&lt; class Iterator &gt;
     bool is_null( Iterator i );
+
+ // <a class="reference" href="#serialization">serialization</a>
+ template&lt;class Archive, class T, class CA, class VPC&gt;
+ void serialize( Archive&amp; ar, reversible_ptr_container&lt;T,CÁ,VPC&gt;&amp; c, const unsigned int version );
+
 
 } // namespace 'boost'
 </pre>
@@ -485,8 +494,16 @@
 ~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>
+<p>The destructor will delete the stored object <em>using the clone allocator of the container</em>
+(this explains why we cannot use <tt class="docutils literal"><span class="pre">std::auto_ptr&lt;T&gt;</span></tt>). It might help to
+think it is just an <tt class="docutils literal"><span class="pre">std::auto_ptr&lt;T&gt;</span></tt>. You can also return
+the pointer from a function or assign it to another pointer via the <tt class="docutils literal"><span class="pre">move()</span></tt>
+function</p>
+<pre class="literal-block">
+auto_type ptr = ...;
+auto_type other = boost::ptr_container::move( ptr );
+return boost::ptr_container::move( other );
+</pre>
 </div>
 <div class="section">
 <h2><a id="semantics-construct-copy-destroy" name="semantics-construct-copy-destroy"><span id="construct-copy-destroy"></span>Semantics: construct/copy/destroy</a></h2>
@@ -506,6 +523,21 @@
 
 - Postconditions: ``size() == n`` -->
 <ul>
+<li><p class="first"><tt class="docutils literal"><span class="pre">explicit</span> <span class="pre">reversible_ptr_container(</span> <span class="pre">const</span> <span class="pre">reversible_ptr_container&amp;</span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
+<blockquote>
+<ul class="simple">
+<li>Effects: Constructs a container by cloning all elements of <tt class="docutils literal"><span class="pre">r</span></tt></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">Derived</span> <span class="pre">&gt;</span> <span class="pre">explicit</span> <span class="pre">reversible_ptr_container(</span> <span class="pre">const</span> <span class="pre">reversible_ptr_container&lt;Derived&gt;&amp;</span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
+<blockquote>
+<ul class="simple">
+<li>Effects: Constructs a container by cloning all elements of <tt class="docutils literal"><span class="pre">r</span></tt></li>
+<li>Requirements: <tt class="docutils literal"><span class="pre">Derived</span></tt> is derived from <tt class="docutils literal"><span class="pre">T</span></tt></li>
+</ul>
+</blockquote>
+</li>
 <li><p class="first"><tt class="docutils literal"><span class="pre">explicit</span> <span class="pre">reversible_ptr_container(</span> <span class="pre">std::auto_ptr&lt;</span> <span class="pre">reversible_ptr_container</span> <span class="pre">&gt;</span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
 <blockquote>
 <ul class="simple">
@@ -526,12 +558,29 @@
 <li><p class="first"><tt class="docutils literal"><span class="pre">~reversible_ptr_container();</span></tt></p>
 <blockquote>
 <ul class="simple">
-<li>Effects: Deletes the stored objects</li>
+<li>Effects: Deletes the stored objects via the clone allocator</li>
 <li>Throws: Nothing</li>
 </ul>
 </blockquote>
 </li>
-<li><p class="first"><tt class="docutils literal"><span class="pre">void</span> <span class="pre">operator=(</span> <span class="pre">std::auto_ptr&lt;reversible_ptr_container&gt;</span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
+<li><p class="first"><tt class="docutils literal"><span class="pre">reversible_ptr_container&amp;</span> <span class="pre">operator=(</span> <span class="pre">const</span> <span class="pre">reversible_ptr_container&amp;</span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
+<blockquote>
+<ul class="simple">
+<li>Effects: Assigns a clone of <tt class="docutils literal"><span class="pre">r</span></tt></li>
+<li>Exception safety: strong guarantee</li>
+</ul>
+</blockquote>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">template&lt;class</span> <span class="pre">Derived&gt;</span> <span class="pre">reversible_ptr_container&amp;</span> <span class="pre">operator=(</span> <span class="pre">const</span> <span class="pre">reversible_ptr_container&lt;Derived&gt;&amp;</span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
+<blockquote>
+<ul class="simple">
+<li>Effects: Assigns a clone of <tt class="docutils literal"><span class="pre">r</span></tt></li>
+<li>Requirements: <tt class="docutils literal"><span class="pre">Derived</span></tt> is derived from <tt class="docutils literal"><span class="pre">T</span></tt></li>
+<li>Exception safety: Strong guarantee</li>
+</ul>
+</blockquote>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">reversible_ptr_container&amp;</span> <span class="pre">operator=(</span> <span class="pre">std::auto_ptr&lt;reversible_ptr_container&gt;</span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
 <blockquote>
 <ul class="simple">
 <li>Effects: Deletes the stored objects and then takes ownership of the supplied pointers</li>
@@ -643,6 +692,15 @@
 </ul>
 </blockquote>
 </li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">VoidPtrContainer&amp;</span> <span class="pre">base();</span></tt></p>
+</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">const</span> <span class="pre">VoidPtrContainer&amp;</span> <span class="pre">base()</span> <span class="pre">const;</span></tt></p>
+<blockquote>
+<ul class="simple">
+<li>Returns: a reference to the wrapped container</li>
+</ul>
+</blockquote>
+</li>
 </ul>
 </div>
 <div class="section">
@@ -708,7 +766,7 @@
 objects are compared and not the pointers to objects.</p>
 </div>
 <div class="section">
-<h2><a id="semantics-clonability" name="semantics-clonability"><span id="clonability"></span>Semantics: clonability</a></h2>
+<h2><a id="semantics-cloneability" name="semantics-cloneability"><span id="cloneability"></span>Semantics: cloneability</a></h2>
 <ul>
 <li><p class="first"><tt class="docutils literal"><span class="pre">template&lt;</span> <span class="pre">class</span> <span class="pre">T,</span> <span class="pre">class</span> <span class="pre">CloneAllocator</span> <span class="pre">&gt;</span>
 <span class="pre">reversible_ptr_container&lt;T,CA,VPC&gt;*</span>
@@ -741,33 +799,23 @@
 <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>
+<pre class="literal-block">
+template&lt;class Archive, class T, class CA, class VPC&gt;
+void serialize( Archive&amp; ar, reversible_ptr_container&lt;T,CA,VPC&gt;&amp; c, const unsigned int version );
+</pre>
 </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>Effects: Saves or loads the container to/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>
+<li>Exception safety: Loading gives the basic guarantee</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-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 class="field"><th class="field-name">Copyright:</th><td class="field-body">Thorsten Ottosen 2004-2007. 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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -67,12 +67,20 @@
             
             public: // `construct/copy/destroy`_
                 reversible_ptr_container();
- reversible_ptr_container( auto_ptr<reversible_ptr_container> r );
+ explicit reversible_ptr_container( const reversible_ptr_container& r );
+ template< class Derived >
+ explicit reversible_ptr_container( const reversible_ptr_container<Derived>& r );
+ explicit reversible_ptr_container( std::auto_ptr<reversible_ptr_container> r );
                 template< class InputIterator >
                 reversible_ptr_container( InputIterator first, InputIterator last );
+
                 ~reversible_ptr_container();
- void operator=( std::auto_ptr<reversible_ptr_container> r )
- allocator_type get_allocator() const;
+
+ reversible_ptr_container& operator=( const reversible_ptr_container& r );
+ template<class Derived>
+ reversible_ptr_container& operator=( const reversible_ptr_container<Derived>& r );
+ reversible_ptr_container& operator=( std::auto_ptr<reversible_ptr_container> r );
+ allocator_type get_allocator() const;
             
             public: // `iterators`_
                 iterator begin();
@@ -87,26 +95,22 @@
             public: // `capacity`_
                 size_type size() const;
                 size_type max_size() const;
- bool empty() const;
+ bool empty() const;
             
             public: // `modifiers`_
- void swap( reversible_ptr_container& r );
- void clear():
+ void swap( reversible_ptr_container& r );
+ void clear():
+ VoidPtrContainer& base();
+ const VoidPtrContainer& base() const;
             
             public: // `pointer container requirements`_
                 auto_type replace( iterator position, T* x );
- template< class U >
- auto_type replace( iterator position, std::auto_ptr<U> 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'
 
             // `comparison`_
@@ -138,7 +142,7 @@
             void swap( reversible_ptr_container<T,CA,VPC>& x,
                        reversible_ptr_container<T,CA,VPC>& y );
 
- // clonability_
+ // cloneability_
             template< class T, class CA, class VPC >
             reversible_ptr_container<T,CA,VPC>*
             new_clone( const reversible_ptr_container<T,CA,VPC>& r );
@@ -146,6 +150,11 @@
             // `null predicate`_
             template< class Iterator >
             bool is_null( Iterator i );
+
+ // `serialization`_
+ template<class Archive, class T, class CA, class VPC>
+ void serialize( Archive& ar, reversible_ptr_container<T,CÁ,VPC>& c, const unsigned int version );
+
 
         } // namespace 'boost'
 
@@ -205,8 +214,17 @@
     ~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>``.
+The destructor will delete the stored object *using the clone allocator of the container*
+(this explains why we cannot use ``std::auto_ptr<T>``). It might help to
+think it is just an ``std::auto_ptr<T>``. You can also return
+the pointer from a function or assign it to another pointer via the ``move()``
+function
+
+.. parsed-literal::
+
+ auto_type ptr = ...;
+ auto_type other = boost::ptr_container::move( ptr );
+ return boost::ptr_container::move( other );
 
 .. _construct/copy/destroy:
 
@@ -225,6 +243,16 @@
         - Effects: Constructs a container with ``n`` clones of ``x``
 
         - Postconditions: ``size() == n``
+
+- ``explicit reversible_ptr_container( const reversible_ptr_container& r );``
+
+ - Effects: Constructs a container by cloning all elements of ``r``
+
+- ``template< class Derived > explicit reversible_ptr_container( const reversible_ptr_container<Derived>& r );``
+
+ - Effects: Constructs a container by cloning all elements of ``r``
+
+ - Requirements: ``Derived`` is derived from ``T``
 
 - ``explicit reversible_ptr_container( std::auto_ptr< reversible_ptr_container > r );``
 
@@ -242,11 +270,25 @@
 
 - ``~reversible_ptr_container();``
 
- - Effects: Deletes the stored objects
+ - Effects: Deletes the stored objects via the clone allocator
 
     - Throws: Nothing
 
-- ``void operator=( std::auto_ptr<reversible_ptr_container> r );``
+- ``reversible_ptr_container& operator=( const reversible_ptr_container& r );``
+
+ - Effects: Assigns a clone of ``r``
+
+ - Exception safety: strong guarantee
+
+- ``template<class Derived> reversible_ptr_container& operator=( const reversible_ptr_container<Derived>& r );``
+
+ - Effects: Assigns a clone of ``r``
+
+ - Requirements: ``Derived`` is derived from ``T``
+
+ - Exception safety: Strong guarantee
+
+- ``reversible_ptr_container& operator=( std::auto_ptr<reversible_ptr_container> r );``
 
     - Effects: Deletes the stored objects and then takes ownership of the supplied pointers
 
@@ -337,6 +379,11 @@
 
     - Throws: Nothing
 
+- ``VoidPtrContainer& base();``
+
+- ``const VoidPtrContainer& base() const;``
+
+ - Returns: a reference to the wrapped container
 
 .. _`pointer container requirements`:
 
@@ -401,10 +448,10 @@
 has the effect one would expect of normal standard containers. Hence
 objects are compared and not the pointers to objects.
 
-.. _`clonability`:
+.. _`cloneability`:
 
-Semantics: clonability
-^^^^^^^^^^^^^^^^^^^^^^
+Semantics: cloneability
+^^^^^^^^^^^^^^^^^^^^^^^
 
 - ``template< class T, class CloneAllocator >
    reversible_ptr_container<T,CA,VPC>*
@@ -442,29 +489,25 @@
 .. __: ../../serialization/index.html
 .. _`Serialization of Pointer Containers`: reference.html#serialization
 
-- ``template< class Archive > void save( Archive& ar, const unsigned version ) const;``
+ ::
+
+ template<class Archive, class T, class CA, class VPC>
+ void serialize( Archive& ar, reversible_ptr_container<T,CA,VPC>& c, const unsigned int version );
+
+
+- Effects: Saves or loads the container to/from the archive.
+
+- Remarks: This function is called automatically be stream operators in
+ Boost.Serialization
     
- - 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
+- Exception safety: Loading gives the 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-2007. 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/tutorial.html
==============================================================================
--- trunk/libs/ptr_container/doc/tutorial.html (original)
+++ trunk/libs/ptr_container/doc/tutorial.html 2007-10-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -301,7 +301,7 @@
 <li><a class="reference" href="#sequence-containers">Sequence containers</a></li>
 <li><a class="reference" href="#associative-containers">Associative containers</a></li>
 <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="#cloneability">Cloneability</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>
@@ -346,7 +346,7 @@
     }
 };
 </pre>
-<p>Notice how just pass the class name to the container; there
+<p>Notice how we just pass the class name to the container; there
 is no <tt class="docutils literal"><span class="pre">*</span></tt> to indicate it is a pointer.
 With this declaration we can now say:</p>
 <pre class="literal-block">
@@ -359,7 +359,7 @@
 </div>
 <div class="section">
 <h1><a id="indirected-interface" name="indirected-interface">Indirected interface</a></h1>
-<p>As particular feature of the pointer containers is that
+<p>A particular feature of the pointer containers is that
 the query interface is indirected. For example,</p>
 <pre class="literal-block">
 boost::ptr_vector&lt;animal&gt; vec;
@@ -384,7 +384,7 @@
 </div>
 <div class="section">
 <h1><a id="sequence-containers" name="sequence-containers">Sequence containers</a></h1>
-<p>The sequence containers used when you do not need to
+<p>The sequence containers are used when you do not need to
 keep an ordering on your elements. You can basically
 expect all operations of the normal standard containers
 to be available. So, for example, with a <tt class="docutils literal"><span class="pre">ptr_deque</span></tt>
@@ -394,9 +394,9 @@
 deq.push_front( new animal );
 deq.pop_front();
 </pre>
-<p>because <tt class="docutils literal"><span class="pre">std::deque</span></tt> and <tt class="docutils literal"><span class="pre">std::list</span></tt> has <tt class="docutils literal"><span class="pre">push_front()</span></tt>
-and <tt class="docutils literal"><span class="pre">pop_front</span></tt> members.</p>
-<p>If the standard sequence support
+<p>because <tt class="docutils literal"><span class="pre">std::deque</span></tt> and <tt class="docutils literal"><span class="pre">std::list</span></tt> have <tt class="docutils literal"><span class="pre">push_front()</span></tt>
+and <tt class="docutils literal"><span class="pre">pop_front()</span></tt> members.</p>
+<p>If the standard sequence supports
 random access, so does the pointer container; for example:</p>
 <pre class="literal-block">
 for( boost::ptr_deque&lt;animal&gt;::size_type i = 0u;
@@ -508,9 +508,9 @@
 null into <tt class="docutils literal"><span class="pre">ptr_set</span></tt> and <tt class="docutils literal"><span class="pre">ptr_multiset</span></tt>.</p>
 </div>
 <div class="section">
-<h1><a id="clonability" name="clonability">Clonability</a></h1>
+<h1><a id="cloneability" name="cloneability">Cloneability</a></h1>
 <p>In OO programming it is typical to prohibit copying of objects; the
-objects may sometimes be allowed to be clonable; for example,:</p>
+objects may sometimes be allowed to be Cloneable; for example,:</p>
 <pre class="literal-block">
 animal* animal::clone() const
 {
@@ -529,7 +529,7 @@
 }
 </pre>
 <p>That is all, now a lot of functions in a pointer container
-can exploit the clonability of the animal objects. For example</p>
+can exploit the cloneability of the animal objects. For example</p>
 <pre class="literal-block">
 typedef boost::ptr_list&lt;animal&gt; zoo_type;
 zoo_type zoo, another_zoo;
@@ -545,6 +545,20 @@
 <pre class="literal-block">
 zoo_type yet_another_zoo = zoo.clone();
 </pre>
+<p>Copying or assigning the container has the same effect as cloning (though it is slightly cheaper):</p>
+<pre class="literal-block">
+zoo_type yet_another_zoo = zoo;
+</pre>
+<p>Copying also support derived-to-base class conversions:</p>
+<pre class="literal-block">
+boost::ptr_vector&lt;monkey&gt; monkeys = boost::assign::ptr_list_of&lt;monkey&gt;( &quot;bobo&quot; )( &quot;bebe&quot;)( &quot;uhuh&quot; );
+boost::ptr_vector&lt;animal&gt; animals = monkeys;
+</pre>
+<p>This also works for maps:</p>
+<pre class="literal-block">
+boost::ptr_map&lt;std::string,monkey&gt; monkeys = ...;
+boost::ptr_map&lt;std::string,animal&gt; animals = monkeys;
+</pre>
 </div>
 <div class="section">
 <h1><a id="new-functions" name="new-functions">New functions</a></h1>
@@ -596,7 +610,7 @@
 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 slightly different to iterator over than standard maps.
+<p>A map is slightly different to iterate 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;
@@ -630,9 +644,9 @@
 </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
+<p>Every time 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>
+to make the library intregrate seamlessly 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 );
@@ -669,7 +683,7 @@
 <pre class="literal-block">
 zoo.erase_if( my_predicate() );
 </pre>
-<p>Finally you may want to merge together two sorted containers:</p>
+<p>Finally you may want to merge two sorted containers:</p>
 <pre class="literal-block">
 boost::ptr_vector&lt;animal&gt; another_zoo = ...;
 another_zoo.sort(); // sorted wrt. to same order as 'zoo'

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-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -19,7 +19,7 @@
 * `Sequence containers`_
 * `Associative containers`_
 * `Null values`_
-* `Clonability`_
+* `Cloneability`_
 * `New functions`_
 * `std::auto_ptr<U> overloads`_
 * `Algorithms`_
@@ -40,7 +40,7 @@
     public:
         virtual ~animal() {}
         virtual void eat() = 0;
- virtual int age() const = 0;
+ virtual int age() const = 0;
         // ...
     };
     
@@ -69,7 +69,7 @@
         }
     };
 
-Notice how just pass the class name to the container; there
+Notice how we just pass the class name to the container; there
 is no ``*`` to indicate it is a pointer.
 With this declaration we can now say::
     
@@ -83,7 +83,7 @@
 Indirected interface
 --------------------
 
-As particular feature of the pointer containers is that
+A particular feature of the pointer containers is that
 the query interface is indirected. For example, ::
 
     boost::ptr_vector<animal> vec;
@@ -109,7 +109,7 @@
 Sequence containers
 -------------------
 
-The sequence containers used when you do not need to
+The sequence containers are used when you do not need to
 keep an ordering on your elements. You can basically
 expect all operations of the normal standard containers
 to be available. So, for example, with a ``ptr_deque``
@@ -119,10 +119,10 @@
     deq.push_front( new animal );
     deq.pop_front();
 
-because ``std::deque`` and ``std::list`` has ``push_front()``
-and ``pop_front`` members.
+because ``std::deque`` and ``std::list`` have ``push_front()``
+and ``pop_front()`` members.
 
-If the standard sequence support
+If the standard sequence supports
 random access, so does the pointer container; for example::
 
     for( boost::ptr_deque<animal>::size_type i = 0u;
@@ -193,7 +193,7 @@
 - `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;
@@ -201,7 +201,7 @@
      ptr_map_insert<elephant>( animals )( "bobo", "bobo" );
      ptr_map_insert<whale>( animals )( "anna", "anna" );
      ptr_map_insert<emu>( animals )( "anna", "anna" );
-
+
     
 Null values
 -----------
@@ -238,11 +238,11 @@
 Note that it is meaningless to insert
 null into ``ptr_set`` and ``ptr_multiset``.
 
-Clonability
------------
+Cloneability
+------------
 
 In OO programming it is typical to prohibit copying of objects; the
-objects may sometimes be allowed to be clonable; for example,::
+objects may sometimes be allowed to be Cloneable; for example,::
 
     animal* animal::clone() const
     {
@@ -261,7 +261,7 @@
     }
 
 That is all, now a lot of functions in a pointer container
-can exploit the clonability of the animal objects. For example ::
+can exploit the cloneability of the animal objects. For example ::
 
     typedef boost::ptr_list<animal> zoo_type;
     zoo_type zoo, another_zoo;
@@ -276,8 +276,21 @@
 The whole container can now also be cloned ::
 
     zoo_type yet_another_zoo = zoo.clone();
+
+Copying or assigning the container has the same effect as cloning (though it is slightly cheaper)::
+
+ zoo_type yet_another_zoo = zoo;
     
+Copying also support derived-to-base class conversions::
 
+ boost::ptr_vector<monkey> monkeys = boost::assign::ptr_list_of<monkey>( "bobo" )( "bebe")( "uhuh" );
+ boost::ptr_vector<animal> animals = monkeys;
+
+This also works for maps::
+
+ boost::ptr_map<std::string,monkey> monkeys = ...;
+ boost::ptr_map<std::string,animal> animals = monkeys;
+
 New functions
 -------------
 
@@ -330,7 +343,7 @@
     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 slightly different to iterator over than standard maps.
+A map is slightly different to iterate over than standard maps.
 Now we say ::
 
     typedef boost::ptr_map<std::string, boost::nullable<animal> > animal_map;
@@ -365,9 +378,9 @@
 ``std::auto_ptr<U>`` overloads
 ------------------------------
 
-Evetime there is a function that takes a ``T*`` parameter, there is
+Every time 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 ::
+to make the library intregrate seamlessly with ``std::auto_ptr``. For example ::
 
   std::ptr_vector<Base> vec;
   vec.push_back( new Base );
@@ -375,7 +388,7 @@
 is complemented by ::
 
   std::auto_ptr<Derived> p( new Derived );
- vec.push_back( p );
+ 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*``
@@ -408,7 +421,7 @@
 
     zoo.erase_if( my_predicate() );
 
-Finally you may want to merge together two sorted containers::
+Finally you may want to merge two sorted containers::
 
     boost::ptr_vector<animal> another_zoo = ...;
     another_zoo.sort(); // sorted wrt. to same order as 'zoo'
@@ -420,7 +433,7 @@
 .. raw:: html
 
         <hr>
-
+
 **See also**
 
 - `Usage guidelines <guidelines.html>`_

Modified: trunk/libs/ptr_container/doc/tutorial_example.html
==============================================================================
--- trunk/libs/ptr_container/doc/tutorial_example.html (original)
+++ trunk/libs/ptr_container/doc/tutorial_example.html 2007-10-27 17:50:14 EDT (Sat, 27 Oct 2007)
@@ -2,7 +2,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> </title>
-<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="stylesheet" href="default.css" type="text/css">
 </head>
 
 <body>


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