From Jason Turner

[syserr.compare]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpn5wwvd72/{from.md → to.md} +27 -31
tmp/tmpn5wwvd72/{from.md → to.md} RENAMED
@@ -1,58 +1,54 @@
1
  ### Comparison functions <a id="syserr.compare">[[syserr.compare]]</a>
2
 
3
- ``` cpp
4
- bool operator<(const error_code& lhs, const error_code& rhs) noexcept;
5
- ```
6
-
7
- *Returns:*
8
-
9
- ``` cpp
10
- lhs.category() < rhs.category() ||
11
- (lhs.category() == rhs.category() && lhs.value() < rhs.value());
12
- ```
13
-
14
- ``` cpp
15
- bool operator<(const error_condition& lhs, const error_condition& rhs) noexcept;
16
- ```
17
-
18
- *Returns:*
19
- `lhs.category() < rhs.category() || lhs.category() == rhs.category() &&`
20
- `lhs.value() < rhs.value()`.
21
-
22
  ``` cpp
23
  bool operator==(const error_code& lhs, const error_code& rhs) noexcept;
24
  ```
25
 
26
  *Returns:*
27
- `lhs.category() == rhs.category() && lhs.value() == rhs.value()`.
 
 
 
28
 
29
  ``` cpp
30
  bool operator==(const error_code& lhs, const error_condition& rhs) noexcept;
31
  ```
32
 
33
  *Returns:*
34
- `lhs.category().equivalent(lhs.value(), rhs) || rhs.category().equivalent(lhs, rhs.value())`.
35
 
36
  ``` cpp
37
- bool operator==(const error_condition& lhs, const error_code& rhs) noexcept;
38
  ```
39
 
40
- *Returns:*
41
- `rhs.category().equivalent(rhs.value(), lhs) || lhs.category().equivalent(rhs, lhs.value())`.
42
-
43
  ``` cpp
44
  bool operator==(const error_condition& lhs, const error_condition& rhs) noexcept;
45
  ```
46
 
47
  *Returns:*
48
- `lhs.category() == rhs.category() && lhs.value() == rhs.value()`.
49
 
50
  ``` cpp
51
- bool operator!=(const error_code& lhs, const error_code& rhs) noexcept;
52
- bool operator!=(const error_code& lhs, const error_condition& rhs) noexcept;
53
- bool operator!=(const error_condition& lhs, const error_code& rhs) noexcept;
54
- bool operator!=(const error_condition& lhs, const error_condition& rhs) noexcept;
55
  ```
56
 
57
- *Returns:* `!(lhs == rhs)`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
 
1
  ### Comparison functions <a id="syserr.compare">[[syserr.compare]]</a>
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ``` cpp
4
  bool operator==(const error_code& lhs, const error_code& rhs) noexcept;
5
  ```
6
 
7
  *Returns:*
8
+
9
+ ``` cpp
10
+ lhs.category() == rhs.category() && lhs.value() == rhs.value()
11
+ ```
12
 
13
  ``` cpp
14
  bool operator==(const error_code& lhs, const error_condition& rhs) noexcept;
15
  ```
16
 
17
  *Returns:*
 
18
 
19
  ``` cpp
20
+ lhs.category().equivalent(lhs.value(), rhs) || rhs.category().equivalent(lhs, rhs.value())
21
  ```
22
 
 
 
 
23
  ``` cpp
24
  bool operator==(const error_condition& lhs, const error_condition& rhs) noexcept;
25
  ```
26
 
27
  *Returns:*
 
28
 
29
  ``` cpp
30
+ lhs.category() == rhs.category() && lhs.value() == rhs.value()
 
 
 
31
  ```
32
 
33
+ ``` cpp
34
+ strong_ordering operator<=>(const error_code& lhs, const error_code& rhs) noexcept;
35
+ ```
36
+
37
+ *Effects:* Equivalent to:
38
+
39
+ ``` cpp
40
+ if (auto c = lhs.category() <=> rhs.category(); c != 0) return c;
41
+ return lhs.value() <=> rhs.value();
42
+ ```
43
+
44
+ ``` cpp
45
+ strong_ordering operator<=>(const error_condition& lhs, const error_condition& rhs) noexcept;
46
+ ```
47
+
48
+ *Returns:*
49
+
50
+ ``` cpp
51
+ if (auto c = lhs.category() <=> rhs.category(); c != 0) return c;
52
+ return lhs.value() <=> rhs.value();
53
+ ```
54