tmp/tmpyrg4501m/{from.md → to.md}
RENAMED
|
@@ -2,81 +2,92 @@
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class T, class U> constexpr bool operator==(const optional<T>& x, const optional<U>& y);
|
| 5 |
```
|
| 6 |
|
| 7 |
-
*
|
| 8 |
-
|
| 9 |
|
| 10 |
-
[*Note 1*: `T` need not be
|
| 11 |
|
| 12 |
*Returns:* If `bool(x) != bool(y)`, `false`; otherwise if
|
| 13 |
`bool(x) == false`, `true`; otherwise `*x == *y`.
|
| 14 |
|
| 15 |
*Remarks:* Specializations of this function template for which
|
| 16 |
-
`*x == *y` is a core constant expression
|
| 17 |
|
| 18 |
``` cpp
|
| 19 |
template<class T, class U> constexpr bool operator!=(const optional<T>& x, const optional<U>& y);
|
| 20 |
```
|
| 21 |
|
| 22 |
-
*
|
| 23 |
-
|
| 24 |
|
| 25 |
*Returns:* If `bool(x) != bool(y)`, `true`; otherwise, if
|
| 26 |
`bool(x) == false`, `false`; otherwise `*x != *y`.
|
| 27 |
|
| 28 |
*Remarks:* Specializations of this function template for which
|
| 29 |
-
`*x != *y` is a core constant expression
|
| 30 |
|
| 31 |
``` cpp
|
| 32 |
template<class T, class U> constexpr bool operator<(const optional<T>& x, const optional<U>& y);
|
| 33 |
```
|
| 34 |
|
| 35 |
-
*
|
| 36 |
-
|
| 37 |
|
| 38 |
*Returns:* If `!y`, `false`; otherwise, if `!x`, `true`; otherwise
|
| 39 |
`*x < *y`.
|
| 40 |
|
| 41 |
*Remarks:* Specializations of this function template for which `*x < *y`
|
| 42 |
-
is a core constant expression
|
| 43 |
|
| 44 |
``` cpp
|
| 45 |
template<class T, class U> constexpr bool operator>(const optional<T>& x, const optional<U>& y);
|
| 46 |
```
|
| 47 |
|
| 48 |
-
*
|
| 49 |
-
|
| 50 |
|
| 51 |
*Returns:* If `!x`, `false`; otherwise, if `!y`, `true`; otherwise
|
| 52 |
`*x > *y`.
|
| 53 |
|
| 54 |
*Remarks:* Specializations of this function template for which `*x > *y`
|
| 55 |
-
is a core constant expression
|
| 56 |
|
| 57 |
``` cpp
|
| 58 |
template<class T, class U> constexpr bool operator<=(const optional<T>& x, const optional<U>& y);
|
| 59 |
```
|
| 60 |
|
| 61 |
-
*
|
| 62 |
-
|
| 63 |
|
| 64 |
*Returns:* If `!x`, `true`; otherwise, if `!y`, `false`; otherwise
|
| 65 |
`*x <= *y`.
|
| 66 |
|
| 67 |
*Remarks:* Specializations of this function template for which
|
| 68 |
-
`*x <= *y` is a core constant expression
|
| 69 |
|
| 70 |
``` cpp
|
| 71 |
template<class T, class U> constexpr bool operator>=(const optional<T>& x, const optional<U>& y);
|
| 72 |
```
|
| 73 |
|
| 74 |
-
*
|
| 75 |
-
|
| 76 |
|
| 77 |
*Returns:* If `!y`, `true`; otherwise, if `!x`, `false`; otherwise
|
| 78 |
`*x >= *y`.
|
| 79 |
|
| 80 |
*Remarks:* Specializations of this function template for which
|
| 81 |
-
`*x >= *y` is a core constant expression
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
|
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class T, class U> constexpr bool operator==(const optional<T>& x, const optional<U>& y);
|
| 5 |
```
|
| 6 |
|
| 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 `bool(x) != bool(y)`, `false`; otherwise if
|
| 13 |
`bool(x) == 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
|
| 19 |
template<class T, class U> constexpr bool operator!=(const optional<T>& x, const optional<U>& y);
|
| 20 |
```
|
| 21 |
|
| 22 |
+
*Mandates:* The expression `*x != *y` is well-formed and its result is
|
| 23 |
+
convertible to `bool`.
|
| 24 |
|
| 25 |
*Returns:* If `bool(x) != bool(y)`, `true`; otherwise, if
|
| 26 |
`bool(x) == 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
|
| 32 |
template<class T, class U> constexpr bool operator<(const optional<T>& x, const optional<U>& y);
|
| 33 |
```
|
| 34 |
|
| 35 |
+
*Mandates:* `*x < *y` is well-formed and its result is convertible to
|
| 36 |
+
`bool`.
|
| 37 |
|
| 38 |
*Returns:* If `!y`, `false`; otherwise, if `!x`, `true`; otherwise
|
| 39 |
`*x < *y`.
|
| 40 |
|
| 41 |
*Remarks:* Specializations of this function template for which `*x < *y`
|
| 42 |
+
is a core constant expression are constexpr functions.
|
| 43 |
|
| 44 |
``` cpp
|
| 45 |
template<class T, class U> constexpr bool operator>(const optional<T>& x, const optional<U>& y);
|
| 46 |
```
|
| 47 |
|
| 48 |
+
*Mandates:* The expression `*x > *y` is well-formed and its result is
|
| 49 |
+
convertible to `bool`.
|
| 50 |
|
| 51 |
*Returns:* If `!x`, `false`; otherwise, if `!y`, `true`; otherwise
|
| 52 |
`*x > *y`.
|
| 53 |
|
| 54 |
*Remarks:* Specializations of this function template for which `*x > *y`
|
| 55 |
+
is a core constant expression are constexpr functions.
|
| 56 |
|
| 57 |
``` cpp
|
| 58 |
template<class T, class U> constexpr bool operator<=(const optional<T>& x, const optional<U>& y);
|
| 59 |
```
|
| 60 |
|
| 61 |
+
*Mandates:* The expression `*x <= *y` is well-formed and its result is
|
| 62 |
+
convertible to `bool`.
|
| 63 |
|
| 64 |
*Returns:* If `!x`, `true`; otherwise, if `!y`, `false`; otherwise
|
| 65 |
`*x <= *y`.
|
| 66 |
|
| 67 |
*Remarks:* Specializations of this function template for which
|
| 68 |
+
`*x <= *y` is a core constant expression are constexpr functions.
|
| 69 |
|
| 70 |
``` cpp
|
| 71 |
template<class T, class U> constexpr bool operator>=(const optional<T>& x, const optional<U>& y);
|
| 72 |
```
|
| 73 |
|
| 74 |
+
*Mandates:* The expression `*x >= *y` is well-formed and its result is
|
| 75 |
+
convertible to `bool`.
|
| 76 |
|
| 77 |
*Returns:* If `!y`, `true`; otherwise, if `!x`, `false`; otherwise
|
| 78 |
`*x >= *y`.
|
| 79 |
|
| 80 |
*Remarks:* Specializations of this function template for which
|
| 81 |
+
`*x >= *y` is a core constant expression are constexpr functions.
|
| 82 |
+
|
| 83 |
+
``` 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 `bool(x) <=> bool(y)`.
|
| 90 |
+
|
| 91 |
+
*Remarks:* Specializations of this function template for which
|
| 92 |
+
`*x <=> *y` is a core constant expression are constexpr functions.
|
| 93 |
|