From 5d1d6782b9fa7cc6f705b6adad1828ac2c66ec5a Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Sun, 14 Dec 2025 12:15:30 +0800 Subject: [PATCH] Fix C++11 compatibility --- include/pybind11/detail/internals.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pybind11/detail/internals.h b/include/pybind11/detail/internals.h index d5c4da1ac..046e47314 100644 --- a/include/pybind11/detail/internals.h +++ b/include/pybind11/detail/internals.h @@ -339,8 +339,8 @@ struct internals { internals &operator=(const internals &other) = delete; internals &operator=(internals &&other) = delete; ~internals() { - for (auto &[_, storage_ptr] : call_once_storage_map) { - delete storage_ptr; + for (auto &entry : call_once_storage_map) { + delete entry.second; } call_once_storage_map.clear(); }