|
Boost Users : |
Subject: Re: [Boost-users] [function/bind] function object type introspection
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2009-10-01 08:19:37
BTW, you can use enable if and is_function_pointer to allow passing function
pointers only. In case with the function objects you need to implement other
inspection strategies.
On Thu, Oct 1, 2009 at 2:10 PM, Ovanes Markarian <om_boost_at_[hidden]>wrote:
>
>> function_type expects mpl sequense.
>>
>> As far as I understand it, you need to apply result_type to your F and
> parameter_types to F. From there you can model your function. Or am I wrong?
>
> template<class F>
> some_return_type make_function(F f)
> {
> typedef typename result_type<F>::type result_type;
> typedef typename parameter_types<F>::type mpl_seq_params;
>
> //insert the result type to the mpl_seq_params => fct_sig;
>
> ...
> }
>
> But I am not sure if it works, this is my assumption only.
>
>
> Regards,
> Ovanes
>
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