From Jason Turner

[depr.atomics.types.operations]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpaek9d6z1/{from.md → to.md} +23 -0
tmp/tmpaek9d6z1/{from.md → to.md} RENAMED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Operations on atomic types <a id="depr.atomics.types.operations">[[depr.atomics.types.operations]]</a>
2
+
3
+ ``` cpp
4
+ #define ATOMIC_VAR_INIT(value) see below
5
+ ```
6
+
7
+ The macro expands to a token sequence suitable for constant
8
+ initialization of an atomic variable of static storage duration of a
9
+ type that is initialization-compatible with `value`.
10
+
11
+ [*Note 1*: This operation may need to initialize locks. — *end note*]
12
+
13
+ Concurrent access to the variable being initialized, even via an atomic
14
+ operation, constitutes a data race.
15
+
16
+ [*Example 1*:
17
+
18
+ ``` cpp
19
+ atomic<int> v = ATOMIC_VAR_INIT(5);
20
+ ```
21
+
22
+ — *end example*]
23
+