2018-10-09 François Dumont <fdumont@gcc.gnu.org>

* include/bits/stl_list.h
	(_List_operator<>::operator==): Replace member function with inline
	friend.
	(_List_operator<>::operator!=): Likewise.
	(_List_const_operator<>::operator==): Likewise.
	(_List_const_operator<>::operator!=): Likewise.
	(operator==(const _List_iterator<>&, const _List_const_iterator<>&)):
	Remove.
	(operator!=(const _List_iterator<>&, const _List_const_iterator<>&)):
	Remove.

From-SVN: r264993
This commit is contained in:
François Dumont 2018-10-09 20:38:06 +00:00
parent 6cb877be49
commit 2f039722d0
2 changed files with 25 additions and 24 deletions

View File

@ -1,3 +1,16 @@
2018-10-09 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_list.h
(_List_operator<>::operator==): Replace member function with inline
friend.
(_List_operator<>::operator!=): Likewise.
(_List_const_operator<>::operator==): Likewise.
(_List_const_operator<>::operator!=): Likewise.
(operator==(const _List_iterator<>&, const _List_const_iterator<>&)):
Remove.
(operator!=(const _List_iterator<>&, const _List_const_iterator<>&)):
Remove.
2018-10-09 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stringfwd.h (string, wstring, u16string, u32string):

View File

@ -243,13 +243,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
return __tmp;
}
bool
operator==(const _Self& __x) const _GLIBCXX_NOEXCEPT
{ return _M_node == __x._M_node; }
friend bool
operator==(const _Self& __x, const _Self& __y) _GLIBCXX_NOEXCEPT
{ return __x._M_node == __y._M_node; }
bool
operator!=(const _Self& __x) const _GLIBCXX_NOEXCEPT
{ return _M_node != __x._M_node; }
friend bool
operator!=(const _Self& __x, const _Self& __y) _GLIBCXX_NOEXCEPT
{ return __x._M_node != __y._M_node; }
// The only member points to the %list element.
__detail::_List_node_base* _M_node;
@ -327,30 +327,18 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
return __tmp;
}
bool
operator==(const _Self& __x) const _GLIBCXX_NOEXCEPT
{ return _M_node == __x._M_node; }
friend bool
operator==(const _Self& __x, const _Self& __y) _GLIBCXX_NOEXCEPT
{ return __x._M_node == __y._M_node; }
bool
operator!=(const _Self& __x) const _GLIBCXX_NOEXCEPT
{ return _M_node != __x._M_node; }
friend bool
operator!=(const _Self& __x, const _Self& __y) _GLIBCXX_NOEXCEPT
{ return __x._M_node != __y._M_node; }
// The only member points to the %list element.
const __detail::_List_node_base* _M_node;
};
template<typename _Val>
inline bool
operator==(const _List_iterator<_Val>& __x,
const _List_const_iterator<_Val>& __y) _GLIBCXX_NOEXCEPT
{ return __x._M_node == __y._M_node; }
template<typename _Val>
inline bool
operator!=(const _List_iterator<_Val>& __x,
const _List_const_iterator<_Val>& __y) _GLIBCXX_NOEXCEPT
{ return __x._M_node != __y._M_node; }
_GLIBCXX_BEGIN_NAMESPACE_CXX11
/// See bits/stl_deque.h's _Deque_base for an explanation.
template<typename _Tp, typename _Alloc>