libstdc++: [_Hashtable] Use next bucket node and equal_to to check if same bucket To find out if we are still in the same bucket we can first check that current node is not the next bucket's before-begin and then that hash code are equals when cached. If not we can also use the equal_to functor in a multi-container context. As a last resort, compute node bucket index. libstdc++-v3/ChangeLog:     * include/bits/hashtable_policy.h (_Hashtable_base<>::_S_hash_code_equals): New.     * include/bits/hashtable.h (_Hashtable<>::_M_is_in_bucket): New, use latter.     (_Hashtable<>::_M_find_before_node): Use latter.     (_Hashtable<>::_M_find_before_node_tr): Likewise. Tested under Linux x86_64. François