Skip to content

Commit 9adbb61

Browse files
committed
Remove std::move() in smart_holder::extract_deleter()
1 parent a0be89d commit 9adbb61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: include/pybind11/detail/struct_smart_holder.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ struct smart_holder {
242242
std::string("smart_holder::extract_deleter() precondition failure (") + context
243243
+ ").");
244244
}
245-
return std::unique_ptr<D>(new D(std::move(custom_deleter_ptr->deleter)));
245+
return std::unique_ptr<D>(new D(custom_deleter_ptr->deleter)); // D must be copyable.
246246
}
247247
return nullptr;
248248
}

0 commit comments

Comments
 (0)