[libcxx-commits] [PATCH] D152678: [libc++][spaceship] P1614R2: Removed `operator!=` from `scoped_allocator_adaptor`

Hristo Hristov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 12 04:18:27 PDT 2023


H-G-Hristov created this revision.
Herald added a subscriber: yaxunl.
Herald added a project: All.
H-G-Hristov updated this revision to Diff 530405.
H-G-Hristov added a comment.
H-G-Hristov published this revision for review.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

Added revision number


Implements parts of P1614R2

- Removed `operator!=` from `scoped_allocator_adaptor`


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152678

Files:
  libcxx/docs/Status/SpaceshipProjects.csv
  libcxx/include/scoped_allocator


Index: libcxx/include/scoped_allocator
===================================================================
--- libcxx/include/scoped_allocator
+++ libcxx/include/scoped_allocator
@@ -103,7 +103,7 @@
 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 @@
            __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 @@
     return !(__a == __b);
 }
 
+#endif // _LIBCPP_STD_VER <= 17
+
 #endif // !defined(_LIBCPP_CXX03_LANG)
 
 _LIBCPP_END_NAMESPACE_STD
Index: libcxx/docs/Status/SpaceshipProjects.csv
===================================================================
--- libcxx/docs/Status/SpaceshipProjects.csv
+++ libcxx/docs/Status/SpaceshipProjects.csv
@@ -61,7 +61,7 @@
 | 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>`_


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152678.530405.patch
Type: text/x-patch
Size: 1902 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230612/29817c46/attachment.bin>


More information about the libcxx-commits mailing list