
1 Nov
2007
1 Nov
'07
10:23 a.m.
Doug Gregor skrev:
On Oct 30, 2007, at 6:22 PM, Thorsten Ottosen wrote:
Is there any good reason that boost::reference_wrapper() does not provide a forwarding operator()(), so that we may use it to pass function objects by reference to algorithms?
The only reason is laziness. I hacked up a partial implementation in the sandbox, but I never finished it.
Are you using the preprocessor to generate the overloads? One could probably manually provide up to four arguments ... I assume this is more than enough, since the main use-case would be when passing a function object to an algorithm, in which case the mojaority of cases would be 1 or 2 arguments. -Thorsten