In-place construction for Future v2017.07.10.00
authorYedidya Feldblum <yfeldblum@fb.com>
Sun, 9 Jul 2017 03:59:42 +0000 (20:59 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sun, 9 Jul 2017 04:07:06 +0000 (21:07 -0700)
commite8527d2e4bfa7dc4538155f38f3374d997dd2f9b
tree03f76773b1d7c5c78e5991b87fe56c5d154d1620
parent18046154bb4e4d10ceed8e1a407eb9cfaab5f4b8
In-place construction for Future

Summary:
[Folly] In-place construction for `Future`.

Using `in_place` as the first argument. Avoid constructing a contained object and then moving it into the `Future`, which may be more expensive, by providing an unambiguous way to specify perfect forwarding.

And a matching overload of `makeFuture` for no particularly good reason.

Differential Revision: D5362324

fbshipit-source-id: e612965f34ed0fae5fac17db631f7eab9984c696
folly/futures/Future-inl.h
folly/futures/Future.h
folly/futures/detail/Core.h
folly/futures/test/FutureTest.cpp