aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/aarch64
diff options
context:
space:
mode:
authorFrançois Dumont <fdumont@gcc.gnu.org>2023-11-09 19:06:52 +0100
committerFrançois Dumont <fdumont@gcc.gnu.org>2024-10-03 06:44:21 +0200
commitccb6e08a4d5a067513b3a10bbf0d76e28e1d4a8e (patch)
treedd433868dd47e4966f24daa9a69d03cdb35c248d /gcc/config/aarch64
parentcaef7002b74af612fabbf049763862f9b1489579 (diff)
downloadgcc-ccb6e08a4d5a067513b3a10bbf0d76e28e1d4a8e.zip
gcc-ccb6e08a4d5a067513b3a10bbf0d76e28e1d4a8e.tar.gz
gcc-ccb6e08a4d5a067513b3a10bbf0d76e28e1d4a8e.tar.bz2
libstdc++: [_Hashtable] Fix some implementation inconsistencies
Get rid of the different usages of the mutable keyword except in _Prime_rehash_policy where it is preserved for abi compatibility reason. Fix comment to explain that we need the computation of bucket index noexcept to be able to rehash the container when needed. For Standard instantiations through std::unordered_xxx containers we already force caching of hash code when hash functor is not noexcep so it is guarantied. The static_assert purpose in _Hashtable on _M_bucket_index is thus limited to usages of _Hashtable with exotic _Hashtable_traits. libstdc++-v3/ChangeLog: * include/bits/hashtable_policy.h (_NodeBuilder<>::_S_build): Remove const qualification on _NodeGenerator instance. (_ReuseOrAllocNode<>::operator()(_Args&&...)): Remove const qualification. (_ReuseOrAllocNode<>::_M_nodes): Remove mutable. (_Insert_base<>::_M_insert_range): Remove _NodeGetter const qualification. (_Hash_code_base<>::_M_bucket_index(const _Hash_node_value<>&, size_t)): Simplify noexcept declaration, we already static_assert that _RangeHash functor is noexcept. * include/bits/hashtable.h: Rework comments. Remove const qualifier on _NodeGenerator& arguments. Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Diffstat (limited to 'gcc/config/aarch64')
0 files changed, 0 insertions, 0 deletions