tmp/tmpa44dkx6k/{from.md → to.md}
RENAMED
|
@@ -7,12 +7,12 @@ template<class T, class U> constexpr bool operator==(const optional<T>& x, const
|
|
| 7 |
*Mandates:* The expression `*x == *y` is well-formed and its result is
|
| 8 |
convertible to `bool`.
|
| 9 |
|
| 10 |
[*Note 1*: `T` need not be *Cpp17EqualityComparable*. — *end note*]
|
| 11 |
|
| 12 |
-
*Returns:* If `
|
| 13 |
-
`
|
| 14 |
|
| 15 |
*Remarks:* Specializations of this function template for which
|
| 16 |
`*x == *y` is a core constant expression are constexpr functions.
|
| 17 |
|
| 18 |
``` cpp
|
|
@@ -20,12 +20,12 @@ template<class T, class U> constexpr bool operator!=(const optional<T>& x, const
|
|
| 20 |
```
|
| 21 |
|
| 22 |
*Mandates:* The expression `*x != *y` is well-formed and its result is
|
| 23 |
convertible to `bool`.
|
| 24 |
|
| 25 |
-
*Returns:* If `
|
| 26 |
-
`
|
| 27 |
|
| 28 |
*Remarks:* Specializations of this function template for which
|
| 29 |
`*x != *y` is a core constant expression are constexpr functions.
|
| 30 |
|
| 31 |
``` cpp
|
|
@@ -84,10 +84,11 @@ convertible to `bool`.
|
|
| 84 |
template<class T, three_way_comparable_with<T> U>
|
| 85 |
constexpr compare_three_way_result_t<T, U>
|
| 86 |
operator<=>(const optional<T>& x, const optional<U>& y);
|
| 87 |
```
|
| 88 |
|
| 89 |
-
*Returns:* If `x && y`, `*x <=> *y`; otherwise
|
|
|
|
| 90 |
|
| 91 |
*Remarks:* Specializations of this function template for which
|
| 92 |
`*x <=> *y` is a core constant expression are constexpr functions.
|
| 93 |
|
|
|
|
| 7 |
*Mandates:* The expression `*x == *y` is well-formed and its result is
|
| 8 |
convertible to `bool`.
|
| 9 |
|
| 10 |
[*Note 1*: `T` need not be *Cpp17EqualityComparable*. — *end note*]
|
| 11 |
|
| 12 |
+
*Returns:* If `x.has_value() != y.has_value()`, `false`; otherwise if
|
| 13 |
+
`x.has_value() == false`, `true`; otherwise `*x == *y`.
|
| 14 |
|
| 15 |
*Remarks:* Specializations of this function template for which
|
| 16 |
`*x == *y` is a core constant expression are constexpr functions.
|
| 17 |
|
| 18 |
``` cpp
|
|
|
|
| 20 |
```
|
| 21 |
|
| 22 |
*Mandates:* The expression `*x != *y` is well-formed and its result is
|
| 23 |
convertible to `bool`.
|
| 24 |
|
| 25 |
+
*Returns:* If `x.has_value() != y.has_value()`, `true`; otherwise, if
|
| 26 |
+
`x.has_value() == false`, `false`; otherwise `*x != *y`.
|
| 27 |
|
| 28 |
*Remarks:* Specializations of this function template for which
|
| 29 |
`*x != *y` is a core constant expression are constexpr functions.
|
| 30 |
|
| 31 |
``` cpp
|
|
|
|
| 84 |
template<class T, three_way_comparable_with<T> U>
|
| 85 |
constexpr compare_three_way_result_t<T, U>
|
| 86 |
operator<=>(const optional<T>& x, const optional<U>& y);
|
| 87 |
```
|
| 88 |
|
| 89 |
+
*Returns:* If `x && y`, `*x <=> *y`; otherwise
|
| 90 |
+
`x.has_value() <=> y.has_value()`.
|
| 91 |
|
| 92 |
*Remarks:* Specializations of this function template for which
|
| 93 |
`*x <=> *y` is a core constant expression are constexpr functions.
|
| 94 |
|