[libcxx-commits] [PATCH] D152642: [libc++][spaceship] P1614R2: Removed `operator!=` from `unordered_map`, `unordered_multimap`, `__hash_map_iterator`
Hristo Hristov via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jun 11 23:23:47 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3d74398bd33b: [libc++][spaceship] P1614R2: Removed `operator!=` from `unordered_map`… (authored by Zingam).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152642/new/
https://reviews.llvm.org/D152642
Files:
libcxx/docs/Status/SpaceshipProjects.csv
libcxx/include/unordered_map
Index: libcxx/include/unordered_map
===================================================================
--- libcxx/include/unordered_map
+++ libcxx/include/unordered_map
@@ -270,7 +270,7 @@
template <class Key, class T, class Hash, class Pred, class Alloc>
bool
operator!=(const unordered_map<Key, T, Hash, Pred, Alloc>& x,
- const unordered_map<Key, T, Hash, Pred, Alloc>& y);
+ const unordered_map<Key, T, Hash, Pred, Alloc>& y); // Removed in C++20
template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>,
class Alloc = allocator<pair<const Key, T>>>
@@ -508,7 +508,7 @@
template <class Key, class T, class Hash, class Pred, class Alloc>
bool
operator!=(const unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
- const unordered_multimap<Key, T, Hash, Pred, Alloc>& y);
+ const unordered_multimap<Key, T, Hash, Pred, Alloc>& y); // Removed in C++20
} // std
@@ -954,9 +954,11 @@
friend _LIBCPP_INLINE_VISIBILITY
bool operator==(const __hash_map_iterator& __x, const __hash_map_iterator& __y)
{return __x.__i_ == __y.__i_;}
+#if _LIBCPP_STD_VER <= 17
friend _LIBCPP_INLINE_VISIBILITY
bool operator!=(const __hash_map_iterator& __x, const __hash_map_iterator& __y)
{return __x.__i_ != __y.__i_;}
+#endif
template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
@@ -1008,9 +1010,11 @@
friend _LIBCPP_INLINE_VISIBILITY
bool operator==(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y)
{return __x.__i_ == __y.__i_;}
+#if _LIBCPP_STD_VER <= 17
friend _LIBCPP_INLINE_VISIBILITY
bool operator!=(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y)
{return __x.__i_ != __y.__i_;}
+#endif
template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
@@ -1905,6 +1909,8 @@
return true;
}
+#if _LIBCPP_STD_VER <= 17
+
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
bool
@@ -1914,6 +1920,8 @@
return !(__x == __y);
}
+#endif
+
template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = equal_to<_Key>,
class _Alloc = allocator<pair<const _Key, _Tp> > >
class _LIBCPP_TEMPLATE_VIS unordered_multimap
@@ -2619,6 +2627,8 @@
return true;
}
+#if _LIBCPP_STD_VER <= 17
+
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
bool
@@ -2628,6 +2638,8 @@
return !(__x == __y);
}
+#endif
+
_LIBCPP_END_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 17
Index: libcxx/docs/Status/SpaceshipProjects.csv
===================================================================
--- libcxx/docs/Status/SpaceshipProjects.csv
+++ libcxx/docs/Status/SpaceshipProjects.csv
@@ -97,8 +97,8 @@
| `multimap <https://reviews.llvm.org/D145976>`_",[expos.only.func],Hristo Hristov,|Complete|
| `[associative.set.syn] <https://wg21.link/associative.set.syn>`_ (`general <https://wg21.link/container.opt.reqmts>`_),"| `multiset <https://reviews.llvm.org/D148416>`_
| `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|
+| `[unord.map.syn] <https://wg21.link/unord.map.syn>`_,"| remove ops `unordered_map <https://reviews.llvm.org/D152642>`_
+| remove ops `unordered_multimap <https://reviews.llvm.org/D152642>`_",None,Hristo Hristov,|Complete|
| `[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|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152642.530391.patch
Type: text/x-patch
Size: 4274 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230612/a9c254a2/attachment.bin>
More information about the libcxx-commits
mailing list