Boost logo

Boost :

Subject: Re: [boost] [optional] Safe optional
From: Nevin Liber (nevin_at_[hidden])
Date: 2014-11-18 15:32:00

On 18 November 2014 07:30, pfultz2 <pfultz2_at_[hidden]> wrote:

> > >
> > > I see. In this case I agree in that the original optional should
> > > remain the same. However, I don't see much point in such a restricted
> > > subset of the current optional. Just imagining myself using
> > > functions/lambdas instead of get() and similar code makes me dizzy.
> > >
> >
> > I sympathize with your opinion. Personally, I also prefer the current way
> > of accessing the value. Yet, I see people complain that it is unsafe. It
> > is
> > my hypothesis that there exist a portion of users that just like the
> > monadic interfaces along with the inconvenience that comes with it. This
> > post is to confirm my hypothesis, and if it is the case, to satisfy the
> > demand.
> Another option I would like to see is for `optional` to implement a range.


Note: To make this happen in std::experimental::optional might be a bit of
a battle, as there are at least a few committee members who don't like this
idea when I've floated it by them, but I'd certainly be willing to help
push it along.
 Nevin :-)

 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  (847) 691-1404

Boost list run by bdawes at, gregod at, cpdaniel at, john at