tmp/tmp9ilatnq0/{from.md → to.md}
RENAMED
|
@@ -2,24 +2,32 @@
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
class future_error : public logic_error {
|
| 6 |
public:
|
| 7 |
-
future_error(
|
| 8 |
|
| 9 |
const error_code& code() const noexcept;
|
| 10 |
const char* what() const noexcept;
|
|
|
|
|
|
|
| 11 |
};
|
| 12 |
}
|
| 13 |
```
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
``` cpp
|
| 16 |
const error_code& code() const noexcept;
|
| 17 |
```
|
| 18 |
|
| 19 |
-
*Returns:*
|
| 20 |
-
constructor.
|
| 21 |
|
| 22 |
``` cpp
|
| 23 |
const char* what() const noexcept;
|
| 24 |
```
|
| 25 |
|
|
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
class future_error : public logic_error {
|
| 6 |
public:
|
| 7 |
+
explicit future_error(future_errc e);
|
| 8 |
|
| 9 |
const error_code& code() const noexcept;
|
| 10 |
const char* what() const noexcept;
|
| 11 |
+
private:
|
| 12 |
+
error_code ec_; // exposition only
|
| 13 |
};
|
| 14 |
}
|
| 15 |
```
|
| 16 |
|
| 17 |
+
``` cpp
|
| 18 |
+
explicit future_error(future_errc e);
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
*Effects:* Constructs an object of class `future_error` and initializes
|
| 22 |
+
`ec_` with `make_error_code(e)`.
|
| 23 |
+
|
| 24 |
``` cpp
|
| 25 |
const error_code& code() const noexcept;
|
| 26 |
```
|
| 27 |
|
| 28 |
+
*Returns:* `ec_`.
|
|
|
|
| 29 |
|
| 30 |
``` cpp
|
| 31 |
const char* what() const noexcept;
|
| 32 |
```
|
| 33 |
|