Skip to content

Commit

Permalink
include/seastar/core/future.hh: Keep aa4a648
Browse files Browse the repository at this point in the history
```
Revert "future: add concept constraints to handle_exception()"
Ceph is stilling using errorated future with handle_exception(), but
errorated future is not a seastar::Futuer<>. so we need to revert this
change at this moment.

This reverts commit 955c584.
```

See: aa4a648

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
  • Loading branch information
Matan-B committed Jul 7, 2024
1 parent 378b776 commit f04c002
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/seastar/core/future.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1718,10 +1718,12 @@ public:
/// successful value; Because handle_exception() is used here on a
/// future<>, the handler function does not need to return anything.
template <typename Func>
/* Broken?
requires std::is_invocable_r_v<future<T> ,Func, std::exception_ptr>
|| (std::tuple_size_v<tuple_type> == 0 && std::is_invocable_r_v<void, Func, std::exception_ptr>)
|| (std::tuple_size_v<tuple_type> == 1 && std::is_invocable_r_v<T, Func, std::exception_ptr>)
|| (std::tuple_size_v<tuple_type> > 1 && std::is_invocable_r_v<tuple_type ,Func, std::exception_ptr>)
*/
future<T> handle_exception(Func&& func) noexcept {
return then_wrapped([func = std::forward<Func>(func)]
(auto&& fut) mutable -> future<T> {
Expand Down

0 comments on commit f04c002

Please sign in to comment.