Date: 2008-07-13 16:07:45
Date: 2008-07-13 16:07:45 EDT (Sun, 13 Jul 2008)
New Revision: 47403
Update the implementation details.
Text files modified:
trunk/libs/unordered/doc/rationale.qbk | 37 +++++++++++++++----------------------
1 files changed, 15 insertions(+), 22 deletions(-)
--- trunk/libs/unordered/doc/rationale.qbk (original)
+++ trunk/libs/unordered/doc/rationale.qbk 2008-07-13 16:07:45 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
+the lastest working draft]).
[h3 const_local_iterator cbegin, cend missing from TR1]
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.
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