|
Boost : |
From: David Bergman (davidb_at_[hidden])
Date: 2002-09-05 14:01:18
Again,
What is so sacred about '<='? The choice of ordering to be denoted by
the '<' symbol is obviously up for debate. But no matter what the
choice, should the '<=' not be regarded as syntactic sugar for '< ||
=='?
I am obviously missing something fundamental here ;-)
/David
-----Original Message-----
From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of Dave Gomboc
Sent: Thursday, September 05, 2002 2:50 PM
To: Boost Mailing List
Subject: [boost] Re: Interval Library and comparison operators
> > 1) Don't support any comparison operators, or
> > 2) Use comparison policies
>
> 3) Pick a fixed meaning for the comparison operators, and provide
> function (object)s for the other kinds of comparison.
Judging from the variety of different, conflicting definitions that
other interval arithmetic libraries use, and the varied proposals that
Boosters have brought forth, it seems that no particular comparison
operation has a clearly most valid claim to operator<= and the like.
Therefore, I don't think that assigning one meaning to them is
appropriate: no matter the definition selected, mnay users would find it
counter-intuitive and expect an alternate definition. I think it would
be best if all 13 relations Joel Young suggested be provided (meets,
precedes, etc.) and either of the following done:
a) prohibit definition of relational operators such as <= entirely
(declare them private and do not define them)
or
b) allow the library user to overload the relational operators
as they see fit for their application (which is easily done if
implementations of the 13 relations are already provided).
Dave
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk