std::exception_ptr e;
Baton baton;
-#ifdef __clang__
-#pragma clang diagnostic push // ignore generalized lambda capture warning
-#pragma clang diagnostic ignored "-Wc++1y-extensions"
-#endif
auto taskFunc = [&tasksTodo, &e, &f, &baton](size_t id, FuncType&& func) {
return [
id,
}
};
};
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
auto firstTask = first;
++first;
await([first, last, context](Promise<void> promise) mutable {
context->promise = std::move(promise);
for (size_t i = 0; first != last; ++i, ++first) {
-#ifdef __clang__
-#pragma clang diagnostic push // ignore generalized lambda capture warning
-#pragma clang diagnostic ignored "-Wc++1y-extensions"
-#endif
addTask([ i, context, f = std::move(*first) ]() {
try {
auto result = f();
context->promise->setValue();
}
});
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
}
});
await([first, last, context](Promise<void> promise) mutable {
context->promise = std::move(promise);
for (size_t i = 0; first != last; ++i, ++first) {
-#ifdef __clang__
-#pragma clang diagnostic push // ignore generalized lambda capture warning
-#pragma clang diagnostic ignored "-Wc++1y-extensions"
-#endif
addTask([ i, context, f = std::move(*first) ]() {
try {
f();
context->promise->setValue();
}
});
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
}
});