|
Boost Users : |
Subject: Re: [Boost-users] [function/bind] function object type introspection
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2009-10-01 06:00:23
Hi!
please see my partial suggestion below...
On Thu, Oct 1, 2009 at 11:02 AM, Gennadiy Rozental <rogeeff_at_[hidden]>wrote:
> Hi,
>
> ....
> Now I need to implement object maker
>
> template<typename F>
> boost::shared_ptr<AnstractFunctor>
> make_functor( F f )
> {
> typedef boost::function<???> TypeName;
> return boost::shared_ptr<AbstrctFunctor>(
> new ConcreteFunctor<FuncType>( f ) );
> }
>
> I was able to work fine with free functions by just removing pointer from
> F. Now to the questions:
>
> 1. How do I deduce boost::function type from pointer to member functions:
>
> Essentially if F is R (A::*)(T1,T2) I need to get
> boost::function<T (A*,T1,T2)>
>
> ...
>
Is may be Boost.FunctionTypes what you are looking for?
http://www.boost.org/doc/libs/1_40_0/libs/function_types/doc/html/boost_functiontypes/introduction.html
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