|
Boost Users : |
Subject: Re: [Boost-users] [traits/function_types/generic] Can F be called with{a0, ..., aN}?
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-03-03 09:53:04
Jesse Perla wrote:
> Yup. I think it is very useful. Though without getting it to work with
> phoenix
> or std::tr1::bind, I think it have limited appeal. I also would guess
> (though haven't tested) that the trick fails with boost::function as well.
I have it working in conjunction with Boost.Function. I extended
boost::function_types::parameter_types<T> to also work for boost::function.
Then, if the expression
is_callable< some_unknown_functor, boost_function_parameter_types >
evaluates to true, then I can do the assignment (the right one from a
variant of functions),
boost::function< known_signature > = some_unknown_functor
this works fine (the parameter types come from the boost::function). What do
you mean exactly by support for bind? As long as you supply the parameters,
it should work. I.e.,
is_callable< unknown_bind_expression, known_parameters >
should also work. Could you provide an example / test case?
Thanks,
Rutger
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net