From Jason Turner

[depr.atomics]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp5u35fcv0/{from.md → to.md} +38 -63
tmp/tmp5u35fcv0/{from.md → to.md} RENAMED
@@ -8,10 +8,13 @@ The header `<atomic>` has the following additions.
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
 
@@ -57,11 +60,11 @@ template<class T>
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 possibly needs to initialize
66
  locks. — *end note*]
67
 
@@ -74,120 +77,92 @@ operation, constitutes a data race.
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>`.
 
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
+ template<class T>
14
+ constexpr T kill_dependency(T y) noexcept; // freestanding
15
+ inline constexpr memory_order memory_order_consume = memory_order::consume; // freestanding
16
 
17
  #define ATOMIC_VAR_INIT(value) see below
18
  }
19
  ```
20
 
 
60
  ``` cpp
61
  #define ATOMIC_VAR_INIT(value) see below
62
  ```
63
 
64
  The macro expands to a token sequence suitable for constant
65
+ initialization of an atomic variable with static storage duration of a
66
  type that is initialization-compatible with `value`.
67
 
68
  [*Note 1*: This operation possibly needs to initialize
69
  locks. — *end note*]
70
 
 
77
  atomic<int> v = ATOMIC_VAR_INIT(5);
78
  ```
79
 
80
  — *end example*]
81
 
82
+ ### `memory_order::consume` <a id="depr.atomics.order">[[depr.atomics.order]]</a>
83
+
84
+ The `memory_order` enumeration contains an additional enumerator:
85
+
86
+ ``` cpp
87
+ consume = 1
88
+ ```
89
+
90
+ The `memory_order::consume` enumerator is allowed wherever
91
+ `memory_order::acquire` is allowed, and it has the same meaning.
92
+
93
+ ``` cpp
94
+ template<class T> constexpr T kill_dependency(T y) noexcept;
95
+ ```
96
+
97
+ *Returns:* `y`.
98
+
99
  <!-- Link reference definitions -->
 
100
  [atomics.types.generic]: thread.md#atomics.types.generic
101
+ [basic.def]: basic.md#basic.def
102
  [basic.link]: basic.md#basic.link
103
  [basic.types]: basic.md#basic.types
 
104
  [class.copy.assign]: class.md#class.copy.assign
105
  [class.copy.ctor]: class.md#class.copy.ctor
106
  [class.dtor]: class.md#class.dtor
107
+ [class.static.data]: class.md#class.static.data
108
  [cpp17.equalitycomparable]: #cpp17.equalitycomparable
109
  [cpp17.lessthancomparable]: #cpp17.lessthancomparable
110
  [dcl.attr.deprecated]: dcl.md#dcl.attr.deprecated
111
  [dcl.fct]: dcl.md#dcl.fct
112
  [dcl.fct.def.delete]: dcl.md#dcl.fct.def.delete
113
  [dcl.struct.bind]: dcl.md#dcl.struct.bind
 
114
  [depr]: #depr
 
 
115
  [depr.atomics]: #depr.atomics
116
  [depr.atomics.general]: #depr.atomics.general
117
  [depr.atomics.nonmembers]: #depr.atomics.nonmembers
118
+ [depr.atomics.order]: #depr.atomics.order
119
  [depr.atomics.types.operations]: #depr.atomics.types.operations
120
  [depr.atomics.volatile]: #depr.atomics.volatile
121
  [depr.c.macros]: #depr.c.macros
122
  [depr.capture.this]: #depr.capture.this
123
  [depr.cerrno]: #depr.cerrno
124
+ [depr.ctime]: #depr.ctime
125
+ [depr.ellipsis.comma]: #depr.ellipsis.comma
126
+ [depr.filesystems]: #depr.filesystems
127
+ [depr.format]: #depr.format
128
+ [depr.format.arg]: #depr.format.arg
129
+ [depr.format.syn]: #depr.format.syn
130
  [depr.fs.path.factory]: #depr.fs.path.factory
131
+ [depr.fs.path.obs]: #depr.fs.path.obs
132
  [depr.general]: #depr.general
133
  [depr.impldec]: #depr.impldec
 
 
 
 
134
  [depr.iterator]: #depr.iterator
135
  [depr.lit]: #depr.lit
136
  [depr.local]: #depr.local
137
  [depr.locale.category]: #depr.locale.category
 
 
 
 
138
  [depr.meta.types]: #depr.meta.types
139
  [depr.move.iter.elem]: #depr.move.iter.elem
140
  [depr.numeric.limits.has.denorm]: #depr.numeric.limits.has.denorm
 
 
 
 
141
  [depr.relops]: #depr.relops
 
142
  [depr.static.constexpr]: #depr.static.constexpr
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  [depr.template.template]: #depr.template.template
144
  [depr.tuple]: #depr.tuple
 
145
  [depr.variant]: #depr.variant
146
  [depr.volatile.type]: #depr.volatile.type
147
+ [expr.assign]: expr.md#expr.assign
 
 
148
  [expr.post.incr]: expr.md#expr.post.incr
149
  [expr.pre.incr]: expr.md#expr.pre.incr
150
  [expr.prim.lambda.capture]: expr.md#expr.prim.lambda.capture
151
  [expr.prim.lambda.closure]: expr.md#expr.prim.lambda.closure
 
 
152
  [fs.path.fmt.cvt]: input.md#fs.path.fmt.cvt
153
+ [fs.path.member]: input.md#fs.path.member
154
  [fs.path.req]: input.md#fs.path.req
155
  [fs.path.type.cvt]: input.md#fs.path.type.cvt
156
+ [locale.category]: text.md#locale.category
157
+ [locale.category.facets]: text.md#locale.category.facets
158
+ [locale.codecvt]: text.md#locale.codecvt
159
+ [locale.spec]: text.md#locale.spec
 
160
  [meta.rqmts]: meta.md#meta.rqmts
161
  [move.iter.elem]: iterators.md#move.iter.elem
162
  [numeric.limits.general]: support.md#numeric.limits.general
163
  [numeric.special]: support.md#numeric.special
164
  [over.literal]: over.md#over.literal
165
+ [res.on.data.races]: library.md#res.on.data.races
 
166
  [system.error.syn]: diagnostics.md#system.error.syn
167
  [temp.names]: temp.md#temp.names
168
  [term.unevaluated.operand]: expr.md#term.unevaluated.operand