From Jason Turner

[istream.extractors]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpd1amqh7s/{from.md → to.md} +18 -21
tmp/tmpd1amqh7s/{from.md → to.md} RENAMED
@@ -1,35 +1,34 @@
1
  ##### `basic_istream::operator>>` <a id="istream.extractors">[[istream.extractors]]</a>
2
 
3
  ``` cpp
4
- basic_istream<charT, traits>&
5
- operator>>(basic_istream<charT, traits>& (*pf)(basic_istream<charT, traits>&));
6
  ```
7
 
8
  *Effects:* None. This extractor does not behave as a formatted input
9
  function (as described in  [[istream.formatted.reqmts]]).
10
 
11
- *Returns:* `pf(*this)`.[^21]
12
 
13
  ``` cpp
14
- basic_istream<charT, traits>&
15
- operator>>(basic_ios<charT, traits>& (*pf)(basic_ios<charT, traits>&));
16
  ```
17
 
18
  *Effects:* Calls `pf(*this)`. This extractor does not behave as a
19
  formatted input function (as described
20
  in  [[istream.formatted.reqmts]]).
21
 
22
  *Returns:* `*this`.
23
 
24
  ``` cpp
25
- basic_istream<charT, traits>& operator>>(ios_base& (*pf)(ios_base&));
26
  ```
27
 
28
- *Effects:* Calls `pf(*this)`.[^22] This extractor does not behave as a
29
- formatted input function (as described
30
- in  [[istream.formatted.reqmts]]).
 
31
 
32
  *Returns:* `*this`.
33
 
34
  ``` cpp
35
  template<class charT, class traits, size_t N>
@@ -55,12 +54,12 @@ Characters are extracted and stored until any of the following occurs:
55
 
56
  `operator>>` then stores a null byte (`charT()`) in the next position,
57
  which may be the first position if no characters were extracted.
58
  `operator>>` then calls `width(0)`.
59
 
60
- If the function extracted no characters, it calls `setstate(failbit)`,
61
- which may throw `ios_base::failure` [[iostate.flags]].
62
 
63
  *Returns:* `in`.
64
 
65
  ``` cpp
66
  template<class charT, class traits>
@@ -70,36 +69,34 @@ template<class traits>
70
  template<class traits>
71
  basic_istream<char, traits>& operator>>(basic_istream<char, traits>& in, signed char& c);
72
  ```
73
 
74
  *Effects:* Behaves like a formatted input member (as described
75
- in  [[istream.formatted.reqmts]]) of `in`. After a `sentry` object is
76
- constructed a character is extracted from `in`, if one is available, and
77
- stored in `c`. Otherwise, the function calls `in.setstate(failbit)`.
 
78
 
79
  *Returns:* `in`.
80
 
81
  ``` cpp
82
- basic_istream<charT, traits>& operator>>(basic_streambuf<charT, traits>* sb);
83
  ```
84
 
85
  *Effects:* Behaves as an unformatted input
86
  function [[istream.unformatted]]. If `sb` is null, calls
87
  `setstate(failbit)`, which may throw `ios_base::failure`
88
- [[iostate.flags]]. After a sentry object is constructed, extracts
89
  characters from `*this` and inserts them in the output sequence
90
  controlled by `sb`. Characters are extracted and inserted until any of
91
  the following occurs:
92
 
93
  - end-of-file occurs on the input sequence;
94
  - inserting in the output sequence fails (in which case the character to
95
  be inserted is not extracted);
96
  - an exception occurs (in which case the exception is caught).
97
 
98
- If the function inserts no characters, it calls `setstate(failbit)`,
99
- which may throw `ios_base::failure` [[iostate.flags]]. If it inserted no
100
- characters because it caught an exception thrown while extracting
101
- characters from `*this` and `failbit` is set in `exceptions()`
102
- [[iostate.flags]], then the caught exception is rethrown.
103
 
104
  *Returns:* `*this`.
105
 
 
1
  ##### `basic_istream::operator>>` <a id="istream.extractors">[[istream.extractors]]</a>
2
 
3
  ``` cpp
4
+ basic_istream& operator>>(basic_istream& (*pf)(basic_istream&));
 
5
  ```
6
 
7
  *Effects:* None. This extractor does not behave as a formatted input
8
  function (as described in  [[istream.formatted.reqmts]]).
9
 
10
+ *Returns:* `pf(*this)`. [^20]
11
 
12
  ``` cpp
13
+ basic_istream& operator>>(basic_ios<charT, traits>& (*pf)(basic_ios<charT, traits>&));
 
14
  ```
15
 
16
  *Effects:* Calls `pf(*this)`. This extractor does not behave as a
17
  formatted input function (as described
18
  in  [[istream.formatted.reqmts]]).
19
 
20
  *Returns:* `*this`.
21
 
22
  ``` cpp
23
+ basic_istream& operator>>(ios_base& (*pf)(ios_base&));
24
  ```
25
 
26
+ *Effects:* Calls `pf(*this)`.[^21]
27
+
28
+ This extractor does not behave as a formatted input function (as
29
+ described in  [[istream.formatted.reqmts]]).
30
 
31
  *Returns:* `*this`.
32
 
33
  ``` cpp
34
  template<class charT, class traits, size_t N>
 
54
 
55
  `operator>>` then stores a null byte (`charT()`) in the next position,
56
  which may be the first position if no characters were extracted.
57
  `operator>>` then calls `width(0)`.
58
 
59
+ If the function extracted no characters, `ios_base::failbit` is set in
60
+ the input function’s local error state before `setstate` is called.
61
 
62
  *Returns:* `in`.
63
 
64
  ``` cpp
65
  template<class charT, class traits>
 
69
  template<class traits>
70
  basic_istream<char, traits>& operator>>(basic_istream<char, traits>& in, signed char& c);
71
  ```
72
 
73
  *Effects:* Behaves like a formatted input member (as described
74
+ in  [[istream.formatted.reqmts]]) of `in`. A character is extracted from
75
+ `in`, if one is available, and stored in `c`. Otherwise,
76
+ `ios_base::failbit` is set in the input function’s local error state
77
+ before `setstate` is called.
78
 
79
  *Returns:* `in`.
80
 
81
  ``` cpp
82
+ basic_istream& operator>>(basic_streambuf<charT, traits>* sb);
83
  ```
84
 
85
  *Effects:* Behaves as an unformatted input
86
  function [[istream.unformatted]]. If `sb` is null, calls
87
  `setstate(failbit)`, which may throw `ios_base::failure`
88
+ [[iostate.flags]]. After a `sentry` object is constructed, extracts
89
  characters from `*this` and inserts them in the output sequence
90
  controlled by `sb`. Characters are extracted and inserted until any of
91
  the following occurs:
92
 
93
  - end-of-file occurs on the input sequence;
94
  - inserting in the output sequence fails (in which case the character to
95
  be inserted is not extracted);
96
  - an exception occurs (in which case the exception is caught).
97
 
98
+ If the function inserts no characters, `ios_base::failbit` is set in the
99
+ input function’s local error state before `setstate` is called.
 
 
 
100
 
101
  *Returns:* `*this`.
102