Subject: Re: [boost] [optional] Suggestion for adding an optional_number class
From: degski (degski_at_[hidden])
Date: 2017-07-26 04:12:10
On 25 July 2017 at 16:46, Sergey Mitsyn via Boost <boost_at_[hidden]>
> Also, throw on special value assignment is insane
> - it might be perfectly fine to pass special values to indicate something
> other than error - say, in a system it might be defined as a missing value
> (e.g. NaN meaning n/a).
And checking the that totally normal (and informative, could be a value in
an enum class) return value directly is just as easy (or easier and more
clear) than to have to write a try/catch block.
-- "*Ihre sogenannte Religion wirkt bloÃ wie ein Opiat reizend, betÃ¤ubend, Schmerzen aus SchwÃ¤che stillend.*" - Novalis 1798