From Jason Turner

[bitset.members]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp_m4wr_dt/{from.md → to.md} +5 -13
tmp/tmp_m4wr_dt/{from.md → to.md} RENAMED
@@ -1,6 +1,6 @@
1
- ### `bitset` members <a id="bitset.members">[[bitset.members]]</a>
2
 
3
  ``` cpp
4
  bitset<N>& operator&=(const bitset<N>& rhs) noexcept;
5
  ```
6
 
@@ -63,12 +63,10 @@ bitset<N>& set() noexcept;
63
 
64
  ``` cpp
65
  bitset<N>& set(size_t pos, bool val = true);
66
  ```
67
 
68
- *Requires:* `pos` is valid
69
-
70
  *Throws:* `out_of_range` if `pos` does not correspond to a valid bit
71
  position.
72
 
73
  *Effects:* Stores a new value in the bit at position `pos` in `*this`.
74
  If `val` is nonzero, the stored value is one, otherwise it is zero.
@@ -85,12 +83,10 @@ bitset<N>& reset() noexcept;
85
 
86
  ``` cpp
87
  bitset<N>& reset(size_t pos);
88
  ```
89
 
90
- *Requires:* `pos` is valid
91
-
92
  *Throws:* `out_of_range` if `pos` does not correspond to a valid bit
93
  position.
94
 
95
  *Effects:* Resets the bit at position `pos` in `*this`.
96
 
@@ -115,12 +111,10 @@ bitset<N>& flip() noexcept;
115
 
116
  ``` cpp
117
  bitset<N>& flip(size_t pos);
118
  ```
119
 
120
- *Requires:* `pos` is valid
121
-
122
  *Throws:* `out_of_range` if `pos` does not correspond to a valid bit
123
  position.
124
 
125
  *Effects:* Toggles the bit at position `pos` in `*this`.
126
 
@@ -191,35 +185,33 @@ bool operator!=(const bitset<N>& rhs) const noexcept;
191
 
192
  ``` cpp
193
  bool test(size_t pos) const;
194
  ```
195
 
196
- *Requires:* `pos` is valid
197
-
198
  *Throws:* `out_of_range` if `pos` does not correspond to a valid bit
199
  position.
200
 
201
  *Returns:* `true` if the bit at position `pos` in `*this` has the value
202
  one.
203
 
204
  ``` cpp
205
  bool all() const noexcept;
206
  ```
207
 
208
- *Returns:* `count() == size()`
209
 
210
  ``` cpp
211
  bool any() const noexcept;
212
  ```
213
 
214
- *Returns:* `count() != 0`
215
 
216
  ``` cpp
217
  bool none() const noexcept;
218
  ```
219
 
220
- *Returns:* `count() == 0`
221
 
222
  ``` cpp
223
  bitset<N> operator<<(size_t pos) const noexcept;
224
  ```
225
 
@@ -252,10 +244,10 @@ bitset<N>::reference operator[](size_t pos);
252
  `(*this)[pos] == this->test(pos)`, and such that `(*this)[pos] = val` is
253
  equivalent to `this->set(pos, val)`.
254
 
255
  *Throws:* Nothing.
256
 
257
- For the purpose of determining the presence of a data
258
  race ([[intro.multithread]]), any access or update through the
259
  resulting reference potentially accesses or modifies, respectively, the
260
  entire underlying bitset.
261
 
 
1
+ #### `bitset` members <a id="bitset.members">[[bitset.members]]</a>
2
 
3
  ``` cpp
4
  bitset<N>& operator&=(const bitset<N>& rhs) noexcept;
5
  ```
6
 
 
63
 
64
  ``` cpp
65
  bitset<N>& set(size_t pos, bool val = true);
66
  ```
67
 
 
 
68
  *Throws:* `out_of_range` if `pos` does not correspond to a valid bit
69
  position.
70
 
71
  *Effects:* Stores a new value in the bit at position `pos` in `*this`.
72
  If `val` is nonzero, the stored value is one, otherwise it is zero.
 
83
 
84
  ``` cpp
85
  bitset<N>& reset(size_t pos);
86
  ```
87
 
 
 
88
  *Throws:* `out_of_range` if `pos` does not correspond to a valid bit
89
  position.
90
 
91
  *Effects:* Resets the bit at position `pos` in `*this`.
92
 
 
111
 
112
  ``` cpp
113
  bitset<N>& flip(size_t pos);
114
  ```
115
 
 
 
116
  *Throws:* `out_of_range` if `pos` does not correspond to a valid bit
117
  position.
118
 
119
  *Effects:* Toggles the bit at position `pos` in `*this`.
120
 
 
185
 
186
  ``` cpp
187
  bool test(size_t pos) const;
188
  ```
189
 
 
 
190
  *Throws:* `out_of_range` if `pos` does not correspond to a valid bit
191
  position.
192
 
193
  *Returns:* `true` if the bit at position `pos` in `*this` has the value
194
  one.
195
 
196
  ``` cpp
197
  bool all() const noexcept;
198
  ```
199
 
200
+ *Returns:* `count() == size()`.
201
 
202
  ``` cpp
203
  bool any() const noexcept;
204
  ```
205
 
206
+ *Returns:* `count() != 0`.
207
 
208
  ``` cpp
209
  bool none() const noexcept;
210
  ```
211
 
212
+ *Returns:* `count() == 0`.
213
 
214
  ``` cpp
215
  bitset<N> operator<<(size_t pos) const noexcept;
216
  ```
217
 
 
244
  `(*this)[pos] == this->test(pos)`, and such that `(*this)[pos] = val` is
245
  equivalent to `this->set(pos, val)`.
246
 
247
  *Throws:* Nothing.
248
 
249
+ *Remarks:* For the purpose of determining the presence of a data
250
  race ([[intro.multithread]]), any access or update through the
251
  resulting reference potentially accesses or modifies, respectively, the
252
  entire underlying bitset.
253