[libcxx-commits] [libcxx] bfd6e4d - [libc++][spaceship] P1614R2: Removed ops from `unordered_multiset`, `unordered_set`
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jun 11 11:31:30 PDT 2023
Author: Hristo Hristov
Date: 2023-06-11T21:31:24+03:00
New Revision: bfd6e4dd2d7a659e6599e91c931b8095d729b9b6
URL: https://github.com/llvm/llvm-project/commit/bfd6e4dd2d7a659e6599e91c931b8095d729b9b6
DIFF: https://github.com/llvm/llvm-project/commit/bfd6e4dd2d7a659e6599e91c931b8095d729b9b6.diff
LOG: [libc++][spaceship] P1614R2: Removed ops from `unordered_multiset`, `unordered_set`
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
Added:
Modified:
libcxx/docs/Status/SpaceshipProjects.csv
libcxx/include/unordered_set
Removed:
################################################################################
diff --git a/libcxx/docs/Status/SpaceshipProjects.csv b/libcxx/docs/Status/SpaceshipProjects.csv
index ddb2d98fd718f..d4661068858f1 100644
--- a/libcxx/docs/Status/SpaceshipProjects.csv
+++ b/libcxx/docs/Status/SpaceshipProjects.csv
@@ -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|
diff --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set
index 413fb093435af..020689d7cf1d9 100644
--- a/libcxx/include/unordered_set
+++ b/libcxx/include/unordered_set
@@ -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
More information about the libcxx-commits
mailing list