On 13/07/2014 01:18 p.m., Peter Dimov wrote:
Agustín K-ballo Bergé wrote:
I have been going over the changes and I recall some more stuff now. Before I disabled creating references to rvalues, `boost::ref` was doing "accidental reference collapsing" for two levels of wrapping.
I'm not sure I understand. Can you post the code example that demonstrates the accidental collapsing before the rvalue change?
As mentioned in the pull request, cases like the following: int i= 0; boost::reference_wrapper<int> r = boost::ref(boost::ref(i)); were performing "accidental collapsing", as it triggers an implicit conversion followed by a (possibly elided) copy construction. After the rvalue change, and without explicit collapsing, this results in a compilation error. Regards, -- Agustín K-ballo Bergé.- http://talesofcpp.fusionfenix.com