Replace _Equal_helper with simpler class template
authorJonathan Wakely <jwakely@redhat.com>
Thu, 16 May 2019 14:18:50 +0000 (15:18 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 16 May 2019 14:18:50 +0000 (15:18 +0100)
commiteba20412b43dbb36c57f4235e3a3fff2eb88ba9a
treef6aedff73a51e31b3499f8379ab4cc2d539c5ab1
parent1f6ea96860f448ba4cc5bf1e7570b6181611328b
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.

From-SVN: r271291
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/hashtable_policy.h