Date: 2001-10-18 09:16:31
I have been experimenting with the boost bind library, and in
particular have modified it so that it passes arguments by value or
reference as defined by the function's signature, so that ref() need
not be used.
Also, one can now pass temporaries as arguments.
This only works with functions and member functions for now- I have
left function objects with their current by-value default argument
passing semantics. (It could be extended to function objects either
by binding a pointer to the operator() member function (which assumes
a single non-overloaded operator() and, in any case, would require a
typeof facility to implement transparently), or by requiring member
argument types and arity in the function object).
I have found this new behaviour to be more useful and intuitive
especially for mutating local functions which need pass-by-reference
to accumulate results.
Anyway, I have uploaded the changed files in "bind_ext.zip" in case
anyone else wants to experiment with this. (You will need Intel 5 to
compile under Windows).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk