tmp/tmp_xo1bz6k/{from.md → to.md}
RENAMED
|
@@ -2,113 +2,113 @@
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class T, class U> constexpr bool operator==(const optional<T>& x, const U& v);
|
| 5 |
```
|
| 6 |
|
| 7 |
-
*
|
| 8 |
-
convertible to `bool`.
|
| 9 |
|
| 10 |
[*Note 1*: `T` need not be *Cpp17EqualityComparable*. — *end note*]
|
| 11 |
|
| 12 |
*Effects:* Equivalent to: `return x.has_value() ? *x == v : false;`
|
| 13 |
|
| 14 |
``` cpp
|
| 15 |
template<class T, class U> constexpr bool operator==(const T& v, const optional<U>& x);
|
| 16 |
```
|
| 17 |
|
| 18 |
-
*
|
| 19 |
-
convertible to `bool`.
|
| 20 |
|
| 21 |
*Effects:* Equivalent to: `return x.has_value() ? v == *x : false;`
|
| 22 |
|
| 23 |
``` cpp
|
| 24 |
template<class T, class U> constexpr bool operator!=(const optional<T>& x, const U& v);
|
| 25 |
```
|
| 26 |
|
| 27 |
-
*
|
| 28 |
-
convertible to `bool`.
|
| 29 |
|
| 30 |
*Effects:* Equivalent to: `return x.has_value() ? *x != v : true;`
|
| 31 |
|
| 32 |
``` cpp
|
| 33 |
template<class T, class U> constexpr bool operator!=(const T& v, const optional<U>& x);
|
| 34 |
```
|
| 35 |
|
| 36 |
-
*
|
| 37 |
-
convertible to `bool`.
|
| 38 |
|
| 39 |
*Effects:* Equivalent to: `return x.has_value() ? v != *x : true;`
|
| 40 |
|
| 41 |
``` cpp
|
| 42 |
template<class T, class U> constexpr bool operator<(const optional<T>& x, const U& v);
|
| 43 |
```
|
| 44 |
|
| 45 |
-
*
|
| 46 |
-
convertible to `bool`.
|
| 47 |
|
| 48 |
*Effects:* Equivalent to: `return x.has_value() ? *x < v : true;`
|
| 49 |
|
| 50 |
``` cpp
|
| 51 |
template<class T, class U> constexpr bool operator<(const T& v, const optional<U>& x);
|
| 52 |
```
|
| 53 |
|
| 54 |
-
*
|
| 55 |
-
convertible to `bool`.
|
| 56 |
|
| 57 |
*Effects:* Equivalent to: `return x.has_value() ? v < *x : false;`
|
| 58 |
|
| 59 |
``` cpp
|
| 60 |
template<class T, class U> constexpr bool operator>(const optional<T>& x, const U& v);
|
| 61 |
```
|
| 62 |
|
| 63 |
-
*
|
| 64 |
-
convertible to `bool`.
|
| 65 |
|
| 66 |
*Effects:* Equivalent to: `return x.has_value() ? *x > v : false;`
|
| 67 |
|
| 68 |
``` cpp
|
| 69 |
template<class T, class U> constexpr bool operator>(const T& v, const optional<U>& x);
|
| 70 |
```
|
| 71 |
|
| 72 |
-
*
|
| 73 |
-
convertible to `bool`.
|
| 74 |
|
| 75 |
*Effects:* Equivalent to: `return x.has_value() ? v > *x : true;`
|
| 76 |
|
| 77 |
``` cpp
|
| 78 |
template<class T, class U> constexpr bool operator<=(const optional<T>& x, const U& v);
|
| 79 |
```
|
| 80 |
|
| 81 |
-
*
|
| 82 |
-
convertible to `bool`.
|
| 83 |
|
| 84 |
*Effects:* Equivalent to: `return x.has_value() ? *x <= v : true;`
|
| 85 |
|
| 86 |
``` cpp
|
| 87 |
template<class T, class U> constexpr bool operator<=(const T& v, const optional<U>& x);
|
| 88 |
```
|
| 89 |
|
| 90 |
-
*
|
| 91 |
-
convertible to `bool`.
|
| 92 |
|
| 93 |
*Effects:* Equivalent to: `return x.has_value() ? v <= *x : false;`
|
| 94 |
|
| 95 |
``` cpp
|
| 96 |
template<class T, class U> constexpr bool operator>=(const optional<T>& x, const U& v);
|
| 97 |
```
|
| 98 |
|
| 99 |
-
*
|
| 100 |
-
convertible to `bool`.
|
| 101 |
|
| 102 |
*Effects:* Equivalent to: `return x.has_value() ? *x >= v : false;`
|
| 103 |
|
| 104 |
``` cpp
|
| 105 |
template<class T, class U> constexpr bool operator>=(const T& v, const optional<U>& x);
|
| 106 |
```
|
| 107 |
|
| 108 |
-
*
|
| 109 |
-
convertible to `bool`.
|
| 110 |
|
| 111 |
*Effects:* Equivalent to: `return x.has_value() ? v >= *x : true;`
|
| 112 |
|
| 113 |
``` cpp
|
| 114 |
template<class T, class U>
|
|
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class T, class U> constexpr bool operator==(const optional<T>& x, const U& v);
|
| 5 |
```
|
| 6 |
|
| 7 |
+
*Constraints:* `U` is not a specialization of `optional`. The expression
|
| 8 |
+
`*x == v` is well-formed and its result is convertible to `bool`.
|
| 9 |
|
| 10 |
[*Note 1*: `T` need not be *Cpp17EqualityComparable*. — *end note*]
|
| 11 |
|
| 12 |
*Effects:* Equivalent to: `return x.has_value() ? *x == v : false;`
|
| 13 |
|
| 14 |
``` cpp
|
| 15 |
template<class T, class U> constexpr bool operator==(const T& v, const optional<U>& x);
|
| 16 |
```
|
| 17 |
|
| 18 |
+
*Constraints:* `T` is not a specialization of `optional`. The expression
|
| 19 |
+
`v == *x` is well-formed and its result is convertible to `bool`.
|
| 20 |
|
| 21 |
*Effects:* Equivalent to: `return x.has_value() ? v == *x : false;`
|
| 22 |
|
| 23 |
``` cpp
|
| 24 |
template<class T, class U> constexpr bool operator!=(const optional<T>& x, const U& v);
|
| 25 |
```
|
| 26 |
|
| 27 |
+
*Constraints:* `U` is not a specialization of `optional`. The expression
|
| 28 |
+
`*x != v` is well-formed and its result is convertible to `bool`.
|
| 29 |
|
| 30 |
*Effects:* Equivalent to: `return x.has_value() ? *x != v : true;`
|
| 31 |
|
| 32 |
``` cpp
|
| 33 |
template<class T, class U> constexpr bool operator!=(const T& v, const optional<U>& x);
|
| 34 |
```
|
| 35 |
|
| 36 |
+
*Constraints:* `T` is not a specialization of `optional`. The expression
|
| 37 |
+
`v != *x` is well-formed and its result is convertible to `bool`.
|
| 38 |
|
| 39 |
*Effects:* Equivalent to: `return x.has_value() ? v != *x : true;`
|
| 40 |
|
| 41 |
``` cpp
|
| 42 |
template<class T, class U> constexpr bool operator<(const optional<T>& x, const U& v);
|
| 43 |
```
|
| 44 |
|
| 45 |
+
*Constraints:* `U` is not a specialization of `optional`. The expression
|
| 46 |
+
`*x < v` is well-formed and its result is convertible to `bool`.
|
| 47 |
|
| 48 |
*Effects:* Equivalent to: `return x.has_value() ? *x < v : true;`
|
| 49 |
|
| 50 |
``` cpp
|
| 51 |
template<class T, class U> constexpr bool operator<(const T& v, const optional<U>& x);
|
| 52 |
```
|
| 53 |
|
| 54 |
+
*Constraints:* `T` is not a specialization of `optional`. The expression
|
| 55 |
+
`v < *x` is well-formed and its result is convertible to `bool`.
|
| 56 |
|
| 57 |
*Effects:* Equivalent to: `return x.has_value() ? v < *x : false;`
|
| 58 |
|
| 59 |
``` cpp
|
| 60 |
template<class T, class U> constexpr bool operator>(const optional<T>& x, const U& v);
|
| 61 |
```
|
| 62 |
|
| 63 |
+
*Constraints:* `U` is not a specialization of `optional`. The expression
|
| 64 |
+
`*x > v` is well-formed and its result is convertible to `bool`.
|
| 65 |
|
| 66 |
*Effects:* Equivalent to: `return x.has_value() ? *x > v : false;`
|
| 67 |
|
| 68 |
``` cpp
|
| 69 |
template<class T, class U> constexpr bool operator>(const T& v, const optional<U>& x);
|
| 70 |
```
|
| 71 |
|
| 72 |
+
*Constraints:* `T` is not a specialization of `optional`. The expression
|
| 73 |
+
`v > *x` is well-formed and its result is convertible to `bool`.
|
| 74 |
|
| 75 |
*Effects:* Equivalent to: `return x.has_value() ? v > *x : true;`
|
| 76 |
|
| 77 |
``` cpp
|
| 78 |
template<class T, class U> constexpr bool operator<=(const optional<T>& x, const U& v);
|
| 79 |
```
|
| 80 |
|
| 81 |
+
*Constraints:* `U` is not a specialization of `optional`. The expression
|
| 82 |
+
`*x <= v` is well-formed and its result is convertible to `bool`.
|
| 83 |
|
| 84 |
*Effects:* Equivalent to: `return x.has_value() ? *x <= v : true;`
|
| 85 |
|
| 86 |
``` cpp
|
| 87 |
template<class T, class U> constexpr bool operator<=(const T& v, const optional<U>& x);
|
| 88 |
```
|
| 89 |
|
| 90 |
+
*Constraints:* `T` is not a specialization of `optional`. The expression
|
| 91 |
+
`v <= *x` is well-formed and its result is convertible to `bool`.
|
| 92 |
|
| 93 |
*Effects:* Equivalent to: `return x.has_value() ? v <= *x : false;`
|
| 94 |
|
| 95 |
``` cpp
|
| 96 |
template<class T, class U> constexpr bool operator>=(const optional<T>& x, const U& v);
|
| 97 |
```
|
| 98 |
|
| 99 |
+
*Constraints:* `U` is not a specialization of `optional`. The expression
|
| 100 |
+
`*x >= v` is well-formed and its result is convertible to `bool`.
|
| 101 |
|
| 102 |
*Effects:* Equivalent to: `return x.has_value() ? *x >= v : false;`
|
| 103 |
|
| 104 |
``` cpp
|
| 105 |
template<class T, class U> constexpr bool operator>=(const T& v, const optional<U>& x);
|
| 106 |
```
|
| 107 |
|
| 108 |
+
*Constraints:* `T` is not a specialization of `optional`. The expression
|
| 109 |
+
`v >= *x` is well-formed and its result is convertible to `bool`.
|
| 110 |
|
| 111 |
*Effects:* Equivalent to: `return x.has_value() ? v >= *x : true;`
|
| 112 |
|
| 113 |
``` cpp
|
| 114 |
template<class T, class U>
|