From 99b657221467a985cc26c7b5619c65126eff06e9 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 25 Jul 2024 21:25:32 -0700 Subject: [PATCH] Insert `std::move()` as suggested by @laramiel --- include/pybind11/pybind11.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 1c80c1c006..2aea48b67a 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -1689,7 +1689,7 @@ struct property_cpp_function< static cpp_function write(PM pm, const handle &hdl) { detail::type_info *tinfo = detail::get_type_info(typeid(T), /*throw_if_missing=*/true); if (tinfo->holder_enum_v == detail::holder_enum_t::smart_holder) { - return cpp_function([pm](T &c, D value) { c.*pm = std::forward(value); }, + return cpp_function([pm](T &c, D value) { c.*pm = std::forward(std::move(value)); }, is_method(hdl)); } return cpp_function([pm](T &c, const D &value) { c.*pm = value; }, is_method(hdl));