tmp/tmpdimjmotx/{from.md → to.md}
RENAMED
|
@@ -1,22 +1,20 @@
|
|
| 1 |
#### Class `partial_ordering` <a id="cmp.partialord">[[cmp.partialord]]</a>
|
| 2 |
|
| 3 |
The `partial_ordering` type is typically used as the result type of a
|
| 4 |
-
three-way comparison operator [[expr.spaceship]]
|
| 5 |
-
the six two-way comparison operators
|
| 6 |
-
|
| 7 |
-
incomparable.
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
namespace std {
|
| 11 |
class partial_ordering {
|
| 12 |
int value; // exposition only
|
| 13 |
bool is_ordered; // exposition only
|
| 14 |
|
| 15 |
// exposition-only constructors
|
| 16 |
-
constexpr explicit
|
| 17 |
-
partial_ordering(eq v) noexcept : value(int(v)), is_ordered(true) {} // exposition only
|
| 18 |
constexpr explicit
|
| 19 |
partial_ordering(ord v) noexcept : value(int(v)), is_ordered(true) {} // exposition only
|
| 20 |
constexpr explicit
|
| 21 |
partial_ordering(ncmp v) noexcept : value(int(v)), is_ordered(false) {} // exposition only
|
| 22 |
|
|
@@ -42,11 +40,11 @@ namespace std {
|
|
| 42 |
friend constexpr partial_ordering operator<=>(unspecified, partial_ordering v) noexcept;
|
| 43 |
};
|
| 44 |
|
| 45 |
// valid values' definitions
|
| 46 |
inline constexpr partial_ordering partial_ordering::less(ord::less);
|
| 47 |
-
inline constexpr partial_ordering partial_ordering::equivalent(
|
| 48 |
inline constexpr partial_ordering partial_ordering::greater(ord::greater);
|
| 49 |
inline constexpr partial_ordering partial_ordering::unordered(ncmp::unordered);
|
| 50 |
}
|
| 51 |
```
|
| 52 |
|
|
|
|
| 1 |
#### Class `partial_ordering` <a id="cmp.partialord">[[cmp.partialord]]</a>
|
| 2 |
|
| 3 |
The `partial_ordering` type is typically used as the result type of a
|
| 4 |
+
three-way comparison operator [[expr.spaceship]] for a type that admits
|
| 5 |
+
all of the six two-way comparison operators [[expr.rel]], [[expr.eq]],
|
| 6 |
+
for which equality need not imply substitutability, and that permits two
|
| 7 |
+
values to be incomparable.[^32]
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
namespace std {
|
| 11 |
class partial_ordering {
|
| 12 |
int value; // exposition only
|
| 13 |
bool is_ordered; // exposition only
|
| 14 |
|
| 15 |
// exposition-only constructors
|
|
|
|
|
|
|
| 16 |
constexpr explicit
|
| 17 |
partial_ordering(ord v) noexcept : value(int(v)), is_ordered(true) {} // exposition only
|
| 18 |
constexpr explicit
|
| 19 |
partial_ordering(ncmp v) noexcept : value(int(v)), is_ordered(false) {} // exposition only
|
| 20 |
|
|
|
|
| 40 |
friend constexpr partial_ordering operator<=>(unspecified, partial_ordering v) noexcept;
|
| 41 |
};
|
| 42 |
|
| 43 |
// valid values' definitions
|
| 44 |
inline constexpr partial_ordering partial_ordering::less(ord::less);
|
| 45 |
+
inline constexpr partial_ordering partial_ordering::equivalent(ord::equivalent);
|
| 46 |
inline constexpr partial_ordering partial_ordering::greater(ord::greater);
|
| 47 |
inline constexpr partial_ordering partial_ordering::unordered(ncmp::unordered);
|
| 48 |
}
|
| 49 |
```
|
| 50 |
|