Boost logo

Boost :

From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-09-07 02:16:32


At Friday 2002/09/06 05:33, you wrote:
>From: "David Bergman" <davidb_at_[hidden]>
> >
> > BUT, the prime reason for keeping the STL convenience implementation of
> > '<=' being '!>' was in order to be "compatible" with STL, according to
> > Herve and Guillaume, in spite of the induced "equivalence" not being an
> > equivalence at all. Thus, I somehow got the idea that it was important.
>
>Having an "STL-compatible" operator< is important if you want to use STL
>algorithms or associative containers with intervals without an explicit
>comparator.
>
>Having operator<= that is !> is important if you want to prevent user
>mistakes, such as replacing
>
>if(!(x < y))
>
>with
>
>if(y >= x)

this isn't equivalent in ANY algebra I'm aware of.
you meant, perhaps:
if(x >= y)

>There is always the option of not defining <= at all.
>
>_______________________________________________
>Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Victor A. Wagner Jr. http://rudbek.com
PGP RSA fingerprint = 4D20 EBF6 0101 B069 3817 8DBF C846 E47A
PGP D-H fingerprint = 98BC 65E3 1A19 43EC 3908 65B9 F755 E6F4 63BB 9D93
The five most dangerous words in the English language:
               "There oughta be a law"


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