From Jason Turner

[ostream.inserters]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpk4l_ntpr/{from.md → to.md} +23 -13
tmp/tmpk4l_ntpr/{from.md → to.md} RENAMED
@@ -1,47 +1,45 @@
1
  ##### `basic_ostream::operator<<` <a id="ostream.inserters">[[ostream.inserters]]</a>
2
 
3
  ``` cpp
4
- basic_ostream<charT,traits>& operator<<
5
- (basic_ostream<charT,traits>& (*pf)(basic_ostream<charT,traits>&));
6
  ```
7
 
8
  *Effects:* None. Does not behave as a formatted output function (as
9
  described in  [[ostream.formatted.reqmts]]).
10
 
11
- *Returns:* `pf(*this)`.[^33]
12
 
13
  ``` cpp
14
- basic_ostream<charT,traits>& operator<<
15
- (basic_ios<charT,traits>& (*pf)(basic_ios<charT,traits>&));
16
  ```
17
 
18
  *Effects:* Calls `pf(*this)`. This inserter does not behave as a
19
  formatted output function (as described
20
  in  [[ostream.formatted.reqmts]]).
21
 
22
- *Returns:* `*this`.[^34]
23
 
24
  ``` cpp
25
- basic_ostream<charT,traits>& operator<<
26
- (ios_base& (*pf)(ios_base&));
27
  ```
28
 
29
  *Effects:* Calls `pf(*this)`. This inserter does not behave as a
30
  formatted output function (as described
31
  in  [[ostream.formatted.reqmts]]).
32
 
33
  *Returns:* `*this`.
34
 
35
  ``` cpp
36
- basic_ostream<charT,traits>& operator<<
37
- (basic_streambuf<charT,traits>* sb);
38
  ```
39
 
40
- *Effects:* Behaves as an unformatted output function (as described
41
- in  [[ostream.unformatted]], paragraph 1). After the sentry object is
42
- constructed, if `sb` is null calls `setstate(badbit)` (which may throw
43
  `ios_base::failure`).
44
 
45
  Gets characters from `sb` and inserts them in `*this`. Characters are
46
  read from `sb` and inserted until any of the following occurs:
47
 
@@ -56,5 +54,17 @@ exception was thrown while extracting a character, the function sets
56
  `failbit` in error state, and if `failbit` is on in `exceptions()` the
57
  caught exception is rethrown.
58
 
59
  *Returns:* `*this`.
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ##### `basic_ostream::operator<<` <a id="ostream.inserters">[[ostream.inserters]]</a>
2
 
3
  ``` cpp
4
+ basic_ostream<charT, traits>&
5
+ operator<<(basic_ostream<charT, traits>& (*pf)(basic_ostream<charT, traits>&));
6
  ```
7
 
8
  *Effects:* None. Does not behave as a formatted output function (as
9
  described in  [[ostream.formatted.reqmts]]).
10
 
11
+ *Returns:* `pf(*this)`.[^34]
12
 
13
  ``` cpp
14
+ basic_ostream<charT, traits>&
15
+ operator<<(basic_ios<charT, traits>& (*pf)(basic_ios<charT, traits>&));
16
  ```
17
 
18
  *Effects:* Calls `pf(*this)`. This inserter does not behave as a
19
  formatted output function (as described
20
  in  [[ostream.formatted.reqmts]]).
21
 
22
+ *Returns:* `*this`.[^35]
23
 
24
  ``` cpp
25
+ basic_ostream<charT, traits>& operator<<(ios_base& (*pf)(ios_base&));
 
26
  ```
27
 
28
  *Effects:* Calls `pf(*this)`. This inserter does not behave as a
29
  formatted output function (as described
30
  in  [[ostream.formatted.reqmts]]).
31
 
32
  *Returns:* `*this`.
33
 
34
  ``` cpp
35
+ basic_ostream<charT, traits>& operator<<(basic_streambuf<charT, traits>* sb);
 
36
  ```
37
 
38
+ *Effects:* Behaves as an unformatted output function
39
+ ([[ostream.unformatted]]). After the sentry object is constructed, if
40
+ `sb` is null calls `setstate(badbit)` (which may throw
41
  `ios_base::failure`).
42
 
43
  Gets characters from `sb` and inserts them in `*this`. Characters are
44
  read from `sb` and inserted until any of the following occurs:
45
 
 
54
  `failbit` in error state, and if `failbit` is on in `exceptions()` the
55
  caught exception is rethrown.
56
 
57
  *Returns:* `*this`.
58
 
59
+ ``` cpp
60
+ basic_ostream<charT, traits>& operator<<(nullptr_t);
61
+ ```
62
+
63
+ *Effects:* Equivalent to:
64
+
65
+ ``` cpp
66
+ return *this << s;
67
+ ```
68
+
69
+ where `s` is an *implementation-defined* NTCTS ([[defns.ntcts]]).
70
+