|
Boost : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-10 19:29:51
The tuple documentation says:
Tuples reduce the operators ==, !=, <, >, <= and >= to the corresponding
elementary operators. This means, that if any of these operators is defined
between all elements of two tuples, then the same operator is defined
between the tuples as well. The equality operators for two tuples a and b
are defined as:
a.. a == b iff for each i: ai == bi
b.. a != b iff exists i: ai != bi
The operators <, >, <= and >= implement a lexicographical ordering.
-------
Can we also have a function which orders tuples based on std::less<Element>?
That would be a big convenience for implementing map keys containing
pointers.
-Dave
===================================================
David Abrahams, C++ library designer for hire
resume: http://users.rcn.com/abrahams/resume.html
C++ Booster (http://www.boost.org)
email: david.abrahams_at_[hidden]
===================================================
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk