[libcxx-commits] [PATCH] D152612: [libc++][spaceship] P1614R2: Removed global `operator!=` from `allocator`
Hristo Hristov via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jun 11 23:42:03 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd1ef99fe1ce3: [libc++][spaceship] P1614R2: Removed global `operator!=` from `allocator` (authored by Zingam).
Changed prior to commit:
https://reviews.llvm.org/D152612?vs=530313&id=530402#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152612/new/
https://reviews.llvm.org/D152612
Files:
libcxx/docs/Status/SpaceshipProjects.csv
libcxx/include/__memory/allocator.h
libcxx/include/memory
Index: libcxx/include/memory
===================================================================
--- libcxx/include/memory
+++ libcxx/include/memory
@@ -160,7 +160,7 @@
bool operator==(const allocator<T>&, const allocator<U>&) noexcept; // constexpr in C++20
template <class T, class U>
-bool operator!=(const allocator<T>&, const allocator<U>&) noexcept; // constexpr in C++20
+bool operator!=(const allocator<T>&, const allocator<U>&) noexcept; // removed in C++20
template <class OutputIterator, class T>
class raw_storage_iterator // deprecated in C++17, removed in C++20
Index: libcxx/include/__memory/allocator.h
===================================================================
--- libcxx/include/__memory/allocator.h
+++ libcxx/include/__memory/allocator.h
@@ -262,10 +262,14 @@
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool operator==(const allocator<_Tp>&, const allocator<_Up>&) _NOEXCEPT {return true;}
+#if _LIBCPP_STD_VER <= 17
+
template <class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_INLINE_VISIBILITY
bool operator!=(const allocator<_Tp>&, const allocator<_Up>&) _NOEXCEPT {return false;}
+#endif
+
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___MEMORY_ALLOCATOR_H
Index: libcxx/docs/Status/SpaceshipProjects.csv
===================================================================
--- libcxx/docs/Status/SpaceshipProjects.csv
+++ libcxx/docs/Status/SpaceshipProjects.csv
@@ -52,7 +52,7 @@
"| `[template.bitset] <https://wg21.link/template.bitset>`_
| `[bitset.members] <https://wg21.link/bitset.members>`_","| remove ops `bitset <https://reviews.llvm.org/D152611>`_",None,Hristo Hristov,|Complete|
| `[memory.syn] <https://wg21.link/memory.syn>`_,|,None,Unassigned,|Not Started|
-| `[allocator.globals] <https://wg21.link/allocator.globals>`_,| remove ops `allocator <https://reviews.llvm.org/D152612>`_,None,Hristo Hristov,|In Progress|
+| `[allocator.globals] <https://wg21.link/allocator.globals>`_,| remove ops `allocator <https://reviews.llvm.org/D152612>`_,None,Hristo Hristov,|Complete|
| `[unique.ptr.special] <https://wg21.link/unique.ptr.special>`_,| `unique_ptr <https://reviews.llvm.org/D130838>`_,[comparisons.three.way],Adrian Vogelsgesang,|Complete|
| `[util.smartptr.shared.cmp] <https://wg21.link/util.smartptr.shared.cmp>`_,| `shared_ptr <https://reviews.llvm.org/D130852>`_,[comparisons.three.way],Adrian Vogelsgesang,|Complete|
"| `[mem.res.syn] <https://wg21.link/mem.res.syn>`_
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152612.530402.patch
Type: text/x-patch
Size: 2522 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230612/1a4e7184/attachment.bin>
More information about the libcxx-commits
mailing list