tmp/tmpxlyp5166/{from.md → to.md}
RENAMED
|
@@ -1,27 +1,27 @@
|
|
| 1 |
## Deprecated atomic operations <a id="depr.atomics">[[depr.atomics]]</a>
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
| 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
|
| 21 |
-
that overload participates in overload
|
| 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;
|
|
@@ -60,11 +60,12 @@ template<class T>
|
|
| 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
|
|
|
|
| 66 |
|
| 67 |
Concurrent access to the variable being initialized, even via an atomic
|
| 68 |
operation, constitutes a data race.
|
| 69 |
|
| 70 |
[*Example 1*:
|
|
@@ -73,133 +74,120 @@ operation, constitutes a data race.
|
|
| 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]:
|
| 98 |
-
[atomics.types.
|
|
|
|
| 99 |
[basic.link]: basic.md#basic.link
|
| 100 |
-
[basic.
|
|
|
|
| 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.
|
| 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.
|
| 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
|
| 135 |
-
[depr.
|
| 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.
|
| 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 |
-
[
|
|
|
|
| 191 |
[move.iter.elem]: iterators.md#move.iter.elem
|
| 192 |
-
[
|
| 193 |
-
[
|
|
|
|
| 194 |
[string.capacity]: strings.md#string.capacity
|
| 195 |
[structure.specifications]: library.md#structure.specifications
|
| 196 |
-
[
|
|
|
|
|
|
|
| 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]:
|
| 202 |
-
decision.
|
| 203 |
-
|
| 204 |
-
[^3]: The function signature `strlen(const char*)` is declared in
|
| 205 |
`<cstring>`.
|
|
|
|
| 1 |
## Deprecated atomic operations <a id="depr.atomics">[[depr.atomics]]</a>
|
| 2 |
|
| 3 |
+
### General <a id="depr.atomics.general">[[depr.atomics.general]]</a>
|
| 4 |
+
|
| 5 |
+
The header `<atomic>` has the following additions.
|
| 6 |
|
| 7 |
``` cpp
|
| 8 |
namespace std {
|
| 9 |
template<class T>
|
| 10 |
void atomic_init(volatile atomic<T>*, typename atomic<T>::value_type) noexcept;
|
| 11 |
template<class T>
|
| 12 |
void atomic_init(atomic<T>*, typename atomic<T>::value_type) noexcept;
|
| 13 |
|
| 14 |
#define ATOMIC_VAR_INIT(value) see below
|
|
|
|
|
|
|
| 15 |
}
|
| 16 |
```
|
| 17 |
|
| 18 |
### Volatile access <a id="depr.atomics.volatile">[[depr.atomics.volatile]]</a>
|
| 19 |
|
| 20 |
+
If an `atomic` [[atomics.types.generic]] specialization has one of the
|
| 21 |
+
following overloads, then that overload participates in overload
|
| 22 |
+
resolution even if `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;
|
|
|
|
| 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 possibly needs to initialize
|
| 66 |
+
locks. — *end note*]
|
| 67 |
|
| 68 |
Concurrent access to the variable being initialized, even via an atomic
|
| 69 |
operation, constitutes a data race.
|
| 70 |
|
| 71 |
[*Example 1*:
|
|
|
|
| 74 |
atomic<int> v = ATOMIC_VAR_INIT(5);
|
| 75 |
```
|
| 76 |
|
| 77 |
— *end example*]
|
| 78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
<!-- Link reference definitions -->
|
| 80 |
+
[atomics.order]: thread.md#atomics.order
|
| 81 |
+
[atomics.types.generic]: thread.md#atomics.types.generic
|
| 82 |
+
[atomics.types.operations]: thread.md#atomics.types.operations
|
| 83 |
[basic.link]: basic.md#basic.link
|
| 84 |
+
[basic.types]: basic.md#basic.types
|
| 85 |
+
[cerrno.syn]: diagnostics.md#cerrno.syn
|
| 86 |
[class.copy.assign]: class.md#class.copy.assign
|
| 87 |
[class.copy.ctor]: class.md#class.copy.ctor
|
| 88 |
[class.dtor]: class.md#class.dtor
|
| 89 |
[cpp17.equalitycomparable]: #cpp17.equalitycomparable
|
| 90 |
[cpp17.lessthancomparable]: #cpp17.lessthancomparable
|
|
|
|
| 91 |
[dcl.attr.deprecated]: dcl.md#dcl.attr.deprecated
|
| 92 |
[dcl.fct]: dcl.md#dcl.fct
|
| 93 |
[dcl.fct.def.delete]: dcl.md#dcl.fct.def.delete
|
| 94 |
[dcl.struct.bind]: dcl.md#dcl.struct.bind
|
| 95 |
+
[default.allocator]: mem.md#default.allocator
|
| 96 |
[depr]: #depr
|
| 97 |
[depr.arith.conv.enum]: #depr.arith.conv.enum
|
| 98 |
[depr.array.comp]: #depr.array.comp
|
| 99 |
[depr.atomics]: #depr.atomics
|
| 100 |
+
[depr.atomics.general]: #depr.atomics.general
|
| 101 |
[depr.atomics.nonmembers]: #depr.atomics.nonmembers
|
| 102 |
[depr.atomics.types.operations]: #depr.atomics.types.operations
|
| 103 |
[depr.atomics.volatile]: #depr.atomics.volatile
|
| 104 |
+
[depr.c.macros]: #depr.c.macros
|
|
|
|
| 105 |
[depr.capture.this]: #depr.capture.this
|
| 106 |
+
[depr.cerrno]: #depr.cerrno
|
| 107 |
[depr.codecvt.syn]: #depr.codecvt.syn
|
|
|
|
|
|
|
| 108 |
[depr.conversions]: #depr.conversions
|
| 109 |
[depr.conversions.buffer]: #depr.conversions.buffer
|
| 110 |
+
[depr.conversions.general]: #depr.conversions.general
|
| 111 |
[depr.conversions.string]: #depr.conversions.string
|
| 112 |
+
[depr.default.allocator]: #depr.default.allocator
|
| 113 |
[depr.fs.path.factory]: #depr.fs.path.factory
|
| 114 |
+
[depr.general]: #depr.general
|
| 115 |
[depr.impldec]: #depr.impldec
|
|
|
|
| 116 |
[depr.istrstream]: #depr.istrstream
|
| 117 |
[depr.istrstream.cons]: #depr.istrstream.cons
|
| 118 |
+
[depr.istrstream.general]: #depr.istrstream.general
|
| 119 |
[depr.istrstream.members]: #depr.istrstream.members
|
| 120 |
+
[depr.iterator]: #depr.iterator
|
| 121 |
+
[depr.lit]: #depr.lit
|
| 122 |
[depr.local]: #depr.local
|
| 123 |
[depr.locale.category]: #depr.locale.category
|
| 124 |
[depr.locale.stdcvt]: #depr.locale.stdcvt
|
| 125 |
+
[depr.locale.stdcvt.general]: #depr.locale.stdcvt.general
|
| 126 |
[depr.locale.stdcvt.req]: #depr.locale.stdcvt.req
|
| 127 |
+
[depr.mem.poly.allocator.mem]: #depr.mem.poly.allocator.mem
|
| 128 |
[depr.meta.types]: #depr.meta.types
|
| 129 |
[depr.move.iter.elem]: #depr.move.iter.elem
|
| 130 |
+
[depr.numeric.limits.has.denorm]: #depr.numeric.limits.has.denorm
|
| 131 |
[depr.ostrstream]: #depr.ostrstream
|
| 132 |
[depr.ostrstream.cons]: #depr.ostrstream.cons
|
| 133 |
+
[depr.ostrstream.general]: #depr.ostrstream.general
|
| 134 |
[depr.ostrstream.members]: #depr.ostrstream.members
|
| 135 |
[depr.relops]: #depr.relops
|
| 136 |
[depr.res.on.required]: #depr.res.on.required
|
| 137 |
[depr.static.constexpr]: #depr.static.constexpr
|
|
|
|
|
|
|
| 138 |
[depr.str.strstreams]: #depr.str.strstreams
|
| 139 |
[depr.string.capacity]: #depr.string.capacity
|
| 140 |
[depr.strstream]: #depr.strstream
|
| 141 |
[depr.strstream.cons]: #depr.strstream.cons
|
| 142 |
[depr.strstream.dest]: #depr.strstream.dest
|
| 143 |
+
[depr.strstream.general]: #depr.strstream.general
|
| 144 |
[depr.strstream.oper]: #depr.strstream.oper
|
| 145 |
[depr.strstream.syn]: #depr.strstream.syn
|
| 146 |
[depr.strstreambuf]: #depr.strstreambuf
|
| 147 |
[depr.strstreambuf.cons]: #depr.strstreambuf.cons
|
| 148 |
[depr.strstreambuf.cons.alloc]: #depr.strstreambuf.cons.alloc
|
| 149 |
[depr.strstreambuf.cons.ptr]: #depr.strstreambuf.cons.ptr
|
| 150 |
[depr.strstreambuf.cons.sz]: #depr.strstreambuf.cons.sz
|
| 151 |
+
[depr.strstreambuf.general]: #depr.strstreambuf.general
|
| 152 |
[depr.strstreambuf.members]: #depr.strstreambuf.members
|
| 153 |
[depr.strstreambuf.seekoff.newoff]: #depr.strstreambuf.seekoff.newoff
|
| 154 |
[depr.strstreambuf.seekoff.pos]: #depr.strstreambuf.seekoff.pos
|
| 155 |
[depr.strstreambuf.virtuals]: #depr.strstreambuf.virtuals
|
| 156 |
+
[depr.template.template]: #depr.template.template
|
| 157 |
[depr.tuple]: #depr.tuple
|
| 158 |
[depr.util.smartptr.shared.atomic]: #depr.util.smartptr.shared.atomic
|
| 159 |
[depr.variant]: #depr.variant
|
| 160 |
[depr.volatile.type]: #depr.volatile.type
|
| 161 |
[expr.arith.conv]: expr.md#expr.arith.conv
|
| 162 |
[expr.ass]: expr.md#expr.ass
|
|
|
|
| 163 |
[expr.eq]: expr.md#expr.eq
|
| 164 |
[expr.post.incr]: expr.md#expr.post.incr
|
| 165 |
[expr.pre.incr]: expr.md#expr.pre.incr
|
| 166 |
[expr.prim.lambda.capture]: expr.md#expr.prim.lambda.capture
|
| 167 |
[expr.prim.lambda.closure]: expr.md#expr.prim.lambda.closure
|
| 168 |
[expr.rel]: expr.md#expr.rel
|
| 169 |
[expr.spaceship]: expr.md#expr.spaceship
|
|
|
|
| 170 |
[fs.path.fmt.cvt]: input.md#fs.path.fmt.cvt
|
| 171 |
[fs.path.req]: input.md#fs.path.req
|
| 172 |
[fs.path.type.cvt]: input.md#fs.path.type.cvt
|
|
|
|
| 173 |
[locale.category]: localization.md#locale.category
|
| 174 |
[locale.category.facets]: localization.md#locale.category.facets
|
| 175 |
[locale.codecvt]: localization.md#locale.codecvt
|
| 176 |
[locale.spec]: localization.md#locale.spec
|
| 177 |
+
[mem.poly.allocator.mem]: mem.md#mem.poly.allocator.mem
|
| 178 |
+
[meta.rqmts]: meta.md#meta.rqmts
|
| 179 |
[move.iter.elem]: iterators.md#move.iter.elem
|
| 180 |
+
[numeric.limits.general]: support.md#numeric.limits.general
|
| 181 |
+
[numeric.special]: support.md#numeric.special
|
| 182 |
+
[over.literal]: over.md#over.literal
|
| 183 |
[string.capacity]: strings.md#string.capacity
|
| 184 |
[structure.specifications]: library.md#structure.specifications
|
| 185 |
+
[system.error.syn]: diagnostics.md#system.error.syn
|
| 186 |
+
[temp.names]: temp.md#temp.names
|
| 187 |
+
[term.unevaluated.operand]: expr.md#term.unevaluated.operand
|
| 188 |
|
| 189 |
[^1]: The function signature `strlen(const char*)` is declared in
|
| 190 |
`<cstring>`. The macro `INT_MAX` is defined in `<climits>`.
|
| 191 |
|
| 192 |
+
[^2]: The function signature `strlen(const char*)` is declared in
|
|
|
|
|
|
|
|
|
|
| 193 |
`<cstring>`.
|