[libcxx-commits] [libcxx] [libc++][stdatomic.h] LWG3671. (PR #99775)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jul 20 12:17:17 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Mark de Wever (mordante)
<details>
<summary>Changes</summary>
Implements:
- LWG3671 atomic_fetch_xor missing from stdatomic.h
---
Full diff: https://github.com/llvm/llvm-project/pull/99775.diff
3 Files Affected:
- (modified) libcxx/docs/Status/Cxx23Issues.csv (+1-1)
- (modified) libcxx/include/stdatomic.h (+4)
- (modified) libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp (+4)
``````````diff
diff --git a/libcxx/docs/Status/Cxx23Issues.csv b/libcxx/docs/Status/Cxx23Issues.csv
index 547d38c25c1da..9149c21d6f1a0 100644
--- a/libcxx/docs/Status/Cxx23Issues.csv
+++ b/libcxx/docs/Status/Cxx23Issues.csv
@@ -164,7 +164,7 @@
"`3656 <https://wg21.link/LWG3656>`__","Inconsistent bit operations returning a count","July 2022","|Complete|","15.0",""
"`3659 <https://wg21.link/LWG3659>`__","Consider ``ATOMIC_FLAG_INIT`` undeprecation","July 2022","|Complete|","15.0"
"`3670 <https://wg21.link/LWG3670>`__","``Cpp17InputIterators`` don't have integer-class difference types","July 2022","","","|ranges|"
-"`3671 <https://wg21.link/LWG3671>`__","``atomic_fetch_xor`` missing from ``stdatomic.h``","July 2022","",""
+"`3671 <https://wg21.link/LWG3671>`__","``atomic_fetch_xor`` missing from ``stdatomic.h``","July 2022","|Complete|","20.0"
"`3672 <https://wg21.link/LWG3672>`__","``common_iterator::operator->()`` should return by value","July 2022","|Complete|","19.0","|ranges|"
"`3683 <https://wg21.link/LWG3683>`__","``operator==`` for ``polymorphic_allocator`` cannot deduce template argument in common cases","July 2022","",""
"`3687 <https://wg21.link/LWG3687>`__","``expected<cv void, E>`` move constructor should move","July 2022","|Complete|","16.0"
diff --git a/libcxx/include/stdatomic.h b/libcxx/include/stdatomic.h
index 79772eb7fce1f..0ff14660e144a 100644
--- a/libcxx/include/stdatomic.h
+++ b/libcxx/include/stdatomic.h
@@ -103,6 +103,8 @@ using std::atomic_fetch_sub // see below
using std::atomic_fetch_sub_explicit // see below
using std::atomic_fetch_or // see below
using std::atomic_fetch_or_explicit // see below
+using std::atomic_fetch_xor // see below
+using std::atomic_fetch_xor_explicit // see below
using std::atomic_fetch_and // see below
using std::atomic_fetch_and_explicit // see below
using std::atomic_flag_test_and_set // see below
@@ -204,6 +206,8 @@ using std::atomic_fetch_add_explicit _LIBCPP_USING_IF_EXISTS;
using std::atomic_fetch_and _LIBCPP_USING_IF_EXISTS;
using std::atomic_fetch_and_explicit _LIBCPP_USING_IF_EXISTS;
using std::atomic_fetch_or _LIBCPP_USING_IF_EXISTS;
+using std::atomic_fetch_xor_explicit _LIBCPP_USING_IF_EXISTS;
+using std::atomic_fetch_xor _LIBCPP_USING_IF_EXISTS;
using std::atomic_fetch_or_explicit _LIBCPP_USING_IF_EXISTS;
using std::atomic_fetch_sub _LIBCPP_USING_IF_EXISTS;
using std::atomic_fetch_sub_explicit _LIBCPP_USING_IF_EXISTS;
diff --git a/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp b/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
index 2bac7cbc93ad4..29881891ffd11 100644
--- a/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
+++ b/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
@@ -101,6 +101,8 @@
// using std::atomic_fetch_sub_explicit // see below
// using std::atomic_fetch_or // see below
// using std::atomic_fetch_or_explicit // see below
+// using std::atomic_fetch_xor // see below
+// using std::atomic_fetch_xor_explicit // see below
// using std::atomic_fetch_and // see below
// using std::atomic_fetch_and_explicit // see below
// using std::atomic_flag_test_and_set // see below
@@ -222,6 +224,8 @@ void f() {
using ::atomic_fetch_or_explicit;
using ::atomic_fetch_sub;
using ::atomic_fetch_sub_explicit;
+ using ::atomic_fetch_xor;
+ using ::atomic_fetch_xor_explicit;
using ::atomic_flag_clear;
using ::atomic_flag_clear_explicit;
using ::atomic_flag_test_and_set;
``````````
</details>
https://github.com/llvm/llvm-project/pull/99775
More information about the libcxx-commits
mailing list