[libcxx-commits] [PATCH] D152611: [libc++][spaceship] P1612R2: Removed `operator!=` from `bitset`
Hristo Hristov via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jun 10 00:31:31 PDT 2023
H-G-Hristov created this revision.
Herald added a subscriber: yaxunl.
Herald added a project: All.
H-G-Hristov requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Implements parts of P1612R2:
- Removed `operator!=` from `bitset`
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152611
Files:
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;
+#if _LIBCPP_STD_VER <= 17
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
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,6 +1043,8 @@
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
@@ -1050,6 +1054,8 @@
return !(*this == __rhs);
}
+#endif
+
template <size_t _Size>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bool
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152611.530176.patch
Type: text/x-patch
Size: 1745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230610/482168a2/attachment.bin>
More information about the libcxx-commits
mailing list