
"Jeffrey Lee Hellrung, Jr." <jeffrey.hellrung@gmail.com> writes:
On Fri, Apr 20, 2012 at 5:03 AM, Philipp Moeller < philipp.moeller@geometryfactory.com> wrote:
Given that Boost now has perfect forwarding emulation through Boost.Move and a better result_of, would it be possible to enable reference_wrapper to forward the function call operator?
The current behavior is somewhat surprising and makes a few of the most promising applications of reference_wrapper (reference wrap polymorphic boost::function objects) impossible with code that is no prepared to work with reference_wrapper. It would also be more consistent with reference_wrapper of the stdlib.
I can file a corresponding bug report and add a patch, if there is interest.
I think this would make a nice addition to the boost::reference_wrapper interface.
Isn't there a CRTP base class in Boost that aids in programming nearly-perfect forwarding in C++03?
I couldn't find it and did it with PP. I've added this as ticket #6876 [1] for boost::bind. I'm unsure if this belongs there or to some other component and the maintainer of bind seems inactive. So I would be glad if someone else could have a look at that patch, it might need some tweaking (especially the macro names). Footnotes: [1] https://svn.boost.org/trac/boost/ticket/6876 Cheers, Philipp Moeller