Boost logo

Boost :

Subject: Re: [boost] [optional] operator<(optional<T>, T) -- is it wrong?
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2014-12-01 13:49:36


On Fri, Nov 28, 2014 at 3:12 PM, Matt Calabrese <rivorus_at_[hidden]> wrote:
> On Fri, Nov 28, 2014 at 11:22 AM, Gottlob Frege <gottlobfrege_at_[hidden]>
> wrote:
>
>> I (strongly!) agree with the only if op<(T,T> is defined.
>> (And famously believe op>=(optional<T>,optional<T>) should be based on
>> op>=(T,T), instead of !op<(T,T) )
>>
>
> Just want to say that I think this is important and was really upset when
> tuple, IMHO, got it wrong.

Well, for tuples of more than one member, there is no nice way of
generating all the relations *without making an assumption about how
the relations are related*.

So I'm fine with (and have tried to argue that) tuple, pair, vector,
etc are a different category from optional, expected, variant, any,...

ie one is a single-value wrapper, the other is a combination of values.
one requires lexicographical, which requires assumptions, the other
doesn't, and could/should thus use the proper underlying relations.

Still working on it.

Tony


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