Hi Kenton,
in [1] you give an example of joining two Promise<void>s to produce a
Promise<void> that is fulfilled when both other promises have fulfilled (to
chain a list of related promises, avoiding a TaskSet and allowing to wait
on the result).
In Capnp 6.0.1 using g++ 5.4.0 this gives me the following error:
error: no matching function for call to ‘joinPromises(<brace-enclosed
initializer list>)’
tasks = kj::joinPromises({kj::mv(tasks), kj::mv(newTask)});
/usr/local/include/kj/async.h:312:24: note: candidate: kj::Promise<void>
kj::joinPromises(kj::Array<kj::Promise<void> >&&)
friend Promise<void> joinPromises(Array<Promise<void>>&& promises);
^
/usr/local/include/kj/async.h:312:24: note: no known conversion for
argument 1 from ‘<brace-enclosed initializer list>’ to
‘kj::Array<kj::Promise<void> >&&’
Has something changed here to make this no longer possible? Do I have to
use an ArrayBuilder? Is there some other way to join Promise<void>s without
needing to allocate an Array?
Thanks!
Johannes
[1] https://github.com/capnproto/capnproto/issues/286#issuecomment-185975985
--
You received this message because you are subscribed to the Google Groups
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/capnproto.