Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kingcrimsontianyu committed Feb 1, 2025
1 parent 76d141a commit d7d4a99
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cpp/include/kvikio/parallel_operation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ namespace detail {
template <typename F>
auto make_copyable_lambda(F op)
{
static_assert(std::is_move_constructible_v<F>);

// Create the callable on the heap by moving from f. Use a shared pointer to manage its lifetime.
auto sp = std::make_shared<F>(std::forward<F>(op));
// Create the callable on the heap by moving from op. Use a shared pointer to manage its lifetime.
auto sp = std::make_shared<F>(std::move(op));

// Use the copyable closure as the proxy of the move-only callable.
return
Expand Down

0 comments on commit d7d4a99

Please sign in to comment.