aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2024-10-31 19:53:55 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2024-11-13 20:21:39 +0000
commit73676cfb201e988bc086a8aeb63223f66f7b6252 (patch)
tree62bb55308ad4969c75736be7d7392c482e048357 /libcpp
parentce2cf1f03295b7992a8e3eae3c703845f045db27 (diff)
downloadgcc-73676cfb201e988bc086a8aeb63223f66f7b6252.zip
gcc-73676cfb201e988bc086a8aeb63223f66f7b6252.tar.gz
gcc-73676cfb201e988bc086a8aeb63223f66f7b6252.tar.bz2
libstdc++: Refactor Hashtable erasure
This reworks the internal member functions for erasure from unordered containers, similarly to the earlier commit doing it for insertion. Instead of multiple overloads of _M_erase which are selected via tag dispatching, the erase(const key_type&) member can use 'if constexpr' to choose an appropriate implementation (returning after erasing a single element for unique keys, or continuing to erase all equivalent elements for non-unique keys). libstdc++-v3/ChangeLog: * include/bits/hashtable.h (_Hashtable::_M_erase): Remove overloads for erasing by key, moving logic to ... (_Hashtable::erase): ... here. Reviewed-by: François Dumont <fdumont@gcc.gnu.org>
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions