|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-01-05 09:39:37
Jason House wrote:
>> template<typename T0>
>> struct type_wrapper1<void,T0>{
>> static double wrap(boost::function1<void,T0>* callback_function,
>> double cmd){ unsigned int position;
>> T0 a0;
>> (*callback_function)(a0);
>> };
>> };
>>
>> };
>>
>> template<typename R0, typename T0>
>> GTPFunctionObject* GTPCommandCallBack1(boost::function1<R0,T0>
>> *callback_function){ return new
>> GTPFunctionObject(boost::lambda::bind((gtp_detail::type_wrapper1<R0,T0>::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. :-)
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