diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index 38eb8a88..a0b4d1ba 100644 --- a/include/pybind11/cast.h +++ b/include/pybind11/cast.h @@ -1978,7 +1978,7 @@ private: } template - Return call_impl(Func &&f, index_sequence, Guard &&) { + Return call_impl(Func &&f, index_sequence, Guard &&) && { return std::forward(f)(cast_op(std::move(std::get(argcasters)))...); }