tmp/tmpfqv0p2wh/{from.md → to.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
####
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
explicit operator bool() const;
|
| 5 |
```
|
| 6 |
|
|
@@ -20,25 +20,25 @@ iostate rdstate() const;
|
|
| 20 |
|
| 21 |
``` cpp
|
| 22 |
void clear(iostate state = goodbit);
|
| 23 |
```
|
| 24 |
|
| 25 |
-
*
|
| 26 |
`rdstate() == (state | ios_base::badbit)`.
|
| 27 |
|
| 28 |
*Effects:* If
|
| 29 |
`((state | (rdbuf() ? goodbit : badbit)) & exceptions()) == 0`, returns.
|
| 30 |
-
Otherwise, the function throws an object of class
|
| 31 |
-
|
| 32 |
-
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
void setstate(iostate state);
|
| 36 |
```
|
| 37 |
|
| 38 |
*Effects:* Calls `clear(rdstate() | state)` (which may throw
|
| 39 |
-
`
|
| 40 |
|
| 41 |
``` cpp
|
| 42 |
bool good() const;
|
| 43 |
```
|
| 44 |
|
|
@@ -71,9 +71,9 @@ exceptions to be thrown.
|
|
| 71 |
|
| 72 |
``` cpp
|
| 73 |
void exceptions(iostate except);
|
| 74 |
```
|
| 75 |
|
| 76 |
-
*
|
| 77 |
|
| 78 |
*Effects:* Calls `clear(rdstate())`.
|
| 79 |
|
|
|
|
| 1 |
+
#### Flags functions <a id="iostate.flags">[[iostate.flags]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
explicit operator bool() const;
|
| 5 |
```
|
| 6 |
|
|
|
|
| 20 |
|
| 21 |
``` cpp
|
| 22 |
void clear(iostate state = goodbit);
|
| 23 |
```
|
| 24 |
|
| 25 |
+
*Ensures:* If `rdbuf() != 0` then `state == rdstate()`; otherwise
|
| 26 |
`rdstate() == (state | ios_base::badbit)`.
|
| 27 |
|
| 28 |
*Effects:* If
|
| 29 |
`((state | (rdbuf() ? goodbit : badbit)) & exceptions()) == 0`, returns.
|
| 30 |
+
Otherwise, the function throws an object of class `ios_base::failure`
|
| 31 |
+
[[ios.failure]], constructed with *implementation-defined* argument
|
| 32 |
+
values.
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
void setstate(iostate state);
|
| 36 |
```
|
| 37 |
|
| 38 |
*Effects:* Calls `clear(rdstate() | state)` (which may throw
|
| 39 |
+
`ios_base::failure` [[ios.failure]]).
|
| 40 |
|
| 41 |
``` cpp
|
| 42 |
bool good() const;
|
| 43 |
```
|
| 44 |
|
|
|
|
| 71 |
|
| 72 |
``` cpp
|
| 73 |
void exceptions(iostate except);
|
| 74 |
```
|
| 75 |
|
| 76 |
+
*Ensures:* `except == exceptions()`.
|
| 77 |
|
| 78 |
*Effects:* Calls `clear(rdstate())`.
|
| 79 |
|