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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Deprecated atomic operations <a id="depr.atomics">[[depr.atomics]]</a>
|
| 2 |
+
|
| 3 |
+
The header `<atomics>` has the following additions.
|
| 4 |
+
|
| 5 |
+
``` cpp
|
| 6 |
+
namespace std {
|
| 7 |
+
template<class T>
|
| 8 |
+
void atomic_init(volatile atomic<T>*, typename atomic<T>::value_type) noexcept;
|
| 9 |
+
template<class T>
|
| 10 |
+
void atomic_init(atomic<T>*, typename atomic<T>::value_type) noexcept;
|
| 11 |
+
|
| 12 |
+
#define ATOMIC_VAR_INIT(value) see below
|
| 13 |
+
|
| 14 |
+
#define ATOMIC_FLAG_INIT see below
|
| 15 |
+
}
|
| 16 |
+
```
|
| 17 |
+
|
| 18 |
+
### Volatile access <a id="depr.atomics.volatile">[[depr.atomics.volatile]]</a>
|
| 19 |
+
|
| 20 |
+
If an atomic specialization has one of the following overloads, then
|
| 21 |
+
that overload participates in overload resolution even if
|
| 22 |
+
`atomic<T>::is_always_lock_free` is `false`:
|
| 23 |
+
|
| 24 |
+
``` cpp
|
| 25 |
+
void store(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;
|
| 26 |
+
T operator=(T desired) volatile noexcept;
|
| 27 |
+
T load(memory_order order = memory_order::seq_cst) const volatile noexcept;
|
| 28 |
+
operator T() const volatile noexcept;
|
| 29 |
+
T exchange(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;
|
| 30 |
+
bool compare_exchange_weak(T& expected, T desired,
|
| 31 |
+
memory_order success, memory_order failure) volatile noexcept;
|
| 32 |
+
bool compare_exchange_strong(T& expected, T desired,
|
| 33 |
+
memory_order success, memory_order failure) volatile noexcept;
|
| 34 |
+
bool compare_exchange_weak(T& expected, T desired,
|
| 35 |
+
memory_order order = memory_order::seq_cst) volatile noexcept;
|
| 36 |
+
bool compare_exchange_strong(T& expected, T desired,
|
| 37 |
+
memory_order order = memory_order::seq_cst) volatile noexcept;
|
| 38 |
+
T fetch_key(T operand, memory_order order = memory_order::seq_cst) volatile noexcept;
|
| 39 |
+
T operator op=(T operand) volatile noexcept;
|
| 40 |
+
T* fetch_key(ptrdiff_t operand, memory_order order = memory_order::seq_cst) volatile noexcept;
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
### Non-member functions <a id="depr.atomics.nonmembers">[[depr.atomics.nonmembers]]</a>
|
| 44 |
+
|
| 45 |
+
``` cpp
|
| 46 |
+
template<class T>
|
| 47 |
+
void atomic_init(volatile atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
|
| 48 |
+
template<class T>
|
| 49 |
+
void atomic_init(atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
*Effects:* Equivalent to:
|
| 53 |
+
`atomic_store_explicit(object, desired, memory_order::relaxed);`
|
| 54 |
+
|
| 55 |
+
### Operations on atomic types <a id="depr.atomics.types.operations">[[depr.atomics.types.operations]]</a>
|
| 56 |
+
|
| 57 |
+
``` cpp
|
| 58 |
+
#define ATOMIC_VAR_INIT(value) see below
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
The macro expands to a token sequence suitable for constant
|
| 62 |
+
initialization of an atomic variable of static storage duration of a
|
| 63 |
+
type that is initialization-compatible with `value`.
|
| 64 |
+
|
| 65 |
+
[*Note 1*: This operation may need to initialize locks. — *end note*]
|
| 66 |
+
|
| 67 |
+
Concurrent access to the variable being initialized, even via an atomic
|
| 68 |
+
operation, constitutes a data race.
|
| 69 |
+
|
| 70 |
+
[*Example 1*:
|
| 71 |
+
|
| 72 |
+
``` cpp
|
| 73 |
+
atomic<int> v = ATOMIC_VAR_INIT(5);
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
— *end example*]
|
| 77 |
+
|
| 78 |
+
### Flag type and operations <a id="depr.atomics.flag">[[depr.atomics.flag]]</a>
|
| 79 |
+
|
| 80 |
+
``` cpp
|
| 81 |
+
#define ATOMIC_FLAG_INIT see below
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
*Remarks:* The macro `ATOMIC_FLAG_INIT` is defined in such a way that it
|
| 85 |
+
can be used to initialize an object of type `atomic_flag` to the clear
|
| 86 |
+
state. The macro can be used in the form:
|
| 87 |
+
|
| 88 |
+
``` cpp
|
| 89 |
+
atomic_flag guard = ATOMIC_FLAG_INIT;
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
+
It is unspecified whether the macro can be used in other initialization
|
| 93 |
+
contexts. For a complete static-duration object, that initialization
|
| 94 |
+
shall be static.
|
| 95 |
+
|
| 96 |
+
<!-- Link reference definitions -->
|
| 97 |
+
[atomics.order]: atomics.md#atomics.order
|
| 98 |
+
[atomics.types.operations]: atomics.md#atomics.types.operations
|
| 99 |
+
[basic.link]: basic.md#basic.link
|
| 100 |
+
[basic.scope.namespace]: basic.md#basic.scope.namespace
|
| 101 |
+
[class.copy.assign]: class.md#class.copy.assign
|
| 102 |
+
[class.copy.ctor]: class.md#class.copy.ctor
|
| 103 |
+
[class.dtor]: class.md#class.dtor
|
| 104 |
+
[cpp17.equalitycomparable]: #cpp17.equalitycomparable
|
| 105 |
+
[cpp17.lessthancomparable]: #cpp17.lessthancomparable
|
| 106 |
+
[cstddef.syn]: support.md#cstddef.syn
|
| 107 |
+
[dcl.attr.deprecated]: dcl.md#dcl.attr.deprecated
|
| 108 |
+
[dcl.fct]: dcl.md#dcl.fct
|
| 109 |
+
[dcl.fct.def.delete]: dcl.md#dcl.fct.def.delete
|
| 110 |
+
[dcl.struct.bind]: dcl.md#dcl.struct.bind
|
| 111 |
+
[depr]: #depr
|
| 112 |
+
[depr.arith.conv.enum]: #depr.arith.conv.enum
|
| 113 |
+
[depr.array.comp]: #depr.array.comp
|
| 114 |
+
[depr.atomics]: #depr.atomics
|
| 115 |
+
[depr.atomics.flag]: #depr.atomics.flag
|
| 116 |
+
[depr.atomics.nonmembers]: #depr.atomics.nonmembers
|
| 117 |
+
[depr.atomics.types.operations]: #depr.atomics.types.operations
|
| 118 |
+
[depr.atomics.volatile]: #depr.atomics.volatile
|
| 119 |
+
[depr.c.headers]: #depr.c.headers
|
| 120 |
+
[depr.c.headers.other]: #depr.c.headers.other
|
| 121 |
+
[depr.capture.this]: #depr.capture.this
|
| 122 |
+
[depr.codecvt.syn]: #depr.codecvt.syn
|
| 123 |
+
[depr.comma.subscript]: #depr.comma.subscript
|
| 124 |
+
[depr.complex.h.syn]: #depr.complex.h.syn
|
| 125 |
+
[depr.conversions]: #depr.conversions
|
| 126 |
+
[depr.conversions.buffer]: #depr.conversions.buffer
|
| 127 |
+
[depr.conversions.string]: #depr.conversions.string
|
| 128 |
+
[depr.fs.path.factory]: #depr.fs.path.factory
|
| 129 |
+
[depr.impldec]: #depr.impldec
|
| 130 |
+
[depr.iso646.h.syn]: #depr.iso646.h.syn
|
| 131 |
+
[depr.istrstream]: #depr.istrstream
|
| 132 |
+
[depr.istrstream.cons]: #depr.istrstream.cons
|
| 133 |
+
[depr.istrstream.members]: #depr.istrstream.members
|
| 134 |
+
[depr.iterator.basic]: #depr.iterator.basic
|
| 135 |
+
[depr.iterator.primitives]: #depr.iterator.primitives
|
| 136 |
+
[depr.local]: #depr.local
|
| 137 |
+
[depr.locale.category]: #depr.locale.category
|
| 138 |
+
[depr.locale.stdcvt]: #depr.locale.stdcvt
|
| 139 |
+
[depr.locale.stdcvt.req]: #depr.locale.stdcvt.req
|
| 140 |
+
[depr.meta.types]: #depr.meta.types
|
| 141 |
+
[depr.move.iter.elem]: #depr.move.iter.elem
|
| 142 |
+
[depr.ostrstream]: #depr.ostrstream
|
| 143 |
+
[depr.ostrstream.cons]: #depr.ostrstream.cons
|
| 144 |
+
[depr.ostrstream.members]: #depr.ostrstream.members
|
| 145 |
+
[depr.relops]: #depr.relops
|
| 146 |
+
[depr.res.on.required]: #depr.res.on.required
|
| 147 |
+
[depr.static.constexpr]: #depr.static.constexpr
|
| 148 |
+
[depr.stdalign.h.syn]: #depr.stdalign.h.syn
|
| 149 |
+
[depr.stdbool.h.syn]: #depr.stdbool.h.syn
|
| 150 |
+
[depr.str.strstreams]: #depr.str.strstreams
|
| 151 |
+
[depr.string.capacity]: #depr.string.capacity
|
| 152 |
+
[depr.strstream]: #depr.strstream
|
| 153 |
+
[depr.strstream.cons]: #depr.strstream.cons
|
| 154 |
+
[depr.strstream.dest]: #depr.strstream.dest
|
| 155 |
+
[depr.strstream.oper]: #depr.strstream.oper
|
| 156 |
+
[depr.strstream.syn]: #depr.strstream.syn
|
| 157 |
+
[depr.strstreambuf]: #depr.strstreambuf
|
| 158 |
+
[depr.strstreambuf.cons]: #depr.strstreambuf.cons
|
| 159 |
+
[depr.strstreambuf.cons.alloc]: #depr.strstreambuf.cons.alloc
|
| 160 |
+
[depr.strstreambuf.cons.ptr]: #depr.strstreambuf.cons.ptr
|
| 161 |
+
[depr.strstreambuf.cons.sz]: #depr.strstreambuf.cons.sz
|
| 162 |
+
[depr.strstreambuf.members]: #depr.strstreambuf.members
|
| 163 |
+
[depr.strstreambuf.seekoff.newoff]: #depr.strstreambuf.seekoff.newoff
|
| 164 |
+
[depr.strstreambuf.seekoff.pos]: #depr.strstreambuf.seekoff.pos
|
| 165 |
+
[depr.strstreambuf.virtuals]: #depr.strstreambuf.virtuals
|
| 166 |
+
[depr.tgmath.h.syn]: #depr.tgmath.h.syn
|
| 167 |
+
[depr.tuple]: #depr.tuple
|
| 168 |
+
[depr.util.smartptr.shared.atomic]: #depr.util.smartptr.shared.atomic
|
| 169 |
+
[depr.variant]: #depr.variant
|
| 170 |
+
[depr.volatile.type]: #depr.volatile.type
|
| 171 |
+
[expr.arith.conv]: expr.md#expr.arith.conv
|
| 172 |
+
[expr.ass]: expr.md#expr.ass
|
| 173 |
+
[expr.comma]: expr.md#expr.comma
|
| 174 |
+
[expr.eq]: expr.md#expr.eq
|
| 175 |
+
[expr.post.incr]: expr.md#expr.post.incr
|
| 176 |
+
[expr.pre.incr]: expr.md#expr.pre.incr
|
| 177 |
+
[expr.prim.lambda.capture]: expr.md#expr.prim.lambda.capture
|
| 178 |
+
[expr.prim.lambda.closure]: expr.md#expr.prim.lambda.closure
|
| 179 |
+
[expr.rel]: expr.md#expr.rel
|
| 180 |
+
[expr.spaceship]: expr.md#expr.spaceship
|
| 181 |
+
[expr.sub]: expr.md#expr.sub
|
| 182 |
+
[fs.path.fmt.cvt]: input.md#fs.path.fmt.cvt
|
| 183 |
+
[fs.path.req]: input.md#fs.path.req
|
| 184 |
+
[fs.path.type.cvt]: input.md#fs.path.type.cvt
|
| 185 |
+
[lex.key]: lex.md#lex.key
|
| 186 |
+
[locale.category]: localization.md#locale.category
|
| 187 |
+
[locale.category.facets]: localization.md#locale.category.facets
|
| 188 |
+
[locale.codecvt]: localization.md#locale.codecvt
|
| 189 |
+
[locale.spec]: localization.md#locale.spec
|
| 190 |
+
[meta.rqmts]: utilities.md#meta.rqmts
|
| 191 |
+
[move.iter.elem]: iterators.md#move.iter.elem
|
| 192 |
+
[namespace.udecl]: dcl.md#namespace.udecl
|
| 193 |
+
[sf.cmath]: numerics.md#sf.cmath
|
| 194 |
+
[string.capacity]: strings.md#string.capacity
|
| 195 |
+
[structure.specifications]: library.md#structure.specifications
|
| 196 |
+
[support.types.byteops]: support.md#support.types.byteops
|
| 197 |
+
|
| 198 |
+
[^1]: The function signature `strlen(const char*)` is declared in
|
| 199 |
+
`<cstring>`. The macro `INT_MAX` is defined in `<climits>`.
|
| 200 |
+
|
| 201 |
+
[^2]: An implementation should consider `alsize` in making this
|
| 202 |
+
decision.
|
| 203 |
+
|
| 204 |
+
[^3]: The function signature `strlen(const char*)` is declared in
|
| 205 |
+
`<cstring>`.
|