Future: some fixes re: handling of universal references
authorSven Over <over@fb.com>
Wed, 31 May 2017 16:43:09 +0000 (09:43 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 31 May 2017 16:50:33 +0000 (09:50 -0700)
commit8401bbaffc06e05b14ea7057842b7ed2804375c0
tree46563c4d9148998082f25d4f79917bc804a011a7
parentba9034b9647da166a87ef42583415fbcc8127255
Future: some fixes re: handling of universal references

Summary:
Callables that are passed as rvalues to makeFutureWith should be
executed as rvalues.
Generally callables that get captured by value should be executed
as rvalues, to allow passing e.g. folly::Partial objects that contain
move-only objects like unique_ptr or folly::Promise.
`collect` would move out of parameters passed as lvalues.

Reviewed By: fugalh

Differential Revision: D5120420

fbshipit-source-id: 1633c6b7e3fbb562f4d31e21d28c98b053de9912
folly/futures/Future-inl.h
folly/futures/detail/Core.h
folly/futures/helpers.h