Content-conversion constructors for Future
authorPhil Willoughby <philwill@fb.com>
Mon, 3 Jul 2017 12:55:21 +0000 (05:55 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 3 Jul 2017 13:05:19 +0000 (06:05 -0700)
commit8bedb7e1549c4a737d3ad4d7003ab9e195cd9fd9
tree67caba0e5a844a6c27b0657e1165bf8338135659
parentdedaae98309f8412f4fe33d624ce38c344117c73
Content-conversion constructors for Future

Summary:
Allows you to construct a `Future<A>` from a `Future<B>` if A can be constructed from `B&&`.

The constructor is `implicit` if and only if `B&&` is convertible to `A`.

This is the same philosophy as Optional, and has the same use-cases.

Reviewed By: yfeldblum

Differential Revision: D5264185

fbshipit-source-id: e2fae373ab549c186a69dc5f4e32481ef7b11bba
folly/futures/Future-inl.h
folly/futures/Future.h
folly/futures/test/ConversionOperatorTest.cpp [new file with mode: 0644]
folly/futures/test/ThenTest.cpp
folly/test/Makefile.am