Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2000-11-21 11:53:18


> Therefore, we end up with something more like this
>
> LessThanComparable2<A,B> (version 1)
> A is LessThanComparable
> B is LessThanComparable
> A a; B b;
> a < b
> b < a
>
> I'm in favor of the above, though I could also see people arguing that if
> "a < b" is a valid expression for the concept, then so should "b > a",
> which would add the greater-than operator.
>
> LessThanComparable2<A,B> (version 2, with greater than)
> A is LessThanComparable
> B is LessThanComparable
> A a; B b;
> a < b
> b < a
> a > b
> b > a
>
>
> Anyone agree/disagree? Preferences between version 1 and 2?

I agree with version 1. None of my code requires the greater-than operator,
so version 2 is overly restrictive. Besides, version 2 is not
"LessThanComparable". :-)

--
Peter Dimov
Multi Media Ltd.

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