From 9adbb61d36eb1e69a30950b39051f59f30f4eb47 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sun, 25 Aug 2024 09:55:53 -0700 Subject: [PATCH] Remove `std::move()` in `smart_holder::extract_deleter()` --- include/pybind11/detail/struct_smart_holder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/detail/struct_smart_holder.h b/include/pybind11/detail/struct_smart_holder.h index 75bae7e564..a6faf06e5e 100644 --- a/include/pybind11/detail/struct_smart_holder.h +++ b/include/pybind11/detail/struct_smart_holder.h @@ -242,7 +242,7 @@ struct smart_holder { std::string("smart_holder::extract_deleter() precondition failure (") + context + ")."); } - return std::unique_ptr(new D(std::move(custom_deleter_ptr->deleter))); + return std::unique_ptr(new D(custom_deleter_ptr->deleter)); // D must be copyable. } return nullptr; }