On 13/07/2014 07:16 a.m., Andrey Semashev wrote:
On Sunday 13 July 2014 12:48:30 Peter Dimov wrote:
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.
Dangling reference wrappers are prevented by a separate and independent change
https://github.com/boostorg/core/commit/45f7564db29a3bafa5dfd8c41396843493d1 378a
that is (I think) not affected by the removal of the collapsing overloads.
Ok, good. I take it that the motivating example:
boost::ref(boost::ref(t));
should not compile then?
IIRC, the change was motivated by that dubious case of `boost::ref(boost::ref(t))` which was working, although not in an obvious way, and stopped working after disabling references to rvalues. I'm fine with reverting this, please anyone with commit access go ahead and do it. Meanwhile, I too am interested in knowing why Proto needs this. Regards, -- Agustín K-ballo Bergé.- http://talesofcpp.fusionfenix.com