Boost logo

Boost :

Subject: Re: [boost] [optional] operator<(optional<T>, T) -- is it wrong?
From: Vladimir Batov (Vladimir.Batov_at_[hidden])
Date: 2014-11-25 15:13:31


On 11/24/2014 09:07 PM, Andrzej Krzemienski wrote:
> Anyone else? Would you be affected if operator<(optional<T>, T) is
> poisoned? (but operator==(optional<T>, T) remains working)

Another *pragmatic* point (probably more relevant for the std::optional
variant) is if op<(T, optional<T>) is prohibited now and then later it
is decided that decision was wrong (even though I can't possibly see how
as it does not take *any* functionality away), then adding it back will
not cause any issues. On the contrary, it op<() is allowed to stay now
and later it's decided that decision was wrong and op<() is better taken
out, then it won't be possible to do... well, much harder anyway as it's
be a breaking change.


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