Boost logo

Boost :

From: Martin Wille (mw8329_at_[hidden])
Date: 2007-10-27 16:54:16

Peter Dimov wrote:
> Markus Schöpflin:
>> F=boost::reference_wrapper<single_grammar_object_task>]"
>> f();
>> ----------------^
>> Anyone knows what's going on?
> I think I do. The new Boost.Threads implements the proposed standard
> interface where F is expected to be a function object;
> std::reference_wrapper is, but boost::reference_wrapper isn't. The old
> Boost.Threads did not suffer from this problem since it stored F in a
> boost::function, which automatically recognizes reference_wrapper and
> "dereferences" it before the call.
> This can be fixed on the user side by wrapping the reference_wrapper in a
> boost::bind, or it can be fixed on the Boost.Threads side. The third option,
> making boost::reference_wrapper callable, is a very risky change that I
> would advise against.

(4) create a custom callable object. I'll look into that tomorrow. (I'd
rather not introduce an additional dependency for such a simple task.)

Thanks for the explanations,

Boost list run by bdawes at, gregod at, cpdaniel at, john at