1
0
Fork 0

Remove std::move as it prevents copy elision (#9144)

This commit is contained in:
Markus Pfeiffer 2019-05-30 14:51:57 +01:00 committed by Jan
parent 3323cdcc28
commit 844c6f74ce
1 changed files with 6 additions and 6 deletions

View File

@ -326,7 +326,7 @@ class Future {
}));
}
});
return std::move(future);
return future;
}
/// Variant: callable accepts T&&, returns future
@ -358,7 +358,7 @@ class Future {
}
}
});
return std::move(future);
return future;
}
/// Variant: callable accepts Try<T&&>, returns value
@ -380,7 +380,7 @@ class Future {
return futures::invoke(std::forward<DF>(fn), std::move(t));
}));
});
return std::move(future);
return future;
}
/// Variant: callable accepts Try<T&&>, returns future
@ -404,7 +404,7 @@ class Future {
pr.setException(std::current_exception());
}
});
return std::move(future);
return future;
}
/// Variant: function returns void and accepts Try<T>&&
@ -442,7 +442,7 @@ class Future {
pr.setTry(std::move(t));
}
});
return std::move(future);
return future;
}
/// Set an error continuation for this Future where the continuation can
@ -476,7 +476,7 @@ class Future {
pr.setTry(std::move(t));
}
});
return std::move(future);
return future;
}
private: