Annex D (normative)
Compatibility features
[depr]
D.25
Deprecated atomic operations
[depr.atomics]
D.25.4
Operations on atomic types
[depr.atomics.types.operations]
🔗
#define
ATOMIC_VAR_INIT
(
value
)
see below
1
#
The macro expands to a token sequence suitable for constant initialization of an atomic variable of static storage duration of a type that is initialization-compatible with
value
.
[
Note
1
:
This operation might need to initialize locks
.
—
end note
]
Concurrent access to the variable being initialized, even via an atomic operation, constitutes a data race
.
[
Example
1
:
atomic
<
int
>
v
=
ATOMIC_VAR_INIT
(
5
)
;
—
end example
]