libstdc++: Review _Local_iterator/_Local_const_iterator implementations.
authorFrançois Dumont <fdumont@gcc.gnu.org>
Mon, 20 Jan 2020 18:23:09 +0000 (19:23 +0100)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Wed, 29 Jul 2020 18:46:09 +0000 (20:46 +0200)
commitacc1d1a9546115629e50bcb9e09a7bd85291b652
tree2f041970212c9f2bf4ae693d2f09af97b0264f5d
parent1722e2013f05f1f1f99379dbaa0c0df356da731f
libstdc++: Review _Local_iterator/_Local_const_iterator implementations.

_Local_iterator_base inherits _Node_iterator_base and so share the same
comparison operators. It avoids to expose special method _M_curr for debug
mode to compare such iterators.

libstdc++-v3/ChangeLog:

* include/bits/hashtable_policy.h (_Node_iterator_base()): New.
(operator==(const _Node_iterator_base&, const _Node_iterator_base&)):
Make hidden friend.
(operator!=(const _Node_iterator_base&, const _Node_iterator_base&)):
Make hidden friend.
(_Local_iterator_base<>): Inherits _Node_iterator_base.
(_Local_iterator_base<>::_M_cur): Remove.
(_Local_iterator_base<>::_M_curr()): Remove.
(operator==(const _Local_iterator_base&, const _Local_iterator_base&)):
Remove.
(operator!=(const _Local_iterator_base&, const _Local_iterator_base&)):
Remove.
* include/debug/unordered_map (unordered_map<>::_M_invalidate): Adapt.
(unordered_multimap<>::_M_invalidate): Adapt.
* include/debug/unordered_set (unordered_set<>::_M_invalidate): Adapt.
(unordered_multiset<>::_M_invalidate): Adapt.
libstdc++-v3/include/bits/hashtable_policy.h
libstdc++-v3/include/debug/unordered_map
libstdc++-v3/include/debug/unordered_set