From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2024-12-16 12:01:42


On 12/16/24 14:56, Janko Dedic wrote:
> On Mon, Dec 16, 2024 at 12:41 PM Andrey Semashev via Boost
> <boost_at_[hidden] <mailto:boost_at_[hidden]>> wrote:
>
> Another downside is that as soon as you choose boost::optional as a
> return value, proponents of std types everywhere will complain that the
> new interface doesn't compose well in their code bases. You couldn't
> choose std::optional as it doesn't support references (yet?), but if it
> did at some point, it would mean requiring a very recent C++ version,
> which will be a regression in compatibility for the existing Boost
> libraries. It would also exacerbate the boost::optional vs.
> std::optional argument.
>
> What is the point of vocabulary types like optional, variant and span if
> you cannot use them in library interfaces? Boost is "not std" and std is
> "too new", so is the solution to just give up? IMO Boost libraries
> should just use Boost vocabulary types, and those should have some
> convenience functions to interoperate with std types.

Convenience functions can get you only so far.

I have no problem with using Boost when Boost is better in my use case.
But not everyone agrees with this.