tmp/tmpr8fwuh8q/{from.md → to.md}
RENAMED
|
@@ -1,14 +1,15 @@
|
|
| 1 |
##### Class `basic_ostream::sentry` <a id="ostream.sentry">[[ostream.sentry]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
-
template<class charT, class traits
|
| 6 |
class basic_ostream<charT, traits>::sentry {
|
| 7 |
bool ok_; // exposition only
|
|
|
|
| 8 |
public:
|
| 9 |
-
explicit sentry(basic_ostream
|
| 10 |
~sentry();
|
| 11 |
explicit operator bool() const { return ok_; }
|
| 12 |
|
| 13 |
sentry(const sentry&) = delete;
|
| 14 |
sentry& operator=(const sentry&) = delete;
|
|
@@ -18,20 +19,20 @@ namespace std {
|
|
| 18 |
|
| 19 |
The class `sentry` defines a class that is responsible for doing
|
| 20 |
exception safe prefix and suffix operations.
|
| 21 |
|
| 22 |
``` cpp
|
| 23 |
-
explicit sentry(basic_ostream
|
| 24 |
```
|
| 25 |
|
| 26 |
If `os.good()` is nonzero, prepares for formatted or unformatted output.
|
| 27 |
-
If `os.tie()` is not a null pointer, calls `os.tie()->flush()`.[^
|
| 28 |
|
| 29 |
If, after any preparation is completed, `os.good()` is `true`,
|
| 30 |
`ok_ == true` otherwise, `ok_ == false`. During preparation, the
|
| 31 |
constructor may call `setstate(failbit)` (which may throw
|
| 32 |
-
`ios_base::failure` [[iostate.flags]]).[^
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
~sentry();
|
| 36 |
```
|
| 37 |
|
|
|
|
| 1 |
##### Class `basic_ostream::sentry` <a id="ostream.sentry">[[ostream.sentry]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
+
template<class charT, class traits>
|
| 6 |
class basic_ostream<charT, traits>::sentry {
|
| 7 |
bool ok_; // exposition only
|
| 8 |
+
|
| 9 |
public:
|
| 10 |
+
explicit sentry(basic_ostream& os);
|
| 11 |
~sentry();
|
| 12 |
explicit operator bool() const { return ok_; }
|
| 13 |
|
| 14 |
sentry(const sentry&) = delete;
|
| 15 |
sentry& operator=(const sentry&) = delete;
|
|
|
|
| 19 |
|
| 20 |
The class `sentry` defines a class that is responsible for doing
|
| 21 |
exception safe prefix and suffix operations.
|
| 22 |
|
| 23 |
``` cpp
|
| 24 |
+
explicit sentry(basic_ostream& os);
|
| 25 |
```
|
| 26 |
|
| 27 |
If `os.good()` is nonzero, prepares for formatted or unformatted output.
|
| 28 |
+
If `os.tie()` is not a null pointer, calls `os.tie()->flush()`.[^29]
|
| 29 |
|
| 30 |
If, after any preparation is completed, `os.good()` is `true`,
|
| 31 |
`ok_ == true` otherwise, `ok_ == false`. During preparation, the
|
| 32 |
constructor may call `setstate(failbit)` (which may throw
|
| 33 |
+
`ios_base::failure` [[iostate.flags]]).[^30]
|
| 34 |
|
| 35 |
``` cpp
|
| 36 |
~sentry();
|
| 37 |
```
|
| 38 |
|