[libcxx-commits] [PATCH] D152611: [libc++][spaceship] P1612R2: Removed `operator!=` from `bitset`

Hristo Hristov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jun 11 23:27:00 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG7c96cd35bf5d: [libc++][spaceship] P1612R2: Removed `operator!=` from `bitset` (authored by Zingam).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152611/new/

https://reviews.llvm.org/D152611

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


Index: libcxx/include/bitset
===================================================================
--- libcxx/include/bitset
+++ libcxx/include/bitset
@@ -79,7 +79,7 @@
     size_t count() const noexcept;                     // constexpr since C++23
     constexpr size_t size() const noexcept;            // constexpr since C++23
     bool operator==(const bitset& rhs) const noexcept; // constexpr since C++23
-    bool operator!=(const bitset& rhs) const noexcept; // constexpr since C++23
+    bool operator!=(const bitset& rhs) const noexcept; // removed in C++20
     bool test(size_t pos) const;                       // constexpr since C++23
     bool all() const noexcept;                         // constexpr since C++23
     bool any() const noexcept;                         // constexpr since C++23
@@ -761,8 +761,10 @@
     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR size_t size() const _NOEXCEPT {return _Size;}
     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
     bool operator==(const bitset& __rhs) const _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
+#if _LIBCPP_STD_VER <= 17
+    _LIBCPP_INLINE_VISIBILITY
     bool operator!=(const bitset& __rhs) const _NOEXCEPT;
+#endif
     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
     bool test(size_t __pos) const;
     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
@@ -1041,15 +1043,19 @@
     return _VSTD::equal(base::__make_iter(0), base::__make_iter(_Size), __rhs.__make_iter(0));
 }
 
+#if _LIBCPP_STD_VER <= 17
+
 template <size_t _Size>
 inline
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
+_LIBCPP_HIDE_FROM_ABI
 bool
 bitset<_Size>::operator!=(const bitset& __rhs) const _NOEXCEPT
 {
     return !(*this == __rhs);
 }
 
+#endif
+
 template <size_t _Size>
 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
 bool
Index: libcxx/docs/Status/SpaceshipProjects.csv
===================================================================
--- libcxx/docs/Status/SpaceshipProjects.csv
+++ libcxx/docs/Status/SpaceshipProjects.csv
@@ -50,7 +50,7 @@
 | `[variant.monostate.relops] <https://wg21.link/variant.monostate.relops>`_","| `monostate <https://reviews.llvm.org/D131372>`_
 | `variant <https://reviews.llvm.org/D131372>`_",None,Kent Ross,|Complete|
 "| `[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,|In Progress|
+| `[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|
 | `[unique.ptr.special] <https://wg21.link/unique.ptr.special>`_,| `unique_ptr <https://reviews.llvm.org/D130838>`_,[comparisons.three.way],Adrian Vogelsgesang,|Complete|


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152611.530392.patch
Type: text/x-patch
Size: 3059 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230612/13c61a67/attachment.bin>


More information about the libcxx-commits mailing list