Skip to content

Commit

Permalink
Remove std::move() in smart_holder::extract_deleter()
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralf W. Grosse-Kunstleve committed Aug 25, 2024
1 parent a0be89d commit 9adbb61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/pybind11/detail/struct_smart_holder.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ struct smart_holder {
std::string("smart_holder::extract_deleter() precondition failure (") + context
+ ").");
}
return std::unique_ptr<D>(new D(std::move(custom_deleter_ptr->deleter)));
return std::unique_ptr<D>(new D(custom_deleter_ptr->deleter)); // D must be copyable.
}
return nullptr;
}
Expand Down

0 comments on commit 9adbb61

Please sign in to comment.