tmp/tmpesmijhcm/{from.md → to.md}
RENAMED
|
@@ -2,11 +2,11 @@
|
|
| 2 |
|
| 3 |
Each unformatted output function begins execution by constructing an
|
| 4 |
object of class `sentry`. If this object returns `true`, while
|
| 5 |
converting to a value of type `bool`, the function endeavors to generate
|
| 6 |
the requested output. If an exception is thrown during output, then
|
| 7 |
-
`
|
| 8 |
`(exceptions() & badbit) != 0` then the exception is rethrown. In any
|
| 9 |
case, the unformatted output function ends by destroying the sentry
|
| 10 |
object, then, if no exception was thrown, returning the value specified
|
| 11 |
for the unformatted output function.
|
| 12 |
|
|
@@ -16,12 +16,12 @@ basic_ostream<charT, traits>& put(char_type c);
|
|
| 16 |
|
| 17 |
*Effects:* Behaves as an unformatted output function (as described
|
| 18 |
above). After constructing a sentry object, inserts the character `c`,
|
| 19 |
if possible.[^37]
|
| 20 |
|
| 21 |
-
Otherwise, calls `setstate(badbit)` (which may throw
|
| 22 |
-
|
| 23 |
|
| 24 |
*Returns:* `*this`.
|
| 25 |
|
| 26 |
``` cpp
|
| 27 |
basic_ostream& write(const char_type* s, streamsize n);
|
|
@@ -33,12 +33,12 @@ from successive locations of an array whose first element is designated
|
|
| 33 |
by `s`.[^38] Characters are inserted until either of the following
|
| 34 |
occurs:
|
| 35 |
|
| 36 |
- `n` characters are inserted;
|
| 37 |
- inserting in the output sequence fails (in which case the function
|
| 38 |
-
calls `setstate(badbit)`, which may throw
|
| 39 |
-
|
| 40 |
|
| 41 |
*Returns:* `*this`.
|
| 42 |
|
| 43 |
``` cpp
|
| 44 |
basic_ostream& flush();
|
|
@@ -46,11 +46,11 @@ basic_ostream& flush();
|
|
| 46 |
|
| 47 |
*Effects:* Behaves as an unformatted output function (as described
|
| 48 |
above). If `rdbuf()` is not a null pointer, constructs a sentry object.
|
| 49 |
If this object returns `true` when converted to a value of type `bool`
|
| 50 |
the function calls `rdbuf()->pubsync()`. If that function returns -1
|
| 51 |
-
calls `setstate(badbit)` (which may throw
|
| 52 |
-
|
| 53 |
-
|
| 54 |
|
| 55 |
*Returns:* `*this`.
|
| 56 |
|
|
|
|
| 2 |
|
| 3 |
Each unformatted output function begins execution by constructing an
|
| 4 |
object of class `sentry`. If this object returns `true`, while
|
| 5 |
converting to a value of type `bool`, the function endeavors to generate
|
| 6 |
the requested output. If an exception is thrown during output, then
|
| 7 |
+
`ios_base::badbit` is turned on[^36] in `*this`’s error state. If
|
| 8 |
`(exceptions() & badbit) != 0` then the exception is rethrown. In any
|
| 9 |
case, the unformatted output function ends by destroying the sentry
|
| 10 |
object, then, if no exception was thrown, returning the value specified
|
| 11 |
for the unformatted output function.
|
| 12 |
|
|
|
|
| 16 |
|
| 17 |
*Effects:* Behaves as an unformatted output function (as described
|
| 18 |
above). After constructing a sentry object, inserts the character `c`,
|
| 19 |
if possible.[^37]
|
| 20 |
|
| 21 |
+
Otherwise, calls `setstate(badbit)` (which may throw `ios_base::failure`
|
| 22 |
+
[[iostate.flags]]).
|
| 23 |
|
| 24 |
*Returns:* `*this`.
|
| 25 |
|
| 26 |
``` cpp
|
| 27 |
basic_ostream& write(const char_type* s, streamsize n);
|
|
|
|
| 33 |
by `s`.[^38] Characters are inserted until either of the following
|
| 34 |
occurs:
|
| 35 |
|
| 36 |
- `n` characters are inserted;
|
| 37 |
- inserting in the output sequence fails (in which case the function
|
| 38 |
+
calls `setstate(badbit)`, which may throw `ios_base::failure`
|
| 39 |
+
[[iostate.flags]]).
|
| 40 |
|
| 41 |
*Returns:* `*this`.
|
| 42 |
|
| 43 |
``` cpp
|
| 44 |
basic_ostream& flush();
|
|
|
|
| 46 |
|
| 47 |
*Effects:* Behaves as an unformatted output function (as described
|
| 48 |
above). If `rdbuf()` is not a null pointer, constructs a sentry object.
|
| 49 |
If this object returns `true` when converted to a value of type `bool`
|
| 50 |
the function calls `rdbuf()->pubsync()`. If that function returns -1
|
| 51 |
+
calls `setstate(badbit)` (which may throw `ios_base::failure`
|
| 52 |
+
[[iostate.flags]]). Otherwise, if the sentry object returns `false`,
|
| 53 |
+
does nothing.
|
| 54 |
|
| 55 |
*Returns:* `*this`.
|
| 56 |
|