]> git.ipfire.org Git - thirdparty/gcc.git/commit
Replace _Equal_helper with simpler class template
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 May 2019 14:18:50 +0000 (14:18 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 May 2019 14:18:50 +0000 (14:18 +0000)
commit47376ba0a89594dd8ad8724f0d7a67ae4e9d0750
treef6aedff73a51e31b3499f8379ab4cc2d539c5ab1
parent8126297456e072bee3b27158ed0ba5a9323a3420
Replace _Equal_helper with simpler class template

By defining the new helper inside _Hashtable_base it doesn't need all
the template parameters to be provided, and by making it only
responsible for checking a possibly-cached hash code it only has to do
one thing.  The caller can use the equality predicate itself instead of
duplicating that in the helper template.

* include/bits/hashtable_policy.h (_Equal_helper): Remove.
(_Hashtable_base::_Equal_hash_code): Define new class template.
(_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
_Equal_helper.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@271291 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/hashtable_policy.h