Boost logo

Boost :

Subject: Re: [boost] [optional] Why was optional<T>::reset() deprecated?
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2016-03-01 17:51:02


At some earlier stages of development, boost::optional did not have the
assignment from boost::none_t (and probably also from T); and reset was the
only way to efficiently change the optional from the state of having the
value to the state of not having the value.

After the addition of more fancy syntax (conversion to bool, assignment
from none_t), reset() (and is_initialized()) became redundant, and hence
the deprecation.

I got that from reading Boost mailing archives once.

Regards,
&rzej

2016-03-01 22:58 GMT+01:00 Nevin Liber <nevin_at_[hidden]>:

> Does anyone know? We are considering adding it to std::optional this week.
>
> Thanks,
> --
> Nevin ":-)" Liber <mailto:nevin_at_[hidden] <nevin_at_[hidden]
> >>
> +1-847-691-1404
>
> _______________________________________________
> 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