Date: 2008-01-06 08:24:48
Date: 2008-01-06 08:24:47 EST (Sun, 06 Jan 2008)
New Revision: 42525
Add note about intent to implementation operator== and operator!=.
Text files modified:
branches/unordered/trunk/libs/unordered/doc/comparison.qbk | 7 +++++--
branches/unordered/trunk/libs/unordered/doc/rationale.qbk | 11 +++++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
--- branches/unordered/trunk/libs/unordered/doc/comparison.qbk (original)
+++ branches/unordered/trunk/libs/unordered/doc/comparison.qbk 2008-01-06 08:24:47 EST (Sun, 06 Jan 2008)
@@ -70,8 +70,11 @@
required to have any correspondence.)]
- [Can be compared using the `==`, `!=`, `<`, `<=`, `>`, `>=` operators]
- [No comparison operators are defined]
+ [Can be compared using the `==`, `!=`, `<`, `<=`, `>`, `>=` operators.]
+ [No comparison operators are defined in the standard, although
+ [link unordered.rationale.equality_operator
+ implementations might extend the containers to support `==` and
--- branches/unordered/trunk/libs/unordered/doc/rationale.qbk (original)
+++ branches/unordered/trunk/libs/unordered/doc/rationale.qbk 2008-01-06 08:24:47 EST (Sun, 06 Jan 2008)
@@ -198,4 +198,15 @@
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