5 Jan
2007
5 Jan
'07
2:39 p.m.
Jason House wrote:
template<typename T0> struct type_wrapper1
{ static double wrap(boost::function1 * callback_function, double cmd){ unsigned int position; T0 a0; (*callback_function)(a0); }; }; };
template
GTPFunctionObject* GTPCommandCallBack1(boost::function1 *callback_function){ return new GTPFunctionObject(boost::lambda::bind((gtp_detail::type_wrapper1 ::wrap),boost::lambda::_1));
I've no idea what are you trying to do here, but wrap takes two arguments, and you only pass one. Probably a missing "callback_function," before the _1. Why are you allocating the function1 on the heap? Once you put it into lambda::bind it would be hard to not leak it. :-)