Subject: Re: [boost] Boost.Fiber review January 6-15
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2014-01-22 07:30:59
Le 22/01/14 03:39, Nat Goodspeed a écrit :
> On Wed, Jan 15, 2014 at 8:56 PM, Agustín K-ballo Bergé
> <kaballo86_at_[hidden]> wrote:
>> - The lack of a variadic constructor for `fiber` and variadic arguments for
>> `async` makes it difficult to use the library correctly (even in the
>> presence of C++14 lambdas). The semantic of those calls is that of a
>> deferred call, which is difficult to achieve otherwise (note that `bind`
>> doesn't help here).
> The review report (which I am writing now!) does not depend on my
> understanding this point, but on rereading your mail I realized I do
> not yet understand it. In my (obviously incomplete) mental model, a
> hypothetical fiber constructor:
> fiber f(some_callable, 3.14, "a string", 17);
> would be completely equivalent to:
> fiber f(bind(some_callable, 3.14, "a string", 17));
> What am I missing? (If this is already well-explained elsewhere, I
> would appreciate a pointer as much as your own explanation.)
boost::bind is not movable :( or is it in C++11?)
> Oliver may well understand your point already. But if you asked me to
> implement a variadic fiber constructor (and async() function), I would
> immediately forward to bind() inside each. Would that be a sufficient
> implementation? If not, why not?
> A broader question to those who requested a variadic fiber constructor
> (and async()): is it sufficient to provide that support only when the
> compiler supports variadic templates, or are you asking for the whole
> ugly C++03 workaround as well?
From my side this variadic versions must be provided for C++11
compilers at least. Any attempt to make the C++98 interface close to the
C++11 would be welcome.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk