Boost logo

Boost :

Subject: Re: [boost] [core] Breaking change to boost::ref in 1.56
From: Michael Caisse (mcaisse-lists_at_[hidden])
Date: 2014-07-13 01:17:56


On 07/12/2014 09:54 PM, Eric Niebler wrote:
> (Repost in a new thread)
>
> While investigating a failure[^1] in proto, I discovered the following
> change to boost::ref:
>
> https://github.com/boostorg/core/commit/af629ffa59094048c335609f285afe342fd1f1e4
>
> This failure was caused by the following change to boost::ref by Agustín
> Bergé (K-ballo):
>
> https://github.com/boostorg/core/commit/af629ffa59094048c335609f285afe342fd1f1e4
>
> I didn't see any discussion about this change. (Was there one?) I can
> guess why it was made: to make boost::ref behave like std::ref, which
> does "reference collapsing" with reference_wrapper (which IMO is broken,
> and I unsuccessfully argued that in the committee when this was voted
> in). The problem is, it's a breaking interface change to one of the
> oldest, most heavily used, and stable pieces of Boost. It pretty
> massively breaks a major part of Boost.Proto's interface
> (proto::make_expr). I've hacked around the problem in Proto's tests, but
> this is going to break end-user code, and I don't know what I'm going to
> tell people.
>
> I don't like differences between boost and std. But I also don't like
> breaking code. What do we want here?
>
> Eric
>

I am *not* a fan of making existing Boost libraries behave like std
libraries. I'm also not a fan of Boost libraries that automatically use
the std version when one is available ... but that is a slightly
different and related problem.

Maybe Agustín can chime in about the motivation for the change. If it is
simply to make boost::ref behave like std::ref, then I would encourage
the change to be reverted.

michael

-- 
Michael Caisse
ciere consulting
ciere.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk