
12 May
2006
12 May
'06
7:18 p.m.
jbd wrote:
template
boost::function mybind(Ret (*Func)(Arg1)) { boost::function f(Func) ; return f ; }
[...]
// doesn't work : // boost::function < void (int) > f2( boost::bind(&bar2) ) ;
// this is ok boost::function < void (int) > f3( mybind(&bar2) ) ;
It isn't clear why do you need to bind bar2 at all, instead of just using boost::function < void (int) > f3( &bar2 ) ;