[libc++][spaceship] P1614R2: Removed operator!= from scoped_allocator_adaptor

Implements parts of P1614R2
- Removed `operator!=` from `scoped_allocator_adaptor`

Reviewed By: #libc, Mordante

Differential Revision: https://reviews.llvm.org/D152678
This commit is contained in:
Hristo Hristov 2023-06-12 09:56:15 +03:00
parent 9a6ca67397
commit 8cf3c2920d
2 changed files with 6 additions and 2 deletions

View File

@ -61,7 +61,7 @@ Section,Description,Dependencies,Assignee,Complete
| remove ops `memory_resource <https://reviews.llvm.org/D152629>`_
| remove ops `polymorphic_allocator <https://reviews.llvm.org/D152629>`_",None,Hristo Hristov,|Complete|
"| `[allocator.adaptor.syn] <https://wg21.link/allocator.adaptor.syn>`_
| `[scoped.adaptor.operators] <https://wg21.link/scoped.adaptor.operators>`_",| remove ops `scoped_allocator_adaptor`,None,Unassigned,|Not Started|
| `[scoped.adaptor.operators] <https://wg21.link/scoped.adaptor.operators>`_",| remove ops `scoped_allocator_adaptor <https://reviews.llvm.org/D152678>`_,None,Hristo Hristov,|Complete|
"| `[functional.syn] <https://wg21.link/functional.syn>`_
| `[range.cmp] <https://wg21.link/range.cmp>`_
| `[func.wrap.func] <https://wg21.link/func.wrap.func>`_

1 Section Description Dependencies Assignee Complete
61 | `[common.iterator] <https://wg21.link/common.iterator>`_ | `[common.iter.cmp] <https://wg21.link/common.iter.cmp>`_ | remove ops `common_iterator` None Unassigned |Not Started|
62 | `[counted.iterator] <https://wg21.link/counted.iterator>`_ | `[counted.iter.cmp] <https://wg21.link/counted.iter.cmp>`_ | `counted_iterator <https://reviews.llvm.org/D106205>`_ None Zoe Carver |Complete|
63 | `[unreachable.sentinel] <https://wg21.link/unreachable.sentinel>`_ | `[unreachable.sentinel.cmp] <https://wg21.link/common.iter.cmp>`_ | `unreachable_sentinel_t` None Unassigned |Not Started|
64 | `[istream.iterator] <https://wg21.link/istream.iterator>`_ | `[istream.iterator.ops] <https://wg21.link/istream.iterator.ops>`_ | remove ops `istream_iterator` None Unassigned |Not Started|
65 | `[istreambuf.iterator] <https://wg21.link/istreambuf.iterator>`_ | `[istreambuf.iterator.ops] <https://wg21.link/istreambuf.iterator.ops>`_ | remove ops `istreambuf_iterator` None Unassigned |Not Started|
66 - `5.9 Clause 24: Ranges library <https://wg21.link/p1614r2#clause-24-ranges-library>`_
67 | `[range.iota.iterator] <https://wg21.link/range.iota.iterator>`_ | `ranges::iota_view::iterator <https://reviews.llvm.org/D110774>`_ [concepts.cmp] Arthur O'Dwyer |Complete|

View File

@ -103,7 +103,7 @@ template <class OuterA1, class OuterA2, class... InnerAllocs>
template <class OuterA1, class OuterA2, class... InnerAllocs>
bool
operator!=(const scoped_allocator_adaptor<OuterA1, InnerAllocs...>& a,
const scoped_allocator_adaptor<OuterA2, InnerAllocs...>& b) noexcept;
const scoped_allocator_adaptor<OuterA2, InnerAllocs...>& b) noexcept; // removed in C++20
} // std
@ -703,6 +703,8 @@ operator==(const scoped_allocator_adaptor<_OuterA1, _InnerA0, _InnerAllocs...>&
__a.inner_allocator() == __b.inner_allocator();
}
#if _LIBCPP_STD_VER <= 17
template <class _OuterA1, class _OuterA2, class... _InnerAllocs>
inline _LIBCPP_INLINE_VISIBILITY
bool
@ -712,6 +714,8 @@ operator!=(const scoped_allocator_adaptor<_OuterA1, _InnerAllocs...>& __a,
return !(__a == __b);
}
#endif // _LIBCPP_STD_VER <= 17
#endif // !defined(_LIBCPP_CXX03_LANG)
_LIBCPP_END_NAMESPACE_STD