libstdc++: remove redundant equality operators

Now that operator<=> is supported, these operators can be generated by
the compiler.

	* include/bits/iterator_concepts.h (unreachable_sentinel_t): Remove
	redundant equality operators.
	* testsuite/util/testsuite_iterators.h (test_range::sentinel):
	Likewise.

From-SVN: r277888
This commit is contained in:
Jonathan Wakely 2019-11-06 17:53:12 +00:00 committed by Jonathan Wakely
parent 6394a341d6
commit d37303d15a
3 changed files with 7 additions and 26 deletions

View File

@ -1,3 +1,10 @@
2019-11-06 Jonathan Wakely <jwakely@redhat.com>
* include/bits/iterator_concepts.h (unreachable_sentinel_t): Remove
redundant equality operators.
* testsuite/util/testsuite_iterators.h (test_range::sentinel):
Likewise.
2019-11-05 Jonathan Wakely <jwakely@redhat.com>
* libsupc++/compare: New header.

View File

@ -797,23 +797,6 @@ namespace ranges
friend constexpr bool
operator==(unreachable_sentinel_t, const _It&) noexcept
{ return false; }
#ifndef __cpp_lib_three_way_comparison
template<weakly_incrementable _It>
friend constexpr bool
operator!=(unreachable_sentinel_t, const _It&) noexcept
{ return true; }
template<weakly_incrementable _It>
friend constexpr bool
operator==(const _It&, unreachable_sentinel_t) noexcept
{ return false; }
template<weakly_incrementable _It>
friend constexpr bool
operator!=(const _It&, unreachable_sentinel_t) noexcept
{ return true; }
#endif
};
inline constexpr unreachable_sentinel_t unreachable_sentinel{};

View File

@ -677,15 +677,6 @@ namespace __gnu_test
friend bool operator==(const sentinel& s, const I& i)
{ return s.end == i.ptr; }
friend bool operator!=(const sentinel& s, const I& i)
{ return !(s == i); }
friend bool operator==(const I& i, const sentinel& s)
{ return s == i; }
friend bool operator!=(const I& i, const sentinel& s)
{ return !(s == i); }
};
auto