tmp/tmp8ws50del/{from.md → to.md}
RENAMED
|
@@ -1,14 +1,11 @@
|
|
| 1 |
### `monostate` relational operators <a id="variant.monostate.relops">[[variant.monostate.relops]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
-
constexpr bool operator<(monostate, monostate) noexcept { return false; }
|
| 5 |
-
constexpr bool operator>(monostate, monostate) noexcept { return false; }
|
| 6 |
-
constexpr bool operator<=(monostate, monostate) noexcept { return true; }
|
| 7 |
-
constexpr bool operator>=(monostate, monostate) noexcept { return true; }
|
| 8 |
constexpr bool operator==(monostate, monostate) noexcept { return true; }
|
| 9 |
-
constexpr
|
|
|
|
| 10 |
```
|
| 11 |
|
| 12 |
[*Note 1*: `monostate` objects have only a single state; they thus
|
| 13 |
always compare equal. — *end note*]
|
| 14 |
|
|
|
|
| 1 |
### `monostate` relational operators <a id="variant.monostate.relops">[[variant.monostate.relops]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
constexpr bool operator==(monostate, monostate) noexcept { return true; }
|
| 5 |
+
constexpr strong_ordering operator<=>(monostate, monostate) noexcept
|
| 6 |
+
{ return strong_ordering::equal; }
|
| 7 |
```
|
| 8 |
|
| 9 |
[*Note 1*: `monostate` objects have only a single state; they thus
|
| 10 |
always compare equal. — *end note*]
|
| 11 |
|