|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-05-12 15:18:57
jbd wrote:
> template <typename Ret, typename Arg1>
> boost::function<Ret (Arg1)> mybind(Ret (*Func)(Arg1))
> {
> boost::function<Ret (Arg1)> 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 ) ;
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