From Jason Turner

[ios]

Diff to HTML by rtfpessoa

tmp/tmpvx2v41xb/{from.md → to.md} RENAMED
@@ -56,11 +56,10 @@ namespace std {
56
  void init(basic_streambuf<charT, traits>* sb);
57
  void move(basic_ios& rhs);
58
  void move(basic_ios&& rhs);
59
  void swap(basic_ios& rhs) noexcept;
60
  void set_rdbuf(basic_streambuf<charT, traits>* sb);
61
-
62
  };
63
  }
64
  ```
65
 
66
  #### Constructors <a id="basic.ios.cons">[[basic.ios.cons]]</a>
@@ -196,11 +195,11 @@ member objects of `rhs` as follows:
196
  `(*fn)(erase_event, *this, idx)`;
197
  - then, assigns to the member objects of `*this` the corresponding
198
  member objects of `rhs`, except that
199
  - `rdstate()`, `rdbuf()`, and `exceptions()` are left unchanged;
200
  - the contents of arrays pointed at by `pword` and `iword` are copied,
201
- not the pointers themselves;[^10] and
202
  - if any newly stored pointer values in `*this` point at objects
203
  stored outside the object `rhs` and those objects are destroyed when
204
  `rhs` is destroyed, the newly stored pointer values are altered to
205
  point at newly constructed copies of the objects;
206
  - then, calls each callback pair that was copied from `rhs` as
@@ -285,19 +284,19 @@ iostate rdstate() const;
285
 
286
  ``` cpp
287
  void clear(iostate state = goodbit);
288
  ```
289
 
290
- *Ensures:* If `rdbuf() != 0` then `state == rdstate()`; otherwise
291
- `rdstate() == (state | ios_base::badbit)`.
292
-
293
  *Effects:* If
294
  `((state | (rdbuf() ? goodbit : badbit)) & exceptions()) == 0`, returns.
295
  Otherwise, the function throws an object of class `ios_base::failure`
296
  [[ios.failure]], constructed with *implementation-defined* argument
297
  values.
298
 
 
 
 
299
  ``` cpp
300
  void setstate(iostate state);
301
  ```
302
 
303
  *Effects:* Calls `clear(rdstate() | state)` (which may throw
@@ -317,11 +316,11 @@ bool eof() const;
317
 
318
  ``` cpp
319
  bool fail() const;
320
  ```
321
 
322
- *Returns:* `true` if `failbit` or `badbit` is set in `rdstate()`.[^11]
323
 
324
  ``` cpp
325
  bool bad() const;
326
  ```
327
 
@@ -336,9 +335,9 @@ exceptions to be thrown.
336
 
337
  ``` cpp
338
  void exceptions(iostate except);
339
  ```
340
 
341
- *Ensures:* `except == exceptions()`.
342
-
343
  *Effects:* Calls `clear(rdstate())`.
344
 
 
 
 
56
  void init(basic_streambuf<charT, traits>* sb);
57
  void move(basic_ios& rhs);
58
  void move(basic_ios&& rhs);
59
  void swap(basic_ios& rhs) noexcept;
60
  void set_rdbuf(basic_streambuf<charT, traits>* sb);
 
61
  };
62
  }
63
  ```
64
 
65
  #### Constructors <a id="basic.ios.cons">[[basic.ios.cons]]</a>
 
195
  `(*fn)(erase_event, *this, idx)`;
196
  - then, assigns to the member objects of `*this` the corresponding
197
  member objects of `rhs`, except that
198
  - `rdstate()`, `rdbuf()`, and `exceptions()` are left unchanged;
199
  - the contents of arrays pointed at by `pword` and `iword` are copied,
200
+ not the pointers themselves;[^9] and
201
  - if any newly stored pointer values in `*this` point at objects
202
  stored outside the object `rhs` and those objects are destroyed when
203
  `rhs` is destroyed, the newly stored pointer values are altered to
204
  point at newly constructed copies of the objects;
205
  - then, calls each callback pair that was copied from `rhs` as
 
284
 
285
  ``` cpp
286
  void clear(iostate state = goodbit);
287
  ```
288
 
 
 
 
289
  *Effects:* If
290
  `((state | (rdbuf() ? goodbit : badbit)) & exceptions()) == 0`, returns.
291
  Otherwise, the function throws an object of class `ios_base::failure`
292
  [[ios.failure]], constructed with *implementation-defined* argument
293
  values.
294
 
295
+ *Ensures:* If `rdbuf() != 0` then `state == rdstate()`; otherwise
296
+ `rdstate() == (state | ios_base::badbit)`.
297
+
298
  ``` cpp
299
  void setstate(iostate state);
300
  ```
301
 
302
  *Effects:* Calls `clear(rdstate() | state)` (which may throw
 
316
 
317
  ``` cpp
318
  bool fail() const;
319
  ```
320
 
321
+ *Returns:* `true` if `failbit` or `badbit` is set in `rdstate()`.[^10]
322
 
323
  ``` cpp
324
  bool bad() const;
325
  ```
326
 
 
335
 
336
  ``` cpp
337
  void exceptions(iostate except);
338
  ```
339
 
 
 
340
  *Effects:* Calls `clear(rdstate())`.
341
 
342
+ *Ensures:* `except == exceptions()`.
343
+