Properly constrain the Future(T2&&) constructor
Summary: The `Future(T2&&)` constructor is currently constrained to disallow other `Future` and `SemiFuture` types, but it allows types which will cause a hard error when instantiating the body of the constructor. The constructor argument is later used to initialize a `Try<T>`, so the function should properly be constrained with `std::is_constructible<Try<T>, T2>::value`. Also, add the same constraint to the `SemiFuture(T2&&)` constructor, and to the `FutureBase(T2&&)` constructor for good measure. Reviewed By: yfeldblum Differential Revision: D19782313 fbshipit-source-id: 5e1ef5425b0c7ab9cc76c998425e90d0ba0b148f
Showing
Please register or sign in to comment