From b299f321044ff946701a0020a4549f3eb0525b83 Mon Sep 17 00:00:00 2001 From: Dustin Spicuzza Date: Sun, 22 Mar 2026 16:22:33 -0400 Subject: [PATCH] Use default policy --- include/pybind11/cast.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index 05aef0e99..802fb845a 100644 --- a/include/pybind11/cast.h +++ b/include/pybind11/cast.h @@ -1028,8 +1028,7 @@ public: } if (parent) { - return type_caster_base::cast( - srcs, return_value_policy::reference_internal, parent); + return type_caster_base::cast(srcs, policy, parent); } throw cast_error("Unable to convert std::shared_ptr to Python when the bound type "