Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80294 - in branches/release: . libs libs/unordered libs/unordered/doc
From: dnljms_at_[hidden]
Date: 2012-08-28 17:56:18


Author: danieljames
Date: 2012-08-28 17:56:18 EDT (Tue, 28 Aug 2012)
New Revision: 80294
URL: http://svn.boost.org/trac/boost/changeset/80294

Log:
Unordered: Merge reference documentation update.
Properties modified:
   branches/release/ (props changed)
   branches/release/libs/ (props changed)
   branches/release/libs/unordered/ (props changed)
Text files modified:
   branches/release/libs/unordered/doc/ref.php | 107 ++++++++++++
   branches/release/libs/unordered/doc/ref.xml | 342 +++++++++++++++++++++++++++++++++++++++
   2 files changed, 440 insertions(+), 9 deletions(-)

Modified: branches/release/libs/unordered/doc/ref.php
==============================================================================
--- branches/release/libs/unordered/doc/ref.php (original)
+++ branches/release/libs/unordered/doc/ref.php 2012-08-28 17:56:18 EDT (Tue, 28 Aug 2012)
@@ -67,14 +67,20 @@
 <?php if ($map): ?>
                     <row>
                       <entry><emphasis>Key</emphasis></entry>
- <entry>Key must be Assignable and CopyConstructible.</entry></row>
+ <entry><code>Key</code> must be <code>Erasable</code> from the container
+ (i.e. <code>allocator_traits</code> can <code>destroy</code> it).
+ </entry></row>
                     <row>
                       <entry><emphasis>Mapped</emphasis></entry>
- <entry>Mapped must be CopyConstructible</entry></row>
+ <entry><code>Mapped</code> must be <code>Erasable</code> from the container
+ (i.e. <code>allocator_traits</code> can <code>destroy</code> it).
+ </entry></row>
 <?php else: ?>
                     <row>
                       <entry><emphasis>Value</emphasis></entry>
- <entry>Value must be Assignable and CopyConstructible</entry></row>
+ <entry><code>Value</code> must be <code>Erasable</code> from the container
+ (i.e. <code>allocator_traits</code> can <code>destroy</code> it).
+ </entry></row>
 <?php endif ?>
                     <row>
                       <entry><emphasis>Hash</emphasis></entry>
@@ -206,6 +212,11 @@
             <description>
               <para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.</para>
             </description>
+ <requires>
+ <para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
+ <code>allocator_type</code> need to be <code>DefaultConstructible</code>.
+ </para>
+ </requires>
           </constructor>
           <constructor>
             <template>
@@ -237,6 +248,11 @@
             <description>
               <para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.</para>
             </description>
+ <requires>
+ <para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
+ <code>allocator_type</code> need to be <code>DefaultConstructible</code>.
+ </para>
+ </requires>
           </constructor>
           <constructor>
             <parameter>
@@ -408,6 +424,11 @@
                     ' if and only if there is no element in the container with an equivalent '.$key_name. '.';
                 ?></para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>EmplaceConstructible</code> into
+ <code>X</code> from <code>args</code>.
+ </para>
+ </requires>
               <returns>
 <?php if ($equivalent_keys): ?>
                 <para>An iterator pointing to the inserted element.</para>
@@ -453,6 +474,11 @@
                 ?></para>
                 <para><code>hint</code> is a suggestion to where the element should be inserted.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>EmplaceConstructible</code> into
+ <code>X</code> from <code>args</code>.
+ </para>
+ </requires>
               <returns>
 <?php if ($equivalent_keys): ?>
                 <para>An iterator pointing to the inserted element.</para>
@@ -490,6 +516,39 @@
                     ' if and only if there is no element in the container with an equivalent '.$key_name. '.';
                 ?></para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>CopyInsertable</code>.</para>
+ </requires>
+ <returns>
+<?php if ($equivalent_keys): ?>
+ <para>An iterator pointing to the inserted element.</para>
+<?php else: ?>
+ <para>The bool component of the return type is true if an insert took place.</para>
+ <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent <?php echo $key_name; ?>.</para>
+<?php endif; ?>
+ </returns>
+ <throws>
+ <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
+ </throws>
+ <notes>
+ <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
+ <para>Pointers and references to elements are never invalidated.</para>
+ </notes>
+ </method>
+ <method name="insert">
+ <parameter name="obj">
+ <paramtype>value_type&amp;&amp;</paramtype>
+ </parameter>
+ <type><?php echo $equivalent_keys ? 'iterator' : 'std::pair&lt;iterator, bool&gt;' ?></type>
+ <description>
+ <para>Inserts <code>obj</code> in the container<?php
+ echo $equivalent_keys ? '.' :
+ ' if and only if there is no element in the container with an equivalent '.$key_name. '.';
+ ?></para>
+ </description>
+ <requires>
+ <para><code>value_type</code> is <code>MoveInsertable</code>.</para>
+ </requires>
               <returns>
 <?php if ($equivalent_keys): ?>
                 <para>An iterator pointing to the inserted element.</para>
@@ -522,6 +581,44 @@
 <?php endif; ?>
                 <para>hint is a suggestion to where the element should be inserted.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>CopyInsertable</code>.</para>
+ </requires>
+ <returns>
+<?php if ($equivalent_keys): ?>
+ <para>An iterator pointing to the inserted element.</para>
+<?php else: ?>
+ <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent <?php echo $key_name; ?>.</para>
+<?php endif; ?>
+ </returns>
+ <throws>
+ <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
+ </throws>
+ <notes>
+ <para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same <?php echo $key_name; ?>. </para>
+ <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
+ <para>Pointers and references to elements are never invalidated.</para>
+ </notes>
+ </method>
+ <method name="insert">
+ <parameter name="hint">
+ <paramtype>const_iterator</paramtype>
+ </parameter>
+ <parameter name="obj">
+ <paramtype>value_type&amp;&amp;</paramtype>
+ </parameter>
+ <type>iterator</type>
+ <description>
+<?php if ($equivalent_keys): ?>
+ <para>Inserts <code>obj</code> in the container.</para>
+<?php else: ?>
+ <para>Inserts <code>obj</code> in the container if and only if there is no element in the container with an equivalent <?php echo $key_name; ?>.</para>
+<?php endif; ?>
+ <para>hint is a suggestion to where the element should be inserted.</para>
+ </description>
+ <requires>
+ <para><code>value_type</code> is <code>MoveInsertable</code>.</para>
+ </requires>
               <returns>
 <?php if ($equivalent_keys): ?>
                 <para>An iterator pointing to the inserted element.</para>
@@ -553,6 +650,10 @@
               <description>
                 <para>Inserts a range of elements into the container. Elements are inserted if and only if there is no element in the container with an equivalent <?php echo $key_name; ?>.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>EmplaceConstructible</code> into
+ <code>X</code> from <code>*first</code>.</para>
+ </requires>
               <throws>
                 <para>When inserting a single element, if an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
               </throws>

Modified: branches/release/libs/unordered/doc/ref.xml
==============================================================================
--- branches/release/libs/unordered/doc/ref.xml (original)
+++ branches/release/libs/unordered/doc/ref.xml 2012-08-28 17:56:18 EDT (Tue, 28 Aug 2012)
@@ -29,7 +29,9 @@
                   <tbody>
                     <row>
                       <entry><emphasis>Value</emphasis></entry>
- <entry>Value must be Assignable and CopyConstructible</entry></row>
+ <entry><code>Value</code> must be <code>Erasable</code> from the container
+ (i.e. <code>allocator_traits</code> can <code>destroy</code> it).
+ </entry></row>
                     <row>
                       <entry><emphasis>Hash</emphasis></entry>
                       <entry>A unary function object type that acts a hash function for a <code>Value</code>. It takes a single argument of type <code>Value</code> and returns a value of type std::size_t.</entry></row>
@@ -151,6 +153,11 @@
             <description>
               <para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.</para>
             </description>
+ <requires>
+ <para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
+ <code>allocator_type</code> need to be <code>DefaultConstructible</code>.
+ </para>
+ </requires>
           </constructor>
           <constructor>
             <template>
@@ -182,6 +189,11 @@
             <description>
               <para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.</para>
             </description>
+ <requires>
+ <para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
+ <code>allocator_type</code> need to be <code>DefaultConstructible</code>.
+ </para>
+ </requires>
           </constructor>
           <constructor>
             <parameter>
@@ -350,6 +362,11 @@
               <description>
                 <para>Inserts an object, constructed with the arguments <code>args</code>, in the container if and only if there is no element in the container with an equivalent value.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>EmplaceConstructible</code> into
+ <code>X</code> from <code>args</code>.
+ </para>
+ </requires>
               <returns>
                 <para>The bool component of the return type is true if an insert took place.</para>
                 <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.</para>
@@ -388,6 +405,11 @@
                 <para>Inserts an object, constructed with the arguments <code>args</code>, in the container if and only if there is no element in the container with an equivalent value.</para>
                 <para><code>hint</code> is a suggestion to where the element should be inserted.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>EmplaceConstructible</code> into
+ <code>X</code> from <code>args</code>.
+ </para>
+ </requires>
               <returns>
                 <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.</para>
               </returns>
@@ -418,6 +440,32 @@
               <description>
                 <para>Inserts <code>obj</code> in the container if and only if there is no element in the container with an equivalent value.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>CopyInsertable</code>.</para>
+ </requires>
+ <returns>
+ <para>The bool component of the return type is true if an insert took place.</para>
+ <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.</para>
+ </returns>
+ <throws>
+ <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
+ </throws>
+ <notes>
+ <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
+ <para>Pointers and references to elements are never invalidated.</para>
+ </notes>
+ </method>
+ <method name="insert">
+ <parameter name="obj">
+ <paramtype>value_type&amp;&amp;</paramtype>
+ </parameter>
+ <type>std::pair&lt;iterator, bool&gt;</type>
+ <description>
+ <para>Inserts <code>obj</code> in the container if and only if there is no element in the container with an equivalent value.</para>
+ </description>
+ <requires>
+ <para><code>value_type</code> is <code>MoveInsertable</code>.</para>
+ </requires>
               <returns>
                 <para>The bool component of the return type is true if an insert took place.</para>
                 <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.</para>
@@ -442,6 +490,36 @@
                 <para>Inserts <code>obj</code> in the container if and only if there is no element in the container with an equivalent value.</para>
                 <para>hint is a suggestion to where the element should be inserted.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>CopyInsertable</code>.</para>
+ </requires>
+ <returns>
+ <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.</para>
+ </returns>
+ <throws>
+ <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
+ </throws>
+ <notes>
+ <para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value. </para>
+ <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
+ <para>Pointers and references to elements are never invalidated.</para>
+ </notes>
+ </method>
+ <method name="insert">
+ <parameter name="hint">
+ <paramtype>const_iterator</paramtype>
+ </parameter>
+ <parameter name="obj">
+ <paramtype>value_type&amp;&amp;</paramtype>
+ </parameter>
+ <type>iterator</type>
+ <description>
+ <para>Inserts <code>obj</code> in the container if and only if there is no element in the container with an equivalent value.</para>
+ <para>hint is a suggestion to where the element should be inserted.</para>
+ </description>
+ <requires>
+ <para><code>value_type</code> is <code>MoveInsertable</code>.</para>
+ </requires>
               <returns>
                 <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.</para>
               </returns>
@@ -469,6 +547,10 @@
               <description>
                 <para>Inserts a range of elements into the container. Elements are inserted if and only if there is no element in the container with an equivalent value.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>EmplaceConstructible</code> into
+ <code>X</code> from <code>*first</code>.</para>
+ </requires>
               <throws>
                 <para>When inserting a single element, if an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
               </throws>
@@ -994,7 +1076,9 @@
                   <tbody>
                     <row>
                       <entry><emphasis>Value</emphasis></entry>
- <entry>Value must be Assignable and CopyConstructible</entry></row>
+ <entry><code>Value</code> must be <code>Erasable</code> from the container
+ (i.e. <code>allocator_traits</code> can <code>destroy</code> it).
+ </entry></row>
                     <row>
                       <entry><emphasis>Hash</emphasis></entry>
                       <entry>A unary function object type that acts a hash function for a <code>Value</code>. It takes a single argument of type <code>Value</code> and returns a value of type std::size_t.</entry></row>
@@ -1116,6 +1200,11 @@
             <description>
               <para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.</para>
             </description>
+ <requires>
+ <para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
+ <code>allocator_type</code> need to be <code>DefaultConstructible</code>.
+ </para>
+ </requires>
           </constructor>
           <constructor>
             <template>
@@ -1147,6 +1236,11 @@
             <description>
               <para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.</para>
             </description>
+ <requires>
+ <para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
+ <code>allocator_type</code> need to be <code>DefaultConstructible</code>.
+ </para>
+ </requires>
           </constructor>
           <constructor>
             <parameter>
@@ -1315,6 +1409,11 @@
               <description>
                 <para>Inserts an object, constructed with the arguments <code>args</code>, in the container.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>EmplaceConstructible</code> into
+ <code>X</code> from <code>args</code>.
+ </para>
+ </requires>
               <returns>
                 <para>An iterator pointing to the inserted element.</para>
               </returns>
@@ -1352,6 +1451,11 @@
                 <para>Inserts an object, constructed with the arguments <code>args</code>, in the container.</para>
                 <para><code>hint</code> is a suggestion to where the element should be inserted.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>EmplaceConstructible</code> into
+ <code>X</code> from <code>args</code>.
+ </para>
+ </requires>
               <returns>
                 <para>An iterator pointing to the inserted element.</para>
               </returns>
@@ -1382,6 +1486,31 @@
               <description>
                 <para>Inserts <code>obj</code> in the container.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>CopyInsertable</code>.</para>
+ </requires>
+ <returns>
+ <para>An iterator pointing to the inserted element.</para>
+ </returns>
+ <throws>
+ <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
+ </throws>
+ <notes>
+ <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
+ <para>Pointers and references to elements are never invalidated.</para>
+ </notes>
+ </method>
+ <method name="insert">
+ <parameter name="obj">
+ <paramtype>value_type&amp;&amp;</paramtype>
+ </parameter>
+ <type>iterator</type>
+ <description>
+ <para>Inserts <code>obj</code> in the container.</para>
+ </description>
+ <requires>
+ <para><code>value_type</code> is <code>MoveInsertable</code>.</para>
+ </requires>
               <returns>
                 <para>An iterator pointing to the inserted element.</para>
               </returns>
@@ -1405,6 +1534,36 @@
                 <para>Inserts <code>obj</code> in the container.</para>
                 <para>hint is a suggestion to where the element should be inserted.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>CopyInsertable</code>.</para>
+ </requires>
+ <returns>
+ <para>An iterator pointing to the inserted element.</para>
+ </returns>
+ <throws>
+ <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
+ </throws>
+ <notes>
+ <para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value. </para>
+ <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
+ <para>Pointers and references to elements are never invalidated.</para>
+ </notes>
+ </method>
+ <method name="insert">
+ <parameter name="hint">
+ <paramtype>const_iterator</paramtype>
+ </parameter>
+ <parameter name="obj">
+ <paramtype>value_type&amp;&amp;</paramtype>
+ </parameter>
+ <type>iterator</type>
+ <description>
+ <para>Inserts <code>obj</code> in the container.</para>
+ <para>hint is a suggestion to where the element should be inserted.</para>
+ </description>
+ <requires>
+ <para><code>value_type</code> is <code>MoveInsertable</code>.</para>
+ </requires>
               <returns>
                 <para>An iterator pointing to the inserted element.</para>
               </returns>
@@ -1432,6 +1591,10 @@
               <description>
                 <para>Inserts a range of elements into the container. Elements are inserted if and only if there is no element in the container with an equivalent value.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>EmplaceConstructible</code> into
+ <code>X</code> from <code>*first</code>.</para>
+ </requires>
               <throws>
                 <para>When inserting a single element, if an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
               </throws>
@@ -1963,10 +2126,14 @@
                   <tbody>
                     <row>
                       <entry><emphasis>Key</emphasis></entry>
- <entry>Key must be Assignable and CopyConstructible.</entry></row>
+ <entry><code>Key</code> must be <code>Erasable</code> from the container
+ (i.e. <code>allocator_traits</code> can <code>destroy</code> it).
+ </entry></row>
                     <row>
                       <entry><emphasis>Mapped</emphasis></entry>
- <entry>Mapped must be CopyConstructible</entry></row>
+ <entry><code>Mapped</code> must be <code>Erasable</code> from the container
+ (i.e. <code>allocator_traits</code> can <code>destroy</code> it).
+ </entry></row>
                     <row>
                       <entry><emphasis>Hash</emphasis></entry>
                       <entry>A unary function object type that acts a hash function for a <code>Key</code>. It takes a single argument of type <code>Key</code> and returns a value of type std::size_t.</entry></row>
@@ -2091,6 +2258,11 @@
             <description>
               <para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.</para>
             </description>
+ <requires>
+ <para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
+ <code>allocator_type</code> need to be <code>DefaultConstructible</code>.
+ </para>
+ </requires>
           </constructor>
           <constructor>
             <template>
@@ -2122,6 +2294,11 @@
             <description>
               <para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.</para>
             </description>
+ <requires>
+ <para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
+ <code>allocator_type</code> need to be <code>DefaultConstructible</code>.
+ </para>
+ </requires>
           </constructor>
           <constructor>
             <parameter>
@@ -2290,6 +2467,11 @@
               <description>
                 <para>Inserts an object, constructed with the arguments <code>args</code>, in the container if and only if there is no element in the container with an equivalent key.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>EmplaceConstructible</code> into
+ <code>X</code> from <code>args</code>.
+ </para>
+ </requires>
               <returns>
                 <para>The bool component of the return type is true if an insert took place.</para>
                 <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.</para>
@@ -2328,6 +2510,11 @@
                 <para>Inserts an object, constructed with the arguments <code>args</code>, in the container if and only if there is no element in the container with an equivalent key.</para>
                 <para><code>hint</code> is a suggestion to where the element should be inserted.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>EmplaceConstructible</code> into
+ <code>X</code> from <code>args</code>.
+ </para>
+ </requires>
               <returns>
                 <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.</para>
               </returns>
@@ -2358,6 +2545,32 @@
               <description>
                 <para>Inserts <code>obj</code> in the container if and only if there is no element in the container with an equivalent key.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>CopyInsertable</code>.</para>
+ </requires>
+ <returns>
+ <para>The bool component of the return type is true if an insert took place.</para>
+ <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.</para>
+ </returns>
+ <throws>
+ <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
+ </throws>
+ <notes>
+ <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
+ <para>Pointers and references to elements are never invalidated.</para>
+ </notes>
+ </method>
+ <method name="insert">
+ <parameter name="obj">
+ <paramtype>value_type&amp;&amp;</paramtype>
+ </parameter>
+ <type>std::pair&lt;iterator, bool&gt;</type>
+ <description>
+ <para>Inserts <code>obj</code> in the container if and only if there is no element in the container with an equivalent key.</para>
+ </description>
+ <requires>
+ <para><code>value_type</code> is <code>MoveInsertable</code>.</para>
+ </requires>
               <returns>
                 <para>The bool component of the return type is true if an insert took place.</para>
                 <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.</para>
@@ -2382,6 +2595,36 @@
                 <para>Inserts <code>obj</code> in the container if and only if there is no element in the container with an equivalent key.</para>
                 <para>hint is a suggestion to where the element should be inserted.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>CopyInsertable</code>.</para>
+ </requires>
+ <returns>
+ <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.</para>
+ </returns>
+ <throws>
+ <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
+ </throws>
+ <notes>
+ <para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same key. </para>
+ <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
+ <para>Pointers and references to elements are never invalidated.</para>
+ </notes>
+ </method>
+ <method name="insert">
+ <parameter name="hint">
+ <paramtype>const_iterator</paramtype>
+ </parameter>
+ <parameter name="obj">
+ <paramtype>value_type&amp;&amp;</paramtype>
+ </parameter>
+ <type>iterator</type>
+ <description>
+ <para>Inserts <code>obj</code> in the container if and only if there is no element in the container with an equivalent key.</para>
+ <para>hint is a suggestion to where the element should be inserted.</para>
+ </description>
+ <requires>
+ <para><code>value_type</code> is <code>MoveInsertable</code>.</para>
+ </requires>
               <returns>
                 <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.</para>
               </returns>
@@ -2409,6 +2652,10 @@
               <description>
                 <para>Inserts a range of elements into the container. Elements are inserted if and only if there is no element in the container with an equivalent key.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>EmplaceConstructible</code> into
+ <code>X</code> from <code>*first</code>.</para>
+ </requires>
               <throws>
                 <para>When inserting a single element, if an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
               </throws>
@@ -2973,10 +3220,14 @@
                   <tbody>
                     <row>
                       <entry><emphasis>Key</emphasis></entry>
- <entry>Key must be Assignable and CopyConstructible.</entry></row>
+ <entry><code>Key</code> must be <code>Erasable</code> from the container
+ (i.e. <code>allocator_traits</code> can <code>destroy</code> it).
+ </entry></row>
                     <row>
                       <entry><emphasis>Mapped</emphasis></entry>
- <entry>Mapped must be CopyConstructible</entry></row>
+ <entry><code>Mapped</code> must be <code>Erasable</code> from the container
+ (i.e. <code>allocator_traits</code> can <code>destroy</code> it).
+ </entry></row>
                     <row>
                       <entry><emphasis>Hash</emphasis></entry>
                       <entry>A unary function object type that acts a hash function for a <code>Key</code>. It takes a single argument of type <code>Key</code> and returns a value of type std::size_t.</entry></row>
@@ -3101,6 +3352,11 @@
             <description>
               <para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.</para>
             </description>
+ <requires>
+ <para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
+ <code>allocator_type</code> need to be <code>DefaultConstructible</code>.
+ </para>
+ </requires>
           </constructor>
           <constructor>
             <template>
@@ -3132,6 +3388,11 @@
             <description>
               <para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.</para>
             </description>
+ <requires>
+ <para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
+ <code>allocator_type</code> need to be <code>DefaultConstructible</code>.
+ </para>
+ </requires>
           </constructor>
           <constructor>
             <parameter>
@@ -3300,6 +3561,11 @@
               <description>
                 <para>Inserts an object, constructed with the arguments <code>args</code>, in the container.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>EmplaceConstructible</code> into
+ <code>X</code> from <code>args</code>.
+ </para>
+ </requires>
               <returns>
                 <para>An iterator pointing to the inserted element.</para>
               </returns>
@@ -3337,6 +3603,11 @@
                 <para>Inserts an object, constructed with the arguments <code>args</code>, in the container.</para>
                 <para><code>hint</code> is a suggestion to where the element should be inserted.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>EmplaceConstructible</code> into
+ <code>X</code> from <code>args</code>.
+ </para>
+ </requires>
               <returns>
                 <para>An iterator pointing to the inserted element.</para>
               </returns>
@@ -3367,6 +3638,31 @@
               <description>
                 <para>Inserts <code>obj</code> in the container.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>CopyInsertable</code>.</para>
+ </requires>
+ <returns>
+ <para>An iterator pointing to the inserted element.</para>
+ </returns>
+ <throws>
+ <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
+ </throws>
+ <notes>
+ <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
+ <para>Pointers and references to elements are never invalidated.</para>
+ </notes>
+ </method>
+ <method name="insert">
+ <parameter name="obj">
+ <paramtype>value_type&amp;&amp;</paramtype>
+ </parameter>
+ <type>iterator</type>
+ <description>
+ <para>Inserts <code>obj</code> in the container.</para>
+ </description>
+ <requires>
+ <para><code>value_type</code> is <code>MoveInsertable</code>.</para>
+ </requires>
               <returns>
                 <para>An iterator pointing to the inserted element.</para>
               </returns>
@@ -3390,6 +3686,36 @@
                 <para>Inserts <code>obj</code> in the container.</para>
                 <para>hint is a suggestion to where the element should be inserted.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>CopyInsertable</code>.</para>
+ </requires>
+ <returns>
+ <para>An iterator pointing to the inserted element.</para>
+ </returns>
+ <throws>
+ <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
+ </throws>
+ <notes>
+ <para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same key. </para>
+ <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
+ <para>Pointers and references to elements are never invalidated.</para>
+ </notes>
+ </method>
+ <method name="insert">
+ <parameter name="hint">
+ <paramtype>const_iterator</paramtype>
+ </parameter>
+ <parameter name="obj">
+ <paramtype>value_type&amp;&amp;</paramtype>
+ </parameter>
+ <type>iterator</type>
+ <description>
+ <para>Inserts <code>obj</code> in the container.</para>
+ <para>hint is a suggestion to where the element should be inserted.</para>
+ </description>
+ <requires>
+ <para><code>value_type</code> is <code>MoveInsertable</code>.</para>
+ </requires>
               <returns>
                 <para>An iterator pointing to the inserted element.</para>
               </returns>
@@ -3417,6 +3743,10 @@
               <description>
                 <para>Inserts a range of elements into the container. Elements are inserted if and only if there is no element in the container with an equivalent key.</para>
               </description>
+ <requires>
+ <para><code>value_type</code> is <code>EmplaceConstructible</code> into
+ <code>X</code> from <code>*first</code>.</para>
+ </requires>
               <throws>
                 <para>When inserting a single element, if an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
               </throws>


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