Commit 346d9d76 authored by Lee Howes's avatar Lee Howes Committed by Facebook Github Bot

deferError was not r-value qualified but should have been.

Summary: When cleaning up the interface with r-value qualification for SemiFuture it seems we missed deferError.

Reviewed By: yfeldblum

Differential Revision: D7942259

fbshipit-source-id: c0cf05eb2b6357e6f6eb3fab6aef87ec6416caf7
parent a56c4e05
......@@ -755,7 +755,7 @@ typename std::enable_if<
!futures::detail::callableWith<F, exception_wrapper&>::value &&
!futures::detail::Extract<F>::ReturnsFuture::value,
SemiFuture<T>>::type
SemiFuture<T>::deferError(F&& func) {
SemiFuture<T>::deferError(F&& func) && {
using Exn =
std::remove_reference_t<typename futures::detail::Extract<F>::FirstArg>;
return std::move(*this).defer(
......@@ -775,7 +775,7 @@ typename std::enable_if<
!futures::detail::callableWith<F, exception_wrapper&>::value &&
futures::detail::Extract<F>::ReturnsFuture::value,
SemiFuture<T>>::type
SemiFuture<T>::deferError(F&& func) {
SemiFuture<T>::deferError(F&& func) && {
using Exn =
std::remove_reference_t<typename futures::detail::Extract<F>::FirstArg>;
return std::move(*this).defer(
......@@ -794,7 +794,7 @@ typename std::enable_if<
futures::detail::callableWith<F, exception_wrapper>::value &&
!futures::detail::Extract<F>::ReturnsFuture::value,
SemiFuture<T>>::type
SemiFuture<T>::deferError(F&& func) {
SemiFuture<T>::deferError(F&& func) && {
return std::move(*this).defer(
[func = std::forward<F>(func)](Try<T> t) mutable {
if (t.hasException()) {
......@@ -811,7 +811,7 @@ typename std::enable_if<
futures::detail::callableWith<F, exception_wrapper>::value &&
futures::detail::Extract<F>::ReturnsFuture::value,
SemiFuture<T>>::type
SemiFuture<T>::deferError(F&& func) {
SemiFuture<T>::deferError(F&& func) && {
return std::move(*this).defer(
[func = std::forward<F>(func)](Try<T> t) mutable {
if (t.hasException()) {
......
......@@ -364,7 +364,7 @@ class SemiFuture : private futures::detail::FutureBase<T> {
!futures::detail::callableWith<F, exception_wrapper&>::value &&
!futures::detail::Extract<F>::ReturnsFuture::value,
SemiFuture<T>>::type
deferError(F&& func);
deferError(F&& func) &&;
/// Overload of deferError where the error callback returns a Future<T>
template <class F>
......@@ -373,7 +373,7 @@ class SemiFuture : private futures::detail::FutureBase<T> {
!futures::detail::callableWith<F, exception_wrapper&>::value &&
futures::detail::Extract<F>::ReturnsFuture::value,
SemiFuture<T>>::type
deferError(F&& func);
deferError(F&& func) &&;
/// Overload of deferError that takes exception_wrapper and returns T
template <class F>
......@@ -381,7 +381,7 @@ class SemiFuture : private futures::detail::FutureBase<T> {
futures::detail::callableWith<F, exception_wrapper>::value &&
!futures::detail::Extract<F>::ReturnsFuture::value,
SemiFuture<T>>::type
deferError(F&& func);
deferError(F&& func) &&;
/// Overload of deferError that takes exception_wrapper and returns Future<T>
template <class F>
......@@ -389,7 +389,7 @@ class SemiFuture : private futures::detail::FutureBase<T> {
futures::detail::callableWith<F, exception_wrapper>::value &&
futures::detail::Extract<F>::ReturnsFuture::value,
SemiFuture<T>>::type
deferError(F&& func);
deferError(F&& func) &&;
/// Return a future that completes inline, as if the future had no executor.
/// Intended for porting legacy code without behavioural change, and for rare
......
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