Commit 1b69c19e authored by Lee Howes's avatar Lee Howes Committed by Facebook Github Bot

Remove =deleted deprecated Future APIs

Summary: Functions were deprecated and =deleted to communicate their removal with a clear error rather than having the functions simply disappear. They have been in this state for long enough to cleanly remove them.

Reviewed By: yfeldblum

Differential Revision: D15057175

fbshipit-source-id: fc9bb193e3cc9157ef6b898f0e4b7717581c1cdd
parent 514a49f5
...@@ -572,9 +572,6 @@ class SemiFuture : private futures::detail::FutureBase<T> { ...@@ -572,9 +572,6 @@ class SemiFuture : private futures::detail::FutureBase<T> {
/// - `valid() == false` /// - `valid() == false`
T get() &&; T get() &&;
[[deprecated("must be rvalue-qualified, e.g., std::move(future).get()")]] T
get() & = delete;
/// Blocks until the semifuture is fulfilled, or until `dur` elapses. Returns /// Blocks until the semifuture is fulfilled, or until `dur` elapses. Returns
/// the value (moved-out), or throws the exception (which might be a /// the value (moved-out), or throws the exception (which might be a
/// FutureTimeout exception). /// FutureTimeout exception).
...@@ -588,9 +585,6 @@ class SemiFuture : private futures::detail::FutureBase<T> { ...@@ -588,9 +585,6 @@ class SemiFuture : private futures::detail::FutureBase<T> {
/// - `valid() == false` /// - `valid() == false`
T get(Duration dur) &&; T get(Duration dur) &&;
[[deprecated("must be rvalue-qualified, e.g., std::move(future).get(dur)")]] T
get(Duration dur) & = delete;
/// Blocks until the future is fulfilled. Returns the Try of the result /// Blocks until the future is fulfilled. Returns the Try of the result
/// (moved-out). /// (moved-out).
/// ///
...@@ -1129,12 +1123,6 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1129,12 +1123,6 @@ class Future : private futures::detail::FutureBase<T> {
/// attributes will be added in the near future. Please prefer thenValue, /// attributes will be added in the near future. Please prefer thenValue,
/// thenTry or thenError rather than then and onError as they avoid ambiguity /// thenTry or thenError rather than then and onError as they avoid ambiguity
/// when using polymorphic lambdas. /// when using polymorphic lambdas.
template <typename F, typename R = futures::detail::callableResult<T, F>>
[[deprecated("ERROR: use thenValue instead")]] typename std::enable_if<
!is_invocable<F>::value && is_invocable<F, T&&>::value,
typename R::Return>::type
then(F&& func) && = delete;
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< [[deprecated("ERROR: use thenTry instead")]] typename std::enable_if<
!is_invocable<F, T&&>::value && !is_invocable<F>::value, !is_invocable<F, T&&>::value && !is_invocable<F>::value,
...@@ -1143,19 +1131,6 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1143,19 +1131,6 @@ class Future : private futures::detail::FutureBase<T> {
return std::move(*this).thenTry(std::forward<F>(func)); return std::move(*this).thenTry(std::forward<F>(func));
} }
template <typename F, typename R = futures::detail::callableResult<T, F>>
[[deprecated(
"ERROR: use thenValue with auto&& or folly::Unit parameter instead")]]
typename std::enable_if<is_invocable<F>::value, typename R::Return>::type
then(F&& func) && = delete;
// clang-format off
template <typename F, typename R = futures::detail::callableResult<T, F>>
[[deprecated(
"must be rvalue-qualified, e.g., std::move(future).thenValue(...)")]]
typename R::Return then(F&& func) & = delete;
// clang-format on
/// Variant where func is an member function /// Variant where func is an member function
/// ///
/// struct Worker { R doWork(Try<T>); } /// struct Worker { R doWork(Try<T>); }
...@@ -1181,14 +1156,6 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1181,14 +1156,6 @@ class Future : private futures::detail::FutureBase<T> {
R (Caller::*func)(Args...), R (Caller::*func)(Args...),
Caller* instance) &&; Caller* instance) &&;
// clang-format off
template <typename R, typename Caller, typename... Args>
[[deprecated(
"must be rvalue-qualified, e.g., std::move(future).then(...)")]]
Future<typename isFuture<R>::Inner>
then(R (Caller::*func)(Args...), Caller* instance) & = delete;
// clang-format on
/// Execute the callback via the given Executor. The executor doesn't stick. /// Execute the callback via the given Executor. The executor doesn't stick.
/// ///
/// Contrast /// Contrast
...@@ -1236,11 +1203,6 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1236,11 +1203,6 @@ class Future : private futures::detail::FutureBase<T> {
return std::move(*this).then(func, instance).via(std::move(oldX)); return std::move(*this).then(func, instance).via(std::move(oldX));
} }
template <class Arg, class... Args>
[[deprecated(
"must be rvalue-qualified, e.g., std::move(future).then(...)")]] auto
then(Executor::KeepAlive<> x, Arg&& arg, Args&&... args) & = delete;
/// When this Future has completed, execute func which is a function that /// When this Future has completed, execute func which is a function that
/// can be called with `Try<T>&&` (often a lambda with parameter type /// can be called with `Try<T>&&` (often a lambda with parameter type
/// `auto&&` or `auto`). /// `auto&&` or `auto`).
...@@ -1413,12 +1375,6 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1413,12 +1375,6 @@ class Future : private futures::detail::FutureBase<T> {
/// - `RESULT.valid() == true` /// - `RESULT.valid() == true`
Future<Unit> then() &&; Future<Unit> then() &&;
// clang-format off
[[deprecated(
"must be rvalue-qualified, e.g., std::move(future).thenValue()")]]
Future<Unit> then() & = delete;
// clang-format on
/// Convenience method for ignoring the value and creating a Future<Unit>. /// Convenience method for ignoring the value and creating a Future<Unit>.
/// Exceptions still propagate. /// Exceptions still propagate.
/// This function is identical to parameterless .then(). /// This function is identical to parameterless .then().
...@@ -1639,9 +1595,6 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1639,9 +1595,6 @@ class Future : private futures::detail::FutureBase<T> {
/// - `valid() == false` /// - `valid() == false`
T get() &&; T get() &&;
[[deprecated("must be rvalue-qualified, e.g., std::move(future).get()")]] T
get() & = delete;
/// Blocks until the future is fulfilled, or until `dur` elapses. Returns the /// Blocks until the future is fulfilled, or until `dur` elapses. Returns the
/// value (moved-out), or throws the exception (which might be a FutureTimeout /// value (moved-out), or throws the exception (which might be a FutureTimeout
/// exception). /// exception).
...@@ -1655,9 +1608,6 @@ class Future : private futures::detail::FutureBase<T> { ...@@ -1655,9 +1608,6 @@ class Future : private futures::detail::FutureBase<T> {
/// - `valid() == false` /// - `valid() == false`
T get(Duration dur) &&; T get(Duration dur) &&;
[[deprecated("must be rvalue-qualified, e.g., std::move(future).get(dur)")]] T
get(Duration dur) & = delete;
/// A reference to the Try of the value /// A reference to the Try of the value
/// ///
/// Preconditions: /// Preconditions:
......
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