diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index b5b3ae09..481c78a4 100644 --- a/include/pybind11/cast.h +++ b/include/pybind11/cast.h @@ -720,7 +720,7 @@ public: static handle cast(const holder_type &src, return_value_policy policy, handle parent) { return type_caster_generic::cast( - src.get(), policy, parent, + src.get(), return_value_policy::take_ownership, parent, src.get() ? &typeid(*src.get()) : nullptr, &typeid(type), ©_constructor, &move_constructor, &src); }