|
Boost : |
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]>
wrote:
> Also, throw on special value assignment is insane
+1
> - 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.
degski
-- "*Ihre sogenannte Religion wirkt bloà wie ein Opiat reizend, betäubend, Schmerzen aus Schwäche stillend.*" - Novalis 1798
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk