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> {
/// - `valid() == false`
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
/// the value (moved-out), or throws the exception (which might be a
/// FutureTimeout exception).
......@@ -588,9 +585,6 @@ class SemiFuture : private futures::detail::FutureBase<T> {
/// - `valid() == false`
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
/// (moved-out).
///
......@@ -1129,12 +1123,6 @@ class Future : private futures::detail::FutureBase<T> {
/// 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>>
[[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>>
[[deprecated("ERROR: use thenTry instead")]] typename std::enable_if<
!is_invocable<F, T&&>::value && !is_invocable<F>::value,
......@@ -1143,19 +1131,6 @@ class Future : private futures::detail::FutureBase<T> {
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
///
/// struct Worker { R doWork(Try<T>); }
......@@ -1181,14 +1156,6 @@ class Future : private futures::detail::FutureBase<T> {
R (Caller::*func)(Args...),
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.
///
/// Contrast
......@@ -1236,11 +1203,6 @@ class Future : private futures::detail::FutureBase<T> {
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
/// can be called with `Try<T>&&` (often a lambda with parameter type
/// `auto&&` or `auto`).
......@@ -1413,12 +1375,6 @@ class Future : private futures::detail::FutureBase<T> {
/// - `RESULT.valid() == true`
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>.
/// Exceptions still propagate.
/// This function is identical to parameterless .then().
......@@ -1639,9 +1595,6 @@ class Future : private futures::detail::FutureBase<T> {
/// - `valid() == false`
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
/// value (moved-out), or throws the exception (which might be a FutureTimeout
/// exception).
......@@ -1655,9 +1608,6 @@ class Future : private futures::detail::FutureBase<T> {
/// - `valid() == false`
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
///
/// 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