Subject: Re: [boost] [optional] operator<(optional<T>, T) -- is it wrong?
From: Olaf van der Spek (ml_at_[hidden])
Date: 2014-12-01 07:02:19
On Thu, Nov 27, 2014 at 11:12 PM, Marcel Raad <raad_at_[hidden]> wrote:
> And I (perhaps mis-?)use it in
> configuration code to represent a default
> value so that I don't have to have an
> extra variable for each map:
Hmm, an extra var seems simpler then optional keys.
> auto it = map.find(whatever);
> if(it != map.end()) return *it;
> else return map[boost::none];
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk