13 Jul
2014
13 Jul
'14
9:48 a.m.
Andrey Semashev wrote:
Perhaps Eric could provide more context on why Boost.Proto needs recursive reference wrappers? Frankly, the requirement looks strange to me.
Generic code that does boost::reference_wrapper<T> r = boost::ref( t ); is broken when t is a reference_wrapper.
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... that is (I think) not affected by the removal of the collapsing overloads.