Make std::forward_list iterator operators inline friend
Jonathan Wakely
jwakely@redhat.com
Thu Oct 11 10:59:00 GMT 2018
On 10/10/18 22:55 +0200, François Dumont wrote:
>Same patch as for std::list iterators. I only additionally move doc on
>those operators.
>
>I also avoid redefining some typedef that are already defined in
>_Fwd_list_base<>.
>
>Â Â Â * include/bits/forward_list.h
>Â Â Â (_Fwd_list_iterator<>::operator==): Replace member function with inline
>Â Â Â friend.
>Â Â Â (_Fwd_list_iterator<>::operator!=): Likewise.
>Â Â Â (_Fwd_list_const_iterator<>::operator==): Likewise.
>Â Â Â (_Fwd_list_const_iterator<>::operator!=): Likewise.
>Â Â Â (operator==(const _Fwd_list_iterator<>&,
>Â Â Â const _Fwd_list_const_iterator<>&)): Remove.
>Â Â Â (operator!=(const _Fwd_list_iterator<>&,
>Â Â Â const _Fwd_list_const_iterator<>&)): Remove.
>Â Â Â (forward_list<>::_Node): Take typedef from base type.
>Â Â Â (forward_list<>::iterator): Likewise.
>Â Â Â (forward_list<>::const_iterator): Likewise.
>
>Tested under Linux x86_64.
>
>Ok to commit ?
OK, thanks.
More information about the Libstdc++
mailing list