From 2db1c26785c465d4204bf8daa725b9dc60395086 Mon Sep 17 00:00:00 2001 From: abacus_fixer Date: Wed, 17 Jun 2026 10:54:20 +0800 Subject: [PATCH] fix: C++11 compatibility - replace structured bindings with iterator access Replace C++17 structured bindings in dspin_lcao.cpp with C++11-compatible iterator syntax to support C++11 compilation standard. --- source/source_lcao/module_operator_lcao/dspin_lcao.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/source_lcao/module_operator_lcao/dspin_lcao.cpp b/source/source_lcao/module_operator_lcao/dspin_lcao.cpp index 3983d6285e0..b70381526e9 100644 --- a/source/source_lcao/module_operator_lcao/dspin_lcao.cpp +++ b/source/source_lcao/module_operator_lcao/dspin_lcao.cpp @@ -579,8 +579,10 @@ void hamilt::DeltaSpin>::cal_PI_sub( + kvec_d.z * bi_ad.R_index.z); const std::complex phase(cos(arg), sin(arg)); - for (const auto& [iw_global, nlm_vec] : bi_ad.nlm) + for (const auto& nlm_pair : bi_ad.nlm) { + const int iw_global = nlm_pair.first; + const std::vector& nlm_vec = nlm_pair.second; // Check if this global orbital index is in our local rows const int iw_local = this->paraV->global2local_row(iw_global); if (iw_local < 0) { continue;