|
Boost : |
Subject: Re: [boost] [optional] Suggestion for adding an optional_number class
From: Viktor Sehr (viktor.sehr_at_[hidden])
Date: 2017-07-26 13:07:02
Thanks for your critique, as I see boost::markable is exactly what I was
intended as it is a little bit more generalized.
Regarding the throwing, I intended the throw when assigned the mark value
to be an "equivalent" to a assert, as I imagined the intention of assigning
an uninitalized value is more clear if forced to used "val = {}" or
"val.reset();", meaning it would be more of a drop-in replacement for
boost::optional.
/Viktor
On Wed, Jul 26, 2017 at 1:41 PM Hans Dembinski via Boost <
boost_at_[hidden]> wrote:
> > On 25. Jul 2017, at 15:46, Sergey Mitsyn via Boost <
> boost_at_[hidden]> wrote:
> >
> > FYI there was a proposal recently for optional with the same purpose;
> unfortunately, it went nowhere:
> >
> > https://lists.boost.org/Archives/boost/2015/09/225692.php
>
>
> There was also boost::markable with a similar intend:
> https://lists.boost.org/Archives/boost/2016/09/230811.php
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk