Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-09-03 14:38:35


From: "David Bergman" <davidb_at_[hidden]>
>
> The user should be forced to realize that he has left total orderings
> and went into the land of partial orderings, where the "if !(a <= b)"
> and "if (a > b)" equivalence does not hold. Such shortcuts are *only*
> allowed in total orderings, else we would end up with the rather
> unpleasant "(a <= b) != (a < b || a == b)", which is the case here...

You are certainly aware that the STL defines a >= b as !(a < b), aren't you?
The "pleasant"

a <= b :- a < b || a == b

implies the existence of a == b (and that a == b is consistent with a < b).

In situations where <= is ambiguous, I usually define only < (not even >)
and let the user disambiguate explicitly.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk