|
Boost : |
From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2002-09-06 09:15:09
"George A. Heintzelman" <georgeh_at_[hidden]> writes:
| Peter Dimov wrote:
| > Once you decouple std::less from operator<, you now need to always define a
| > less<> specialization in terms of less<> whenever you would define an
| > operator< in terms of operator<.
|
| Right. This settles it for me. std::less should be an alias for
| operator<.
But, in effect it isn't. And I'm not convinced it should.
My opinion is that it would be much more useful to define
std::less<> on compound types in terms of std::less<> for contained
types, and not in terms of operator<.
[...]
| IMHO, lexicographic isn't really that bad -- it can be intuited as
| 'starts earlier', it's fast to compute, and makes no new requirements on the
| base type.
I also would vote for lexicographical ordering, though I understand
the arguments of the other sides.
--- Gaby
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk