Commit 05a81b12 authored by Lee Howes's avatar Lee Howes Committed by Facebook Github Bot

Remove deprecation from then that simply forwards to thenTry. Deprecation was...

Remove deprecation from then that simply forwards to thenTry. Deprecation was inconsistent with defer.

Summary: Future::then that forwards directly to thenTry is to be left for compatibility with Future::defer and to keep naming simple. This removes the confusing deprecation warning.

Reviewed By: yfeldblum

Differential Revision: D15057215

fbshipit-source-id: 84103e47c958f1db602804f625591ba899e98b23
parent 1b69c19e
...@@ -1119,12 +1119,8 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1119,12 +1119,8 @@ class Future : private futures::detail::FutureBase<T> {
/// - Calling code should act as if `valid() == false`, /// - Calling code should act as if `valid() == false`,
/// i.e., as if `*this` was moved into RESULT. /// i.e., as if `*this` was moved into RESULT.
/// - `RESULT.valid() == true` /// - `RESULT.valid() == true`
/// NOTE: All three of these variations are deprecated and deprecation
/// attributes will be added in the near future. Please prefer thenValue,
/// thenTry or thenError rather than then and onError as they avoid ambiguity
/// when using polymorphic lambdas.
template <typename F, typename R = futures::detail::callableResult<T, F>> template <typename F, typename R = futures::detail::callableResult<T, F>>
[[deprecated("ERROR: use thenTry instead")]] typename std::enable_if< typename std::enable_if<
!is_invocable<F, T&&>::value && !is_invocable<F>::value, !is_invocable<F, T&&>::value && !is_invocable<F>::value,
typename R::Return>::type typename R::Return>::type
then(F&& func) && { then(F&& func) && {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment