tmp/tmpbx3jw70j/{from.md → to.md}
RENAMED
|
@@ -50,26 +50,32 @@ namespace std {
|
|
| 50 |
|
| 51 |
``` cpp
|
| 52 |
error_code() noexcept;
|
| 53 |
```
|
| 54 |
|
| 55 |
-
*
|
|
|
|
| 56 |
|
| 57 |
``` cpp
|
| 58 |
error_code(int val, const error_category& cat) noexcept;
|
| 59 |
```
|
| 60 |
|
| 61 |
-
*
|
| 62 |
|
| 63 |
``` cpp
|
| 64 |
template<class ErrorCodeEnum>
|
| 65 |
error_code(ErrorCodeEnum e) noexcept;
|
| 66 |
```
|
| 67 |
|
| 68 |
*Constraints:* `is_error_code_enum_v<ErrorCodeEnum>` is `true`.
|
| 69 |
|
| 70 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
#### Modifiers <a id="syserr.errcode.modifiers">[[syserr.errcode.modifiers]]</a>
|
| 73 |
|
| 74 |
``` cpp
|
| 75 |
void assign(int val, const error_category& cat) noexcept;
|
|
@@ -82,11 +88,16 @@ template<class ErrorCodeEnum>
|
|
| 82 |
error_code& operator=(ErrorCodeEnum e) noexcept;
|
| 83 |
```
|
| 84 |
|
| 85 |
*Constraints:* `is_error_code_enum_v<ErrorCodeEnum>` is `true`.
|
| 86 |
|
| 87 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
*Returns:* `*this`.
|
| 90 |
|
| 91 |
``` cpp
|
| 92 |
void clear() noexcept;
|
|
|
|
| 50 |
|
| 51 |
``` cpp
|
| 52 |
error_code() noexcept;
|
| 53 |
```
|
| 54 |
|
| 55 |
+
*Effects:* Initializes `val_` with `0` and `cat_` with
|
| 56 |
+
`&system_category()`.
|
| 57 |
|
| 58 |
``` cpp
|
| 59 |
error_code(int val, const error_category& cat) noexcept;
|
| 60 |
```
|
| 61 |
|
| 62 |
+
*Effects:* Initializes `val_` with `val` and `cat_` with `&cat`.
|
| 63 |
|
| 64 |
``` cpp
|
| 65 |
template<class ErrorCodeEnum>
|
| 66 |
error_code(ErrorCodeEnum e) noexcept;
|
| 67 |
```
|
| 68 |
|
| 69 |
*Constraints:* `is_error_code_enum_v<ErrorCodeEnum>` is `true`.
|
| 70 |
|
| 71 |
+
*Effects:* Equivalent to:
|
| 72 |
+
|
| 73 |
+
``` cpp
|
| 74 |
+
error_code ec = make_error_code(e);
|
| 75 |
+
assign(ec.value(), ec.category());
|
| 76 |
+
```
|
| 77 |
|
| 78 |
#### Modifiers <a id="syserr.errcode.modifiers">[[syserr.errcode.modifiers]]</a>
|
| 79 |
|
| 80 |
``` cpp
|
| 81 |
void assign(int val, const error_category& cat) noexcept;
|
|
|
|
| 88 |
error_code& operator=(ErrorCodeEnum e) noexcept;
|
| 89 |
```
|
| 90 |
|
| 91 |
*Constraints:* `is_error_code_enum_v<ErrorCodeEnum>` is `true`.
|
| 92 |
|
| 93 |
+
*Effects:* Equivalent to:
|
| 94 |
+
|
| 95 |
+
``` cpp
|
| 96 |
+
error_code ec = make_error_code(e);
|
| 97 |
+
assign(ec.value(), ec.category());
|
| 98 |
+
```
|
| 99 |
|
| 100 |
*Returns:* `*this`.
|
| 101 |
|
| 102 |
``` cpp
|
| 103 |
void clear() noexcept;
|