]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: [_Hashtable] Implement several small methods implicitly inline
authorFrançois Dumont <fdumont@gcc.gnu.org>
Wed, 3 May 2023 04:45:47 +0000 (06:45 +0200)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Wed, 10 May 2023 16:40:05 +0000 (18:40 +0200)
commit5476c9142830d01c4b8f2d91e9d439cb32d76378
tree4c99e229b49327fe8a4e9e7f81abb71b1c42ac17
parent31f8d1643916e20755c70d2a3fd97b0943fc57d1
libstdc++: [_Hashtable] Implement several small methods implicitly inline

Make implementation of 3 simple _Hashtable methods implicitly inline.

Avoid usage of const_iterator abstraction within _Hashtable implementation.

Replace several usages of __node_type* with expected __node_ptr.

libstdc++-v3/ChangeLog:

* include/bits/hashtable_policy.h
(_NodeBuilder<>::_S_build): Use __node_ptr.
(_ReuseOrAllocNode<>): Use __node_ptr in place of __node_type*.
(_AllocNode<>): Likewise.
(_Equality<>::_M_equal): Remove const_iterator usages. Only preserved
to call std::is_permutation in the non-unique key implementation.
* include/bits/hashtable.h (_Hashtable<>::_M_update_begin()): Capture
_M_begin() once.
(_Hashtable<>::_M_bucket_begin(size_type)): Implement implicitly inline.
(_Hashtable<>::_M_insert_bucket_begin): Likewise.
(_Hashtable<>::_M_remove_bucket_begin): Likewise.
(_Hashtable<>::_M_compute_hash_code): Use __node_ptr rather than
const_iterator.
(_Hashtable<>::find): Likewise.
(_Hashtable<>::_M_emplace): Likewise.
(_Hashtable<>::_M_insert_unique): Likewise.
libstdc++-v3/include/bits/hashtable.h
libstdc++-v3/include/bits/hashtable_policy.h