Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-07-13 17:08:34


Author: danieljames
Date: 2008-07-13 17:08:33 EDT (Sun, 13 Jul 2008)
New Revision: 47405
URL: http://svn.boost.org/trac/boost/changeset/47405

Log:
Merge some documentation updates and fixes from trunk.

Merged revisions 47364,47402-47403 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r47364 | danieljames | 2008-07-12 20:32:15 +0100 (Sat, 12 Jul 2008) | 1 line
  
  Fix a PDF link that I missed before. (in static assert)
........
  r47402 | danieljames | 2008-07-13 20:42:56 +0100 (Sun, 13 Jul 2008) | 2 lines
  
  Note that emplace is only available on a few compilers.
........
  r47403 | danieljames | 2008-07-13 21:07:45 +0100 (Sun, 13 Jul 2008) | 2 lines
  
  Update the implementation details.
........

Properties modified:
   branches/release/ (props changed)
Text files modified:
   branches/release/libs/static_assert/doc/static_assert.qbk | 2 +-
   branches/release/libs/unordered/doc/rationale.qbk | 37 +++++++++++++++----------------------
   branches/release/libs/unordered/doc/ref.xml | 8 ++++++++
   3 files changed, 24 insertions(+), 23 deletions(-)

Modified: branches/release/libs/static_assert/doc/static_assert.qbk
==============================================================================
--- branches/release/libs/static_assert/doc/static_assert.qbk (original)
+++ branches/release/libs/static_assert/doc/static_assert.qbk 2008-07-13 17:08:33 EDT (Sun, 13 Jul 2008)
@@ -16,7 +16,7 @@
 ]
 
 This manual is also available in
-[@http:svn.boost.org/svn/boost/sandbox/pdf/static_assert/release/static_assert.pdf
+[@http://svn.boost.org/svn/boost/sandbox/pdf/static_assert/release/static_assert.pdf
 printer friendly PDF format].
 
 [section:intro Overview and Tutorial]

Modified: branches/release/libs/unordered/doc/rationale.qbk
==============================================================================
--- branches/release/libs/unordered/doc/rationale.qbk (original)
+++ branches/release/libs/unordered/doc/rationale.qbk 2008-07-13 17:08:33 EDT (Sun, 13 Jul 2008)
@@ -96,6 +96,17 @@
 
 So, this implementation uses a prime number for the hash table size.
 
+[h2 Equality operators and hash functions]
+
+`operator==` and `operator!=` are not included in the standard, but I've
+added them as I think they could be useful and can be efficiently
+implemented. They are specified
+differently to the standard associative containers, comparing keys
+using the equality predicate rather than `operator==`. This is inconsistent
+with the other containers but it is probably closer to user's expectations.
+I have also added a `hash_value` free function so that the containers can be
+hashed by [classref boost::hash].
+
 [h2 Active Issues and Proposals]
 
 [h3 Removing unused allocator functions]
@@ -181,32 +192,14 @@
 of elements with equivalent keys (i.e. if they're stable under `insert` and `erase`).
 This is [@http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518 issue 581].
 The current proposal is that insert, erase and rehash are stable - so they are here.
+(Update: during the release of this version, this requirement was added to
+[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2691.pdf
+the lastest working draft]).
 
 [h3 const_local_iterator cbegin, cend missing from TR1]
 
-[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2482.html#691
+[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2684.html#691
 Issue 691] is that `cbegin` and `cend` are missing for local iterators.
 The current resolution is that they'll be added, so I've added them.
 
-[h2 Future Developments]
-
-[h3 Support for `emplace`]
-
-In __n2369__ a new member function, `emplace` was added to the containers to
-allow placement insert, as described in __n2345__. To fully implement this
-`std::forward` is required, along with new functions in `std::allocator` and
-new constructors in `std::pair`. But partial support is possible - especially
-if I don't use the `construct` member of allocators.
-
-[h3 Equality operator]
-
-While `operator==` and `operator!=` are not included in the standard, it's
-possible to implement them for all the containers - this is helped by having
-stable order of elements with equivalent keys. They will need to be specified
-differently to the standard associative containers, probably comparing keys
-using the equality predicate rather than `operator==`. This is inconsistent
-with the other containers but it is probably closer to user's expectations.
-
-If these are added then a `hash_value` free function should also be added.
-
 [endsect]

Modified: branches/release/libs/unordered/doc/ref.xml
==============================================================================
--- branches/release/libs/unordered/doc/ref.xml (original)
+++ branches/release/libs/unordered/doc/ref.xml 2008-07-13 17:08:33 EDT (Sun, 13 Jul 2008)
@@ -284,6 +284,7 @@
               <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>
+ <para>Only available on compilers with support for variadic template arguments and rvalue references.</para>
               </notes>
             </method>
             <method name="emplace">
@@ -312,6 +313,7 @@
                 <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>
+ <para>Only available on compilers with support for variadic template arguments and rvalue references.</para>
               </notes>
             </method>
             <method name="insert">
@@ -1030,6 +1032,7 @@
               <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>
+ <para>Only available on compilers with support for variadic template arguments and rvalue references.</para>
               </notes>
             </method>
             <method name="emplace">
@@ -1058,6 +1061,7 @@
                 <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>
+ <para>Only available on compilers with support for variadic template arguments and rvalue references.</para>
               </notes>
             </method>
             <method name="insert">
@@ -1788,6 +1792,7 @@
               <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>
+ <para>Only available on compilers with support for variadic template arguments and rvalue references.</para>
               </notes>
             </method>
             <method name="emplace">
@@ -1816,6 +1821,7 @@
                 <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>
+ <para>Only available on compilers with support for variadic template arguments and rvalue references.</para>
               </notes>
             </method>
             <method name="insert">
@@ -2585,6 +2591,7 @@
               <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>
+ <para>Only available on compilers with support for variadic template arguments and rvalue references.</para>
               </notes>
             </method>
             <method name="emplace">
@@ -2613,6 +2620,7 @@
                 <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>
+ <para>Only available on compilers with support for variadic template arguments and rvalue references.</para>
               </notes>
             </method>
             <method name="insert">


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