
AMDG Olaf Krzikalla wrote:
Steven Watanabe wrote:
Boost.Function doesn't provide such a utility. I can't see a way to get this information out of boost::bind using the public interface, either. visit_each skips placeholders.
IMHO it should be a feature of boost::function.
I strongly disagree. a) It requires Boost.Function to treat function object created by Boost.Bind specially. b) Most people don't need it and it will add overhead even when it isn't used.
uses_placeholder2(false), f(t) { // do some magic to find which arguments are used. }
But what is the magic here?
It would have to peek at the Boost.Bind internals, I think.
I'm aware that the implementation won't be that easy, esp. the static computing of the type of fn_result could become difficult.
You would need to specify fn_result as a top level template parameter. Also, there are serious problems with the multiple dispatching required to do the binding. In Christ, Steven Watanabe