Commit d37303d1 by Jonathan Wakely Committed by Jonathan Wakely

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
parent 6394a341
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> 2019-11-05 Jonathan Wakely <jwakely@redhat.com>
* libsupc++/compare: New header. * libsupc++/compare: New header.
......
...@@ -797,23 +797,6 @@ namespace ranges ...@@ -797,23 +797,6 @@ namespace ranges
friend constexpr bool friend constexpr bool
operator==(unreachable_sentinel_t, const _It&) noexcept operator==(unreachable_sentinel_t, const _It&) noexcept
{ return false; } { 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{}; inline constexpr unreachable_sentinel_t unreachable_sentinel{};
......
...@@ -677,15 +677,6 @@ namespace __gnu_test ...@@ -677,15 +677,6 @@ namespace __gnu_test
friend bool operator==(const sentinel& s, const I& i) friend bool operator==(const sentinel& s, const I& i)
{ return s.end == i.ptr; } { 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 auto
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment