From Jason Turner

[bitset.members]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp5t9tkv3n/{from.md → to.md} +24 -32
tmp/tmp5t9tkv3n/{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,18 +63,18 @@ bitset<N>& set() noexcept;
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.
73
 
74
  *Returns:* `*this`.
75
 
 
 
 
76
  ``` cpp
77
  bitset<N>& reset() noexcept;
78
  ```
79
 
80
  *Effects:* Resets all bits in `*this`.
@@ -83,17 +83,17 @@ bitset<N>& reset() noexcept;
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
 
93
  *Returns:* `*this`.
94
 
 
 
 
95
  ``` cpp
96
  bitset<N> operator~() const noexcept;
97
  ```
98
 
99
  *Effects:* Constructs an object `x` of class `bitset<N>` and initializes
@@ -111,37 +111,35 @@ bitset<N>& flip() noexcept;
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
 
121
  *Returns:* `*this`.
122
 
 
 
 
123
  ``` cpp
124
  unsigned long to_ulong() const;
125
  ```
126
 
127
- *Throws:* `overflow_error`
128
-
129
- if the integral value `x` corresponding to the bits in `*this` cannot be
130
- represented as type `unsigned long`.
131
-
132
  *Returns:* `x`.
133
 
 
 
 
134
  ``` cpp
135
  unsigned long long to_ullong() const;
136
  ```
137
 
 
 
138
  *Throws:* `overflow_error` if the integral value `x` corresponding to
139
  the bits in `*this` cannot be represented as type `unsigned long long`.
140
 
141
- *Returns:* `x`.
142
-
143
  ``` cpp
144
  template<class charT = char,
145
  class traits = char_traits<charT>,
146
  class Allocator = allocator<charT>>
147
  basic_string<charT, traits, Allocator>
@@ -175,26 +173,20 @@ bool operator==(const bitset<N>& rhs) const noexcept;
175
  ```
176
 
177
  *Returns:* `true` if the value of each bit in `*this` equals the value
178
  of the corresponding bit in `rhs`.
179
 
180
- ``` cpp
181
- bool operator!=(const bitset<N>& rhs) const noexcept;
182
- ```
183
-
184
- *Returns:* `true` if `!(*this == rhs)`.
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()`.
@@ -225,29 +217,29 @@ bitset<N> operator>>(size_t pos) const noexcept;
225
 
226
  ``` cpp
227
  constexpr bool operator[](size_t pos) const;
228
  ```
229
 
230
- *Requires:* `pos` shall be valid.
231
 
232
  *Returns:* `true` if the bit at position `pos` in `*this` has the value
233
  one, otherwise `false`.
234
 
235
  *Throws:* Nothing.
236
 
237
  ``` cpp
238
  bitset<N>::reference operator[](size_t pos);
239
  ```
240
 
241
- *Requires:* `pos` shall be valid.
242
 
243
  *Returns:* An object of type `bitset<N>::reference` such that
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
 
 
1
+ #### 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
  *Effects:* Stores a new value in the bit at position `pos` in `*this`.
69
+ If `val` is `true`, the stored value is one, otherwise it is zero.
70
 
71
  *Returns:* `*this`.
72
 
73
+ *Throws:* `out_of_range` if `pos` does not correspond to a valid bit
74
+ position.
75
+
76
  ``` cpp
77
  bitset<N>& reset() noexcept;
78
  ```
79
 
80
  *Effects:* Resets all bits in `*this`.
 
83
 
84
  ``` cpp
85
  bitset<N>& reset(size_t pos);
86
  ```
87
 
 
 
 
88
  *Effects:* Resets the bit at position `pos` in `*this`.
89
 
90
  *Returns:* `*this`.
91
 
92
+ *Throws:* `out_of_range` if `pos` does not correspond to a valid bit
93
+ position.
94
+
95
  ``` cpp
96
  bitset<N> operator~() const noexcept;
97
  ```
98
 
99
  *Effects:* Constructs an object `x` of class `bitset<N>` and initializes
 
111
 
112
  ``` cpp
113
  bitset<N>& flip(size_t pos);
114
  ```
115
 
 
 
 
116
  *Effects:* Toggles the bit at position `pos` in `*this`.
117
 
118
  *Returns:* `*this`.
119
 
120
+ *Throws:* `out_of_range` if `pos` does not correspond to a valid bit
121
+ position.
122
+
123
  ``` cpp
124
  unsigned long to_ulong() const;
125
  ```
126
 
 
 
 
 
 
127
  *Returns:* `x`.
128
 
129
+ *Throws:* `overflow_error` if the integral value `x` corresponding to
130
+ the bits in `*this` cannot be represented as type `unsigned long`.
131
+
132
  ``` cpp
133
  unsigned long long to_ullong() const;
134
  ```
135
 
136
+ *Returns:* `x`.
137
+
138
  *Throws:* `overflow_error` if the integral value `x` corresponding to
139
  the bits in `*this` cannot be represented as type `unsigned long long`.
140
 
 
 
141
  ``` cpp
142
  template<class charT = char,
143
  class traits = char_traits<charT>,
144
  class Allocator = allocator<charT>>
145
  basic_string<charT, traits, Allocator>
 
173
  ```
174
 
175
  *Returns:* `true` if the value of each bit in `*this` equals the value
176
  of the corresponding bit in `rhs`.
177
 
 
 
 
 
 
 
178
  ``` cpp
179
  bool test(size_t pos) const;
180
  ```
181
 
 
 
 
182
  *Returns:* `true` if the bit at position `pos` in `*this` has the value
183
  one.
184
 
185
+ *Throws:* `out_of_range` if `pos` does not correspond to a valid bit
186
+ position.
187
+
188
  ``` cpp
189
  bool all() const noexcept;
190
  ```
191
 
192
  *Returns:* `count() == size()`.
 
217
 
218
  ``` cpp
219
  constexpr bool operator[](size_t pos) const;
220
  ```
221
 
222
+ *Preconditions:* `pos` is valid.
223
 
224
  *Returns:* `true` if the bit at position `pos` in `*this` has the value
225
  one, otherwise `false`.
226
 
227
  *Throws:* Nothing.
228
 
229
  ``` cpp
230
  bitset<N>::reference operator[](size_t pos);
231
  ```
232
 
233
+ *Preconditions:* `pos` is valid.
234
 
235
  *Returns:* An object of type `bitset<N>::reference` such that
236
  `(*this)[pos] == this->test(pos)`, and such that `(*this)[pos] = val` is
237
  equivalent to `this->set(pos, val)`.
238
 
239
  *Throws:* Nothing.
240
 
241
  *Remarks:* For the purpose of determining the presence of a data
242
+ race [[intro.multithread]], any access or update through the resulting
243
+ reference potentially accesses or modifies, respectively, the entire
244
+ underlying bitset.
245