From Jason Turner

[ostream.unformatted]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpe5gjuwdp/{from.md → to.md} +11 -12
tmp/tmpe5gjuwdp/{from.md → to.md} RENAMED
@@ -2,23 +2,23 @@
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::badbit` is turned on[^35] 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
 
13
  ``` cpp
14
  basic_ostream<charT, traits>& put(char_type c);
15
  ```
16
 
17
  *Effects:* Behaves as an unformatted output function (as described
18
- in  [[ostream.unformatted]], paragraph 1). After constructing a sentry
19
- object, inserts the character `c`, if possible.[^36]
20
 
21
  Otherwise, calls `setstate(badbit)` (which may throw
22
  `ios_base::failure` ([[iostate.flags]])).
23
 
24
  *Returns:* `*this`.
@@ -26,14 +26,14 @@ Otherwise, calls `setstate(badbit)` (which may throw
26
  ``` cpp
27
  basic_ostream& write(const char_type* s, streamsize n);
28
  ```
29
 
30
  *Effects:* Behaves as an unformatted output function (as described
31
- in  [[ostream.unformatted]], paragraph 1). After constructing a sentry
32
- object, obtains characters to insert from successive locations of an
33
- array whose first element is designated by `s`.[^37] Characters are
34
- inserted until either of the following 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
  `ios_base::failure` ([[iostate.flags]])).
@@ -43,15 +43,14 @@ inserted until either of the following occurs:
43
  ``` cpp
44
  basic_ostream& flush();
45
  ```
46
 
47
  *Effects:* Behaves as an unformatted output function (as described
48
- in  [[ostream.formatted.reqmts]], paragraph 1). If `rdbuf()` is not a
49
- null pointer, constructs a sentry object. If this object returns `true`
50
- when converted to a value of type `bool` the function calls
51
- `rdbuf()->pubsync()`. If that function returns -1 calls
52
- `setstate(badbit)` (which may throw
53
  `ios_base::failure` ([[iostate.flags]])). Otherwise, if the sentry
54
  object returns `false`, does nothing.
55
 
56
  *Returns:* `*this`.
57
 
 
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::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
 
13
  ``` cpp
14
  basic_ostream<charT, traits>& put(char_type c);
15
  ```
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
  `ios_base::failure` ([[iostate.flags]])).
23
 
24
  *Returns:* `*this`.
 
26
  ``` cpp
27
  basic_ostream& write(const char_type* s, streamsize n);
28
  ```
29
 
30
  *Effects:* Behaves as an unformatted output function (as described
31
+ above). After constructing a sentry object, obtains characters to insert
32
+ 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
  `ios_base::failure` ([[iostate.flags]])).
 
43
  ``` cpp
44
  basic_ostream& flush();
45
  ```
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
  `ios_base::failure` ([[iostate.flags]])). Otherwise, if the sentry
53
  object returns `false`, does nothing.
54
 
55
  *Returns:* `*this`.
56