[libc++][spaceship] P1614R2: Removed ops from `unordered_multiset`, `unordered_set`
authorHristo Hristov <zingam@outlook.com>
Sun, 11 Jun 2023 05:39:49 +0000 (08:39 +0300)
committerHristo Hristov <zingam@outlook.com>
Sun, 11 Jun 2023 18:31:24 +0000 (21:31 +0300)
Implements parts of P1614R2:
- Removed ops from `unordered_multiset`,
- Removed ops from `unordered_set`

Reviewed By: #libc, Mordante

Differential Revision: https://reviews.llvm.org/D152643

libcxx/docs/Status/SpaceshipProjects.csv
libcxx/include/unordered_set

index ddb2d98..d466106 100644 (file)
@@ -99,8 +99,8 @@ Section,Description,Dependencies,Assignee,Complete
 | `set <https://reviews.llvm.org/D148416>`_",[expos.only.func],Hristo Hristov,|Complete|
 | `[unord.map.syn] <https://wg21.link/unord.map.syn>`_,"| remove ops `unordered_map`
 | remove ops `unordered_multimap`",None,Unassigned,|Not Started|
-| `[unordered.set.syn] <https://wg21.link/unordered.set.syn>`_,"| remove ops `unordered_set`
-| remove ops `unordered_multiset`",None,Unassigned,|Not Started|
+| `[unordered.set.syn] <https://wg21.link/unordered.set.syn>`_,"| remove ops `unordered_set <https://reviews.llvm.org/D152643>`_
+| remove ops `unordered_multiset <https://reviews.llvm.org/D152643>`_",None,Hristo Hristov,|Complete|
 | `[queue.syn] <https://wg21.link/queue.syn>`_,| `queue <https://reviews.llvm.org/D146066>`_,None,Hristo Hristov,|Complete|
 | `[stack.syn] <https://wg21.link/stack.syn>`_,| `stack <https://reviews.llvm.org/D146094>`_,None,Hristo Hristov,|Complete|
 | `[queue.ops] <https://wg21.link/queue.ops>`_,| `queue <https://reviews.llvm.org/D146066>`_,None,Hristo Hristov,|Complete|
index 413fb09..020689d 100644 (file)
@@ -232,7 +232,7 @@ template <class Value, class Hash, class Pred, class Alloc>
 template <class Value, class Hash, class Pred, class Alloc>
     bool
     operator!=(const unordered_set<Value, Hash, Pred, Alloc>& x,
-               const unordered_set<Value, Hash, Pred, Alloc>& y);
+               const unordered_set<Value, Hash, Pred, Alloc>& y); // removed in C++20
 
 template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>,
           class Alloc = allocator<Value>>
@@ -454,7 +454,7 @@ template <class Value, class Hash, class Pred, class Alloc>
 template <class Value, class Hash, class Pred, class Alloc>
     bool
     operator!=(const unordered_multiset<Value, Hash, Pred, Alloc>& x,
-               const unordered_multiset<Value, Hash, Pred, Alloc>& y);
+               const unordered_multiset<Value, Hash, Pred, Alloc>& y); // removed in C++20
 }  // std
 
 */
@@ -1150,6 +1150,8 @@ operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
     return true;
 }
 
+#if _LIBCPP_STD_VER <= 17
+
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 inline _LIBCPP_INLINE_VISIBILITY
 bool
@@ -1159,6 +1161,8 @@ operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
     return !(__x == __y);
 }
 
+#endif
+
 template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
           class _Alloc = allocator<_Value> >
 class _LIBCPP_TEMPLATE_VIS unordered_multiset
@@ -1792,6 +1796,8 @@ operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
     return true;
 }
 
+#if _LIBCPP_STD_VER <= 17
+
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 inline _LIBCPP_INLINE_VISIBILITY
 bool
@@ -1801,6 +1807,8 @@ operator!=(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
     return !(__x == __y);
 }
 
+#endif
+
 _LIBCPP_END_NAMESPACE_STD
 
 #if _LIBCPP_STD_VER >= 17