From Jason Turner

[cmp.categories]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpn3yfwo6n/{from.md → to.md} +11 -11
tmp/tmpn3yfwo6n/{from.md → to.md} RENAMED
@@ -30,12 +30,12 @@ meets this requirement.
30
  — *end example*]
31
 
32
  In this context, the behavior of a program that supplies an argument
33
  other than a literal `0` is undefined.
34
 
35
- For the purposes of subclause [[cmp.categories]], *substitutability* is
36
- the property that `f(a) == f(b)` is `true` whenever `a == b` is `true`,
37
  where `f` denotes a function that reads only comparison-salient state
38
  that is accessible via the argument’s public const members.
39
 
40
  #### Class `partial_ordering` <a id="cmp.partialord">[[cmp.partialord]]</a>
41
 
@@ -47,17 +47,17 @@ values to be incomparable.[^32]
47
 
48
  ``` cpp
49
  namespace std {
50
  class partial_ordering {
51
  int value; // exposition only
52
- bool is_ordered; // exposition only
53
 
54
  // exposition-only constructors
55
  constexpr explicit
56
- partial_ordering(ord v) noexcept : value(int(v)), is_ordered(true) {} // exposition only
57
  constexpr explicit
58
- partial_ordering(ncmp v) noexcept : value(int(v)), is_ordered(false) {} // exposition only
59
 
60
  public:
61
  // valid values
62
  static const partial_ordering less;
63
  static const partial_ordering equivalent;
@@ -93,20 +93,20 @@ constexpr bool operator< (partial_ordering v, unspecified) noexcept;
93
  constexpr bool operator> (partial_ordering v, unspecified) noexcept;
94
  constexpr bool operator<=(partial_ordering v, unspecified) noexcept;
95
  constexpr bool operator>=(partial_ordering v, unspecified) noexcept;
96
  ```
97
 
98
- *Returns:* For `operator`, `v.is_ordered && v.value 0`.
99
 
100
  ``` cpp
101
  constexpr bool operator< (unspecified, partial_ordering v) noexcept;
102
  constexpr bool operator> (unspecified, partial_ordering v) noexcept;
103
  constexpr bool operator<=(unspecified, partial_ordering v) noexcept;
104
  constexpr bool operator>=(unspecified, partial_ordering v) noexcept;
105
  ```
106
 
107
- *Returns:* For `operator`, `v.is_ordered && 0 v.value`.
108
 
109
  ``` cpp
110
  constexpr partial_ordering operator<=>(partial_ordering v, unspecified) noexcept;
111
  ```
112
 
@@ -183,20 +183,20 @@ constexpr bool operator< (weak_ordering v, unspecified) noexcept;
183
  constexpr bool operator> (weak_ordering v, unspecified) noexcept;
184
  constexpr bool operator<=(weak_ordering v, unspecified) noexcept;
185
  constexpr bool operator>=(weak_ordering v, unspecified) noexcept;
186
  ```
187
 
188
- *Returns:* `v.value 0` for `operator`.
189
 
190
  ``` cpp
191
  constexpr bool operator< (unspecified, weak_ordering v) noexcept;
192
  constexpr bool operator> (unspecified, weak_ordering v) noexcept;
193
  constexpr bool operator<=(unspecified, weak_ordering v) noexcept;
194
  constexpr bool operator>=(unspecified, weak_ordering v) noexcept;
195
  ```
196
 
197
- *Returns:* `0 v.value` for `operator`.
198
 
199
  ``` cpp
200
  constexpr weak_ordering operator<=>(weak_ordering v, unspecified) noexcept;
201
  ```
202
 
@@ -288,20 +288,20 @@ constexpr bool operator< (strong_ordering v, unspecified) noexcept;
288
  constexpr bool operator> (strong_ordering v, unspecified) noexcept;
289
  constexpr bool operator<=(strong_ordering v, unspecified) noexcept;
290
  constexpr bool operator>=(strong_ordering v, unspecified) noexcept;
291
  ```
292
 
293
- *Returns:* `v.value 0` for `operator`.
294
 
295
  ``` cpp
296
  constexpr bool operator< (unspecified, strong_ordering v) noexcept;
297
  constexpr bool operator> (unspecified, strong_ordering v) noexcept;
298
  constexpr bool operator<=(unspecified, strong_ordering v) noexcept;
299
  constexpr bool operator>=(unspecified, strong_ordering v) noexcept;
300
  ```
301
 
302
- *Returns:* `0 v.value` for `operator`.
303
 
304
  ``` cpp
305
  constexpr strong_ordering operator<=>(strong_ordering v, unspecified) noexcept;
306
  ```
307
 
 
30
  — *end example*]
31
 
32
  In this context, the behavior of a program that supplies an argument
33
  other than a literal `0` is undefined.
34
 
35
+ For the purposes of [[cmp.categories]], *substitutability* is the
36
+ property that `f(a) == f(b)` is `true` whenever `a == b` is `true`,
37
  where `f` denotes a function that reads only comparison-salient state
38
  that is accessible via the argument’s public const members.
39
 
40
  #### Class `partial_ordering` <a id="cmp.partialord">[[cmp.partialord]]</a>
41
 
 
47
 
48
  ``` cpp
49
  namespace std {
50
  class partial_ordering {
51
  int value; // exposition only
52
+ bool is-ordered; // exposition only
53
 
54
  // exposition-only constructors
55
  constexpr explicit
56
+ partial_ordering(ord v) noexcept : value(int(v)), is-ordered(true) {} // exposition only
57
  constexpr explicit
58
+ partial_ordering(ncmp v) noexcept : value(int(v)), is-ordered(false) {} // exposition only
59
 
60
  public:
61
  // valid values
62
  static const partial_ordering less;
63
  static const partial_ordering equivalent;
 
93
  constexpr bool operator> (partial_ordering v, unspecified) noexcept;
94
  constexpr bool operator<=(partial_ordering v, unspecified) noexcept;
95
  constexpr bool operator>=(partial_ordering v, unspecified) noexcept;
96
  ```
97
 
98
+ *Returns:* For `operator`, `v.`*`is-ordered`*` && v.`*`value`*` 0`.
99
 
100
  ``` cpp
101
  constexpr bool operator< (unspecified, partial_ordering v) noexcept;
102
  constexpr bool operator> (unspecified, partial_ordering v) noexcept;
103
  constexpr bool operator<=(unspecified, partial_ordering v) noexcept;
104
  constexpr bool operator>=(unspecified, partial_ordering v) noexcept;
105
  ```
106
 
107
+ *Returns:* For `operator`, `v.`*`is-ordered`*` && 0 v.`*`value`*.
108
 
109
  ``` cpp
110
  constexpr partial_ordering operator<=>(partial_ordering v, unspecified) noexcept;
111
  ```
112
 
 
183
  constexpr bool operator> (weak_ordering v, unspecified) noexcept;
184
  constexpr bool operator<=(weak_ordering v, unspecified) noexcept;
185
  constexpr bool operator>=(weak_ordering v, unspecified) noexcept;
186
  ```
187
 
188
+ *Returns:* `v.`*`value`*` 0` for `operator`.
189
 
190
  ``` cpp
191
  constexpr bool operator< (unspecified, weak_ordering v) noexcept;
192
  constexpr bool operator> (unspecified, weak_ordering v) noexcept;
193
  constexpr bool operator<=(unspecified, weak_ordering v) noexcept;
194
  constexpr bool operator>=(unspecified, weak_ordering v) noexcept;
195
  ```
196
 
197
+ *Returns:* `0 v.`*`value`* for `operator`.
198
 
199
  ``` cpp
200
  constexpr weak_ordering operator<=>(weak_ordering v, unspecified) noexcept;
201
  ```
202
 
 
288
  constexpr bool operator> (strong_ordering v, unspecified) noexcept;
289
  constexpr bool operator<=(strong_ordering v, unspecified) noexcept;
290
  constexpr bool operator>=(strong_ordering v, unspecified) noexcept;
291
  ```
292
 
293
+ *Returns:* `v.`*`value`*` 0` for `operator`.
294
 
295
  ``` cpp
296
  constexpr bool operator< (unspecified, strong_ordering v) noexcept;
297
  constexpr bool operator> (unspecified, strong_ordering v) noexcept;
298
  constexpr bool operator<=(unspecified, strong_ordering v) noexcept;
299
  constexpr bool operator>=(unspecified, strong_ordering v) noexcept;
300
  ```
301
 
302
+ *Returns:* `0 v.`*`value`* for `operator`.
303
 
304
  ``` cpp
305
  constexpr strong_ordering operator<=>(strong_ordering v, unspecified) noexcept;
306
  ```
307