Skip to content

Commit

Permalink
add std::move in register_shutdown_function
Browse files Browse the repository at this point in the history
  • Loading branch information
apolyakov committed Jan 18, 2025
1 parent c869bf0 commit 36e61c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime-light/stdlib/server/handler-functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ requires(std::invocable<F, Args...>) void f$register_shutdown_function(F &&f, Ar
auto shutdown_function_task{std::invoke(
[](F f, Args... args) noexcept -> task_t<void> {
if constexpr (is_async_function_v<F, Args...>) {
co_await std::invoke(f, args...);
co_await std::invoke(std::move(f), std::move(args)...);
} else {
std::invoke(f, args...);
std::invoke(std::move(f), std::move(args)...);
}
},
std::forward<F>(f), std::forward<Args>(args)...)};
Expand Down

0 comments on commit 36e61c9

Please sign in to comment.