Subject: Re: [Boost-users] [bind] Binding a bound function does not compile
From: Roman Perepelitsa (roman.perepelitsa_at_[hidden])
Date: 2009-11-17 14:07:43


2009/11/17 Eugene Yakubovich <eyakubovich_at_[hidden]>

> Hello,
>
> The following code does not compile (gcc 4.3.2, boost 1.40).
>
> #include <boost/bind.hpp>
> using boost::bind;
>
> void foo(int) {}
>
> template <class F>
> void invoker(F f) { f(); }
>
> template <class F>
> void call(F f)
> {
> bind(invoker<F>, f)();
>

try this:
  bind(invoker<F>, boost::protect(f))();

Roman Perepelitsa.