Opened 10 years ago

#6876 new Patches

Add forwarding of operator() to reference_wrapper

Reported by: philipp.moeller@… Owned by: Peter Dimov
Milestone: To Be Determined Component: bind
Version: Boost Release Branch Severity: Problem
Keywords: Cc:

Description

Adding forwarding of operator() to reference_wrapper will make it comply with the ISO definition of reference_wrapper. The attached patch adds dependencies to Boost.Move and Boost.Preprocessor. The later could be removed by manually expanding the macro. Forwarding in C++03 only works for values, references-to-const and rvalues as this is what Boost.Move provides. In C++11, forwarding works as expected for all kind of values. It might be necessary to make the amount of forwarded arguments configurable, currently it is fixed to 8.

Attachments (1)

add_forwarding_to_ref.patch (1.9 KB ) - added by philipp.moeller@… 10 years ago.
patch to add forwarding of operator() to reference_wrapper

Download all attachments as: .zip

Change History (1)

by philipp.moeller@…, 10 years ago

Attachment: add_forwarding_to_ref.patch added

patch to add forwarding of operator() to reference_wrapper

Note: See TracTickets for help on using tickets.