This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make associative container operators inline friend


On 04/10/18 07:37 +0200, François Dumont wrote:
Here is the cleanup version.

    * include/bits/stl_tree.h
    (_Rb_tree_iterator<>::operator==): Make inline friend.
    (_Rb_tree_iterator<>::operator!=): Likewise.
    (_Rb_tree_const_iterator<>::operator==): Likewise.
    (_Rb_tree_const_iterator<>::operator!=): Likewise.
    (operator==(const _Rb_tree_iterator<>&,
    const _Rb_tree_const_iterator&)): Remove.
    (operator!=(const _Rb_tree_iterator<>&,
    const _Rb_tree_const_iterator&)): Remove.
    (operator==(const _Rb_tree<>&, const _Rb_tree<>&)): Make inline friend.
    (operator<(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise.
    (operator!=(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise and deprecate.

Nice.

    (operator>(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise.
    (operator<=(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise.
    (operator>=(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise.
    * include/debug/map.h (map<>::erase(const_iterator, const_iterator)):
    Compare __victim with _Base::cend().
    * include/debug/multimap.h (multimap<>::erase(const_iterator, const_iterator)):
    Likewise.
    * include/debug/set.h (set<>::erase(const_iterator, const_iterator)):
    Compare __victim with _Base::cend().
    * include/debug/multiset.h (multiset<>::erase(const_iterator, const_iterator)):
    Likewise.

Tested under Linux x86_64.

Ok to commit ?

Yes, thanks very much.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]