Boost logo

Boost :

Subject: Re: [boost] [core] Breaking change to boost::ref in 1.56
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2014-07-13 05:41:42


On Sunday 13 July 2014 12:06:56 Peter Dimov wrote:
> Eric Niebler wrote:
> > While investigating a failure[^1] in proto, I discovered the following
> > change to boost::ref:
> >
> > https://github.com/boostorg/core/commit/af629ffa59094048c335609f285afe342f
> > d1f1e4
> >
> > This failure was caused by the following change to boost::ref by Agustín
> > Bergé (K-ballo):
> >
> > https://github.com/boostorg/core/commit/af629ffa59094048c335609f285afe342f
> > d1f1e4
> >
> > 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?
>
> We want to revert the change, unless someone (quickly) succeeds in
> convincing us not to.

Perhaps Eric could provide more context on why Boost.Proto needs recursive
reference wrappers? Frankly, the requirement looks strange to me.

I'm not strongly opposed to reverting, but the change looks justified enough
to me. Allowing dangling reference wrappers is surely not the correct
behavior.


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