Fix C++11 compatibility

This commit is contained in:
Xuehai Pan
2025-12-14 12:15:30 +08:00
parent e7417606e8
commit 5d1d6782b9

View File

@@ -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();
}