Boost logo

Boost :

Subject: [boost] [reference_wrapper] add operator()(Args...) to reference_wrapper
From: Philipp Moeller (philipp.moeller_at_[hidden])
Date: 2012-04-20 08:03:28


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.

Cheers,
Philipp Moeller


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