
1 Oct
2009
1 Oct
'09
10 a.m.
Hi!
please see my partial suggestion below...
On Thu, Oct 1, 2009 at 11:02 AM, Gennadiy Rozental
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
...
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_func... Regards, Ovanes