makeFuture(Try<T>&&)
Summary:
@override-unit-failures
Add makeFuture variant which extracts the result contained in a Try and sticks it in a Future
One use case:
```
template <typename Result, typename Op, typename... Args>
Future<Result> wrapper(Op op, Args&&... args) {
// ... do some stuff before...
return op(std::forward<Args>(args)...).then([] (Try<Result>&& t) {
// ... do some stuff after...
return makeFuture<Result>(std::move(t));
});
}
```
With this makeFuture variant, "wrapper" doesn't need to be specialized for when
Result is void
Test Plan: employed in my code, will link to diff when ready
Reviewed By: hans@fb.com
FB internal diff:
D1318047