We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
std::move()
1 parent c02d2cd commit 99b6572Copy full SHA for 99b6572
include/pybind11/pybind11.h
@@ -1689,7 +1689,7 @@ struct property_cpp_function<
1689
static cpp_function write(PM pm, const handle &hdl) {
1690
detail::type_info *tinfo = detail::get_type_info(typeid(T), /*throw_if_missing=*/true);
1691
if (tinfo->holder_enum_v == detail::holder_enum_t::smart_holder) {
1692
- return cpp_function([pm](T &c, D value) { c.*pm = std::forward<D>(value); },
+ return cpp_function([pm](T &c, D value) { c.*pm = std::forward<D>(std::move(value)); },
1693
is_method(hdl));
1694
}
1695
return cpp_function([pm](T &c, const D &value) { c.*pm = value; }, is_method(hdl));
0 commit comments