this is a leftover of
260a702ba983f1bca29d4c8d1e28f3eef46c6699. where we
bumped up the Seastar API level to 5, in which seastar::internal::monostate
is used to represent the stored state of a future instead of a tuple<>.
to address FTBFS with GCC-9.2.1
Signed-off-by: Kefu Chai <kchai@redhat.com>
[[gnu::always_inline]]
static inline type invoke(Func&& func, FuncArgs&&... args) noexcept {
try {
- return func(std::forward<FuncArgs>(args)...);
+ return func(std::forward<FuncArgs>(args)...);
} catch (...) {
- return make_exception_future(std::current_exception());
+ return make_exception_future(std::current_exception());
+ }
+ }
+
+ template <class Func>
+ [[gnu::always_inline]]
+ static type invoke(Func&& func, seastar::internal::monostate) noexcept {
+ try {
+ return func();
+ } catch (...) {
+ return make_exception_future(std::current_exception());
}
}