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@keywallet.com> 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