tmp/tmp0o98177f/{from.md → to.md}
RENAMED
|
@@ -181,11 +181,11 @@ int main() {
|
|
| 181 |
|
| 182 |
``` cpp
|
| 183 |
basic_istream& getline(char_type* s, streamsize n);
|
| 184 |
```
|
| 185 |
|
| 186 |
-
*Returns:* `getline(s, n, widen(’\n’))`
|
| 187 |
|
| 188 |
``` cpp
|
| 189 |
basic_istream& ignore(streamsize n = 1, int_type delim = traits::eof());
|
| 190 |
```
|
| 191 |
|
|
@@ -193,11 +193,11 @@ basic_istream& ignore(streamsize n = 1, int_type delim = traits::eof());
|
|
| 193 |
above). After constructing a `sentry` object, extracts characters and
|
| 194 |
discards them. Characters are extracted until any of the following
|
| 195 |
occurs:
|
| 196 |
|
| 197 |
- `n != numeric_limits<streamsize>::max()` [[numeric.limits]] and `n`
|
| 198 |
-
characters have been extracted so far
|
| 199 |
- end-of-file occurs on the input sequence (in which case the function
|
| 200 |
calls `setstate(eofbit)`, which may throw `ios_base::failure`
|
| 201 |
[[iostate.flags]]);
|
| 202 |
- `traits::eq_int_type(traits::to_int_type(c), delim)` for the next
|
| 203 |
available input character `c` (in which case `c` is extracted).
|
|
@@ -205,10 +205,19 @@ occurs:
|
|
| 205 |
[*Note 1*: The last condition will never occur if
|
| 206 |
`traits::eq_int_type(delim, traits::eof())`. — *end note*]
|
| 207 |
|
| 208 |
*Returns:* `*this`.
|
| 209 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 210 |
``` cpp
|
| 211 |
int_type peek();
|
| 212 |
```
|
| 213 |
|
| 214 |
*Effects:* Behaves as an unformatted input function (as described
|
|
|
|
| 181 |
|
| 182 |
``` cpp
|
| 183 |
basic_istream& getline(char_type* s, streamsize n);
|
| 184 |
```
|
| 185 |
|
| 186 |
+
*Returns:* `getline(s, n, widen(’\n’))`.
|
| 187 |
|
| 188 |
``` cpp
|
| 189 |
basic_istream& ignore(streamsize n = 1, int_type delim = traits::eof());
|
| 190 |
```
|
| 191 |
|
|
|
|
| 193 |
above). After constructing a `sentry` object, extracts characters and
|
| 194 |
discards them. Characters are extracted until any of the following
|
| 195 |
occurs:
|
| 196 |
|
| 197 |
- `n != numeric_limits<streamsize>::max()` [[numeric.limits]] and `n`
|
| 198 |
+
characters have been extracted so far;
|
| 199 |
- end-of-file occurs on the input sequence (in which case the function
|
| 200 |
calls `setstate(eofbit)`, which may throw `ios_base::failure`
|
| 201 |
[[iostate.flags]]);
|
| 202 |
- `traits::eq_int_type(traits::to_int_type(c), delim)` for the next
|
| 203 |
available input character `c` (in which case `c` is extracted).
|
|
|
|
| 205 |
[*Note 1*: The last condition will never occur if
|
| 206 |
`traits::eq_int_type(delim, traits::eof())`. — *end note*]
|
| 207 |
|
| 208 |
*Returns:* `*this`.
|
| 209 |
|
| 210 |
+
``` cpp
|
| 211 |
+
basic_istream& ignore(streamsize n, char_type delim);
|
| 212 |
+
```
|
| 213 |
+
|
| 214 |
+
*Constraints:* `is_same_v<char_type, char>` is `true`.
|
| 215 |
+
|
| 216 |
+
*Effects:* Equivalent to:
|
| 217 |
+
`return ignore(n, traits::to_int_type(delim));`
|
| 218 |
+
|
| 219 |
``` cpp
|
| 220 |
int_type peek();
|
| 221 |
```
|
| 222 |
|
| 223 |
*Effects:* Behaves as an unformatted input function (as described
|