|
Boost : |
Subject: Re: [boost] [optional] operator<(optional<T>, T) -- is it wrong?
From: Rob Stewart (robertstewart_at_[hidden])
Date: 2014-11-27 11:20:58
On November 27, 2014 9:14:37 AM EST, David Stone <david_at_[hidden]> wrote:
>On Wed, Nov 26, 2014 at 4:49 PM, Gavin Lambert <gavinl_at_[hidden]>
>wrote:
>
>> But why do you want to have optional keys anyway? When does it make
>sense
>> to have a single value attached to an empty key? It's rare for a
>> dictionary type to permit null keys in any language.
>
>I think this is a good point. Has anyone reading this list every
>actually
>used std::map<boost::optional<T>, U>?
I haven't, but I think the better question to ask is for legitimate use cases for that operator. Given such use cases, one can judge whether they warrant retention of the operator. If none are produced, removing the operator is far easier to justify.
___
Rob
(Sent from my portable computation engine)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk