Boost logo

Boost :

Subject: Re: [boost] [optional] using name boost::in_place -- need your opinion/advice
From: Vladimir Batov (Vladimir.Batov_at_[hidden])
Date: 2016-05-30 06:04:47


On 2016-05-30 17:47, Andrzej Krzemienski wrote:
> ...
> I am trying to make boost::optional resemble std::optional (where it is
> reasonably easy to achieve). std::optional has this nice and useful
> "placement" constructor:
> std::optional<std::mutex> m {std::in_place};
> std::in_place is a tag type, that instructs std::optional to create an
> object using placement-new syntax, from the provided arguments (zero in
> the
> example), without incurring any move construction.
> ...

To me the situation sounds quite concerning as I'd expect boost libs to
extend std counterparts, i.e. I suspect many people would expect
boost::foo = std::foo + something-else-useful functionally-wise. That
is, I'd personally expect the migration from boost::foo to std::foo to
be a simple renaming matter (if I did not use extra boost

The situation with in-place factories sounds like a diversion and you
seem to suggest (if I've got it right) to move even further.

Would not it be long-term proper to align boost::optional with
std::optional? If that requires renaming boost in-place factories, then
that might be a better long-term solution. If, say, that additional
functionality is later scheduled for std inclusion.

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