From Jason Turner

[syserr.errcode.constructors]

Diff to HTML by rtfpessoa

tmp/tmpmt119a6y/{from.md → to.md} RENAMED
@@ -2,22 +2,28 @@
2
 
3
  ``` cpp
4
  error_code() noexcept;
5
  ```
6
 
7
- *Ensures:* `val_ == 0` and `cat_ == &system_category()`.
 
8
 
9
  ``` cpp
10
  error_code(int val, const error_category& cat) noexcept;
11
  ```
12
 
13
- *Ensures:* `val_ == val` and `cat_ == &cat`.
14
 
15
  ``` cpp
16
  template<class ErrorCodeEnum>
17
  error_code(ErrorCodeEnum e) noexcept;
18
  ```
19
 
20
  *Constraints:* `is_error_code_enum_v<ErrorCodeEnum>` is `true`.
21
 
22
- *Ensures:* `*this == make_error_code(e)`.
 
 
 
 
 
23
 
 
2
 
3
  ``` cpp
4
  error_code() noexcept;
5
  ```
6
 
7
+ *Effects:* Initializes `val_` with `0` and `cat_` with
8
+ `&system_category()`.
9
 
10
  ``` cpp
11
  error_code(int val, const error_category& cat) noexcept;
12
  ```
13
 
14
+ *Effects:* Initializes `val_` with `val` and `cat_` with `&cat`.
15
 
16
  ``` cpp
17
  template<class ErrorCodeEnum>
18
  error_code(ErrorCodeEnum e) noexcept;
19
  ```
20
 
21
  *Constraints:* `is_error_code_enum_v<ErrorCodeEnum>` is `true`.
22
 
23
+ *Effects:* Equivalent to:
24
+
25
+ ``` cpp
26
+ error_code ec = make_error_code(e);
27
+ assign(ec.value(), ec.category());
28
+ ```
29