This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Tentatively Ready status.

### 3671. `atomic_fetch_xor` missing from `stdatomic.h`

Section: 31.12 [stdatomic.h.syn] Status: Tentatively Ready Submitter: Hubert Tong Opened: 2022-02-09 Last modified: 2022-02-10

Priority: Not Prioritized

View all issues with Tentatively Ready status.

Discussion:

C17 subclause 7.17.7.5 provides `atomic_fetch_xor` and `atomic_fetch_xor_explicit`. `stdatomic.h` in the working draft (N4901) does not.

[2022-02-09; Jonathan comments and provides wording]

C++20 31.2 [atomics.syn] has both of them, too, so it should definitely be in the common subset.

[2022-03-04; Reflector poll]

Set status to Tentatively Ready after eight votes in favour during reflector poll.

Proposed resolution:

This wording is relative to N4901.

1. Modify 31.12 [stdatomic.h.syn], header `<stdatomic.h>` synopsis, as indicated:

   > [Drafting Note: The editor is kindly requested to reorder these "`atomic_fetch_KEY`" declarations to match the other synopses in Clause 31 [atomics]: `add`, `sub`, `and`, `or`, `xor`.]

   >     […]
   >     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
   >     […]