Commit e3f27085 authored by Alexey Kozhevnikov's avatar Alexey Kozhevnikov Committed by Facebook Github Bot

Fix futures MSVC compilation issue

Summary:
MSVC (14.12.25827, VS 2017 15.5) fails to compile with internal error when using `/std:c++14` parameter:
```
Future-inl.h(1484): fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'msc1.cpp', line 1507)
 To work around this problem, try simplifying or changing the program near the locations listed above.
```

Reviewed By: yfeldblum, Orvid

Differential Revision: D10018915

fbshipit-source-id: ba886265b68684aacc2bf471c79ba6c39e611c8e
parent 0964862b
......@@ -1479,10 +1479,10 @@ collectAllSemiFuture(Fs&&... fs) {
auto future = ctx->p.getSemiFuture();
if (!executors.empty()) {
future = std::move(future).defer(
[](Try<typename decltype(future)::value_type>&& t) {
return std::move(t).value();
});
auto work = [](Try<typename decltype(future)::value_type>&& t) {
return std::move(t).value();
};
future = std::move(future).defer(work);
auto deferredExecutor = futures::detail::getDeferredExecutor(future);
deferredExecutor->setNestedExecutors(std::move(executors));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment