Skip to content

Commit 0fb1d3e

Browse files
committed
New issue from Jiang An: "<stdatomic.h> should provide ATOMIC_CHAR8_T_LOCK_FREE"
1 parent d8e4eae commit 0fb1d3e

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

xml/issue4480.xml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4480" status="New">
5+
<title><tt>&lt;stdatomic.h&gt;</tt> should provide `ATOMIC_CHAR8_T_LOCK_FREE`</title>
6+
<section><sref ref="[stdatomic.h.syn]"/></section>
7+
<submitter>Jiang An</submitter>
8+
<date>21 Nov 2025</date>
9+
<priority>99</priority>
10+
11+
<discussion>
12+
<p>
13+
Currently, <tt>&lt;stdatomic.h&gt;</tt> is specified to provide `atomic_char8_t` but not its
14+
corresponding `ATOMIC_CHAR8_T_LOCK_FREE` macro, which is self-inconsistent. Also, given
15+
<a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2653.htm">WG14 N2653</a> added
16+
`ATOMIC_CHAR8_T_LOCK_FREE` to C's <tt>&lt;stdatomic.h&gt;</tt> in C23, perhaps C++ should do
17+
the same thing in the spirit of <paper num="P3348R4"/>.
18+
</p>
19+
</discussion>
20+
21+
<resolution>
22+
<p>
23+
This wording is relative to <paper num="N5014"/>.
24+
</p>
25+
26+
<ol>
27+
<li><p>Modify <sref ref="[stdatomic.h.syn]"/>, header <tt>&lt;stdatomic.h&gt;</tt> synopsis, as indicated:</p>
28+
29+
<blockquote>
30+
<pre>
31+
template&lt;class T&gt;
32+
using <i>std-atomic</i> = std::atomic&lt;T&gt;; <i>// exposition only</i>
33+
34+
#define _Atomic(T) <i>std-atomic</i>&lt;T&gt;
35+
36+
#define ATOMIC_BOOL_LOCK_FREE <i>see below</i>
37+
#define ATOMIC_CHAR_LOCK_FREE <i>see below</i>
38+
<ins>#define ATOMIC_CHAR8_T_LOCK_FREE <i>see below</i></ins>
39+
#define ATOMIC_CHAR16_T_LOCK_FREE <i>see below</i>
40+
#define ATOMIC_CHAR32_T_LOCK_FREE <i>see below</i>
41+
#define ATOMIC_WCHAR_T_LOCK_FREE <i>see below</i>
42+
#define ATOMIC_SHORT_LOCK_FREE <i>see below</i>
43+
#define ATOMIC_INT_LOCK_FREE <i>see below</i>
44+
#define ATOMIC_LONG_LOCK_FREE <i>see below</i>
45+
#define ATOMIC_LLONG_LOCK_FREE <i>see below</i>
46+
#define ATOMIC_POINTER_LOCK_FREE <i>see below</i>
47+
48+
[&hellip;]
49+
</pre>
50+
</blockquote>
51+
</li>
52+
</ol>
53+
54+
</resolution>
55+
56+
</issue>

0 commit comments

Comments
 (0)