tmp/tmp_rw4ou5c/{from.md → to.md}
RENAMED
|
@@ -179,11 +179,11 @@ values returned by `gcount()` and `rhs.gcount()`.
|
|
| 179 |
``` cpp
|
| 180 |
namespace std {
|
| 181 |
template <class charT,class traits = char_traits<charT> >
|
| 182 |
class basic_istream<charT,traits>::sentry {
|
| 183 |
typedef traits traits_type;
|
| 184 |
-
bool ok_; // exposition
|
| 185 |
public:
|
| 186 |
explicit sentry(basic_istream<charT,traits>& is, bool noskipws = false);
|
| 187 |
~sentry();
|
| 188 |
explicit operator bool() const { return ok_; }
|
| 189 |
sentry(const sentry&) = delete;
|
|
@@ -197,19 +197,19 @@ exception safe prefix and suffix operations.
|
|
| 197 |
|
| 198 |
``` cpp
|
| 199 |
explicit sentry(basic_istream<charT,traits>& is, bool noskipws = false);
|
| 200 |
```
|
| 201 |
|
| 202 |
-
*Effects:* If `is.good()` is `false`, calls is.setstate(failbit).
|
| 203 |
Otherwise, prepares for formatted or unformatted input. First, if
|
| 204 |
`is.tie()` is not a null pointer, the function calls `is.tie()->flush()`
|
| 205 |
to synchronize the output sequence with any associated external C
|
| 206 |
stream. Except that this call can be suppressed if the put area of
|
| 207 |
`is.tie()` is empty. Further an implementation is allowed to defer the
|
| 208 |
call to `flush` until a call of `is.rdbuf()->underflow()` occurs. If no
|
| 209 |
such call occurs before the `sentry` object is destroyed, the call to
|
| 210 |
-
`flush` may be eliminated entirely.[^
|
| 211 |
`is.flags() & ios_base::skipws` is nonzero, the function extracts and
|
| 212 |
discards each character as long as the next available input character
|
| 213 |
`c` is a whitespace character. If `is.rdbuf()->sbumpc()` or
|
| 214 |
`is.rdbuf()->sgetc()` returns `traits::eof()`, the function calls
|
| 215 |
`setstate(failbit | eofbit)` (which may throw `ios_base::failure`).
|
|
@@ -229,11 +229,11 @@ if (ctype.is(ctype.space,c)!=0)
|
|
| 229 |
```
|
| 230 |
|
| 231 |
If, after any preparation is completed, `is.good()` is `true`,
|
| 232 |
`ok_ != false` otherwise, `ok_ == false`. During preparation, the
|
| 233 |
constructor may call `setstate(failbit)` (which may throw
|
| 234 |
-
`ios_base::failure` ([[iostate.flags]]))[^
|
| 235 |
|
| 236 |
``` cpp
|
| 237 |
~sentry();
|
| 238 |
```
|
| 239 |
|
|
|
|
| 179 |
``` cpp
|
| 180 |
namespace std {
|
| 181 |
template <class charT,class traits = char_traits<charT> >
|
| 182 |
class basic_istream<charT,traits>::sentry {
|
| 183 |
typedef traits traits_type;
|
| 184 |
+
bool ok_; // exposition only
|
| 185 |
public:
|
| 186 |
explicit sentry(basic_istream<charT,traits>& is, bool noskipws = false);
|
| 187 |
~sentry();
|
| 188 |
explicit operator bool() const { return ok_; }
|
| 189 |
sentry(const sentry&) = delete;
|
|
|
|
| 197 |
|
| 198 |
``` cpp
|
| 199 |
explicit sentry(basic_istream<charT,traits>& is, bool noskipws = false);
|
| 200 |
```
|
| 201 |
|
| 202 |
+
*Effects:* If `is.good()` is `false`, calls `is.setstate(failbit)`.
|
| 203 |
Otherwise, prepares for formatted or unformatted input. First, if
|
| 204 |
`is.tie()` is not a null pointer, the function calls `is.tie()->flush()`
|
| 205 |
to synchronize the output sequence with any associated external C
|
| 206 |
stream. Except that this call can be suppressed if the put area of
|
| 207 |
`is.tie()` is empty. Further an implementation is allowed to defer the
|
| 208 |
call to `flush` until a call of `is.rdbuf()->underflow()` occurs. If no
|
| 209 |
such call occurs before the `sentry` object is destroyed, the call to
|
| 210 |
+
`flush` may be eliminated entirely.[^17] If `noskipws` is zero and
|
| 211 |
`is.flags() & ios_base::skipws` is nonzero, the function extracts and
|
| 212 |
discards each character as long as the next available input character
|
| 213 |
`c` is a whitespace character. If `is.rdbuf()->sbumpc()` or
|
| 214 |
`is.rdbuf()->sgetc()` returns `traits::eof()`, the function calls
|
| 215 |
`setstate(failbit | eofbit)` (which may throw `ios_base::failure`).
|
|
|
|
| 229 |
```
|
| 230 |
|
| 231 |
If, after any preparation is completed, `is.good()` is `true`,
|
| 232 |
`ok_ != false` otherwise, `ok_ == false`. During preparation, the
|
| 233 |
constructor may call `setstate(failbit)` (which may throw
|
| 234 |
+
`ios_base::failure` ([[iostate.flags]]))[^18]
|
| 235 |
|
| 236 |
``` cpp
|
| 237 |
~sentry();
|
| 238 |
```
|
| 239 |
|