$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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 ) ;