Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-09-06 07:33:36


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)

There is always the option of not defining <= at all.


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