https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126800
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Nathan Myers <[email protected]>: https://gcc.gnu.org/g:54f01c74b1b43836d72c3ba8244fd1e679f3b3b3 commit r17-3903-g54f01c74b1b43836d72c3ba8244fd1e679f3b3b3 Author: Nathan Myers <[email protected]> Date: Wed Sep 2 09:43:15 2026 -0400 libstdc++: fix unordered_map heterogeneous insertion copying [PR126800] PR126800 reports that heterogeneous insertions fail to avoid copying the key when no insertion occurs. They call an existing member try_emplace that had invoked the wrong helper for their new usage case, and tests failed to detect the error. This patch calls the correct helper, and amends tests for heterogeneous insert operations op[], at(), try_emplace(), and insert_or_replace(). libstdc++-v3/Changelog: PR libstdc++/126800 * include/bits/hashtable.h: (try_emplace): Call correct helper. * testsuite/23_containers/unordered_map/modifiers/hetero/insert.cc: Check whether key arguments have been copied.
