Skip to content

Commit 99b6572

Browse files
committed
Insert std::move() as suggested by @laramiel
1 parent c02d2cd commit 99b6572

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/pybind11/pybind11.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,7 @@ struct property_cpp_function<
16891689
static cpp_function write(PM pm, const handle &hdl) {
16901690
detail::type_info *tinfo = detail::get_type_info(typeid(T), /*throw_if_missing=*/true);
16911691
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); },
1692+
return cpp_function([pm](T &c, D value) { c.*pm = std::forward<D>(std::move(value)); },
16931693
is_method(hdl));
16941694
}
16951695
return cpp_function([pm](T &c, const D &value) { c.*pm = value; }, is_method(hdl));

0 commit comments

Comments
 (0)