Skip to content

Commit 442c33f

Browse files
authored
[libc++][stdatomic.h] Implements LWG3671. (#99775)
Implements: - LWG3671 atomic_fetch_xor missing from stdatomic.h
1 parent 5ea9d3d commit 442c33f

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

libcxx/docs/Status/Cxx23Issues.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
"`3656 <https://wg21.link/LWG3656>`__","Inconsistent bit operations returning a count","July 2022","|Complete|","15.0",""
165165
"`3659 <https://wg21.link/LWG3659>`__","Consider ``ATOMIC_FLAG_INIT`` undeprecation","July 2022","|Complete|","15.0"
166166
"`3670 <https://wg21.link/LWG3670>`__","``Cpp17InputIterators`` don't have integer-class difference types","July 2022","","","|ranges|"
167-
"`3671 <https://wg21.link/LWG3671>`__","``atomic_fetch_xor`` missing from ``stdatomic.h``","July 2022","",""
167+
"`3671 <https://wg21.link/LWG3671>`__","``atomic_fetch_xor`` missing from ``stdatomic.h``","July 2022","|Complete|","20.0"
168168
"`3672 <https://wg21.link/LWG3672>`__","``common_iterator::operator->()`` should return by value","July 2022","|Complete|","19.0","|ranges|"
169169
"`3683 <https://wg21.link/LWG3683>`__","``operator==`` for ``polymorphic_allocator`` cannot deduce template argument in common cases","July 2022","|Complete|","20.0"
170170
"`3687 <https://wg21.link/LWG3687>`__","``expected<cv void, E>`` move constructor should move","July 2022","|Complete|","16.0"

libcxx/include/stdatomic.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ using std::atomic_fetch_sub // see below
103103
using std::atomic_fetch_sub_explicit // see below
104104
using std::atomic_fetch_or // see below
105105
using std::atomic_fetch_or_explicit // see below
106+
using std::atomic_fetch_xor // see below
107+
using std::atomic_fetch_xor_explicit // see below
106108
using std::atomic_fetch_and // see below
107109
using std::atomic_fetch_and_explicit // see below
108110
using std::atomic_flag_test_and_set // see below
@@ -204,6 +206,8 @@ using std::atomic_fetch_add_explicit _LIBCPP_USING_IF_EXISTS;
204206
using std::atomic_fetch_and _LIBCPP_USING_IF_EXISTS;
205207
using std::atomic_fetch_and_explicit _LIBCPP_USING_IF_EXISTS;
206208
using std::atomic_fetch_or _LIBCPP_USING_IF_EXISTS;
209+
using std::atomic_fetch_xor_explicit _LIBCPP_USING_IF_EXISTS;
210+
using std::atomic_fetch_xor _LIBCPP_USING_IF_EXISTS;
207211
using std::atomic_fetch_or_explicit _LIBCPP_USING_IF_EXISTS;
208212
using std::atomic_fetch_sub _LIBCPP_USING_IF_EXISTS;
209213
using std::atomic_fetch_sub_explicit _LIBCPP_USING_IF_EXISTS;

libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@
101101
// using std::atomic_fetch_sub_explicit // see below
102102
// using std::atomic_fetch_or // see below
103103
// using std::atomic_fetch_or_explicit // see below
104+
// using std::atomic_fetch_xor // see below
105+
// using std::atomic_fetch_xor_explicit // see below
104106
// using std::atomic_fetch_and // see below
105107
// using std::atomic_fetch_and_explicit // see below
106108
// using std::atomic_flag_test_and_set // see below
@@ -222,6 +224,8 @@ void f() {
222224
using ::atomic_fetch_or_explicit;
223225
using ::atomic_fetch_sub;
224226
using ::atomic_fetch_sub_explicit;
227+
using ::atomic_fetch_xor;
228+
using ::atomic_fetch_xor_explicit;
225229
using ::atomic_flag_clear;
226230
using ::atomic_flag_clear_explicit;
227231
using ::atomic_flag_test_and_set;

0 commit comments

Comments
 (0)