Instead of the RVO-unfriendly¹ auto r = std::move(it->second); erase(it); return r; use map::extract(), if available. The RVO-unfriendly code now only plagues old-fashioned compilers that, in 2025, didn't, yet, manage to implement C++17 _cpp_lib_node_extract. The rest enjoys C++17 guaranteed RVO. Amends 14090760a87f23509b7bb5ad846537c766cb44a5. ¹ theoretically, this code is eligible for NRVO, but embedded in a larger function like this, it won't kick in on most compilers. Reported-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Pick-to: 6.8 Change-Id: I6654fa7f5ed80d07369eb6a2b37f1e82cd3aa7f0 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit ed92f6c22fa59de1e536e1631053ae5565dcc0e1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%