From: David Abrahams (dave_at_[hidden])
Date: 2006-07-22 19:55:22
Daryle Walker <darylew_at_[hidden]> writes:
> On 7/22/06 8:28 AM, "David Abrahams" <dave_at_[hidden]> wrote:
>> Daryle Walker <darylew_at_[hidden]> writes:
>>> would have to contort their expressions to avoid ">", "<=", and
>>> ">=".) If there are no uses beside this shortcut, then the ordering
>>> operator should be removed since the class's model doesn't need it.
>> An ordering property is extremely useful outside of set/map, and it
>> becomes part of the class' model. If you remove ordering, you change
>> the model.
> The "becomes part" sounds like the existence of an ordering property
> justifies its own existence.
Usefulness justifies its existence.
> We need to take a step back and look at this
> type and what it's modeling from a higher perspective to avoid the circular
> argument. What uses besides set/map do you envision for ordering
Sort... Heapify... I'm sure I could think of others.
> And shouldn't _all_ the operators be defined then, not just "<"? (The docs
> at <http://www.boost.org/libs/smart_ptr/shared_ptr.htm> state that the full
> set of ordering operators is deliberately omitted.)
I don't have an opinion about that.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk