From a0be89d203994d51181de0f5f96c3e9093241027 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sun, 25 Aug 2024 09:14:35 -0700 Subject: [PATCH] Apply suggestion by @iwanders under PR #5334 --- include/pybind11/detail/struct_smart_holder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/detail/struct_smart_holder.h b/include/pybind11/detail/struct_smart_holder.h index 401a6fd1b2..75bae7e564 100644 --- a/include/pybind11/detail/struct_smart_holder.h +++ b/include/pybind11/detail/struct_smart_holder.h @@ -234,7 +234,7 @@ struct smart_holder { // Caller is responsible for precondition: ensure_compatible_rtti_uqp_del() must succeed. template std::unique_ptr extract_deleter(const char *context) const { - auto *gd = std::get_deleter(vptr); + const auto *gd = std::get_deleter(vptr); if (gd && gd->use_del_fun) { const auto &custom_deleter_ptr = gd->del_fun.template target>(); if (custom_deleter_ptr == nullptr) {