18 Sep
2008
18 Sep
'08
7:59 p.m.
Do function_traits work with functors? I tried with struct XYZ { bool operator() (int x) const { return x+2; } }; template<typename FUNCTION> class BindingImpl1xxx { public: typedef FUNCTION function; typedef typename boost::function_traits<FUNCTION>::result_type res_type; typedef typename boost::function_traits<FUNCTION>::arg1_type arg1_type; }; but the following won't compile: XYZ xyz; BindingImpl1xxx<XYZ> xxx(xyz); Is there a way to achieve the function_traits functionality with function_traits or some other type_traits? Thank you. Christoph