tmp/tmp49u5rx3m/{from.md → to.md}
RENAMED
|
@@ -1,112 +0,0 @@
|
|
| 1 |
-
### Comparison with `T` <a id="optional.comp_with_t">[[optional.comp_with_t]]</a>
|
| 2 |
-
|
| 3 |
-
``` cpp
|
| 4 |
-
template <class T, class U> constexpr bool operator==(const optional<T>& x, const U& v);
|
| 5 |
-
```
|
| 6 |
-
|
| 7 |
-
*Requires:* The expression `*x == v` shall be well-formed and its result
|
| 8 |
-
shall be convertible to `bool`.
|
| 9 |
-
|
| 10 |
-
[*Note 1*: `T` need not be `EqualityComparable`. — *end note*]
|
| 11 |
-
|
| 12 |
-
*Effects:* Equivalent to: `return bool(x) ? *x == v : false;`
|
| 13 |
-
|
| 14 |
-
``` cpp
|
| 15 |
-
template <class T, class U> constexpr bool operator==(const U& v, const optional<T>& x);
|
| 16 |
-
```
|
| 17 |
-
|
| 18 |
-
*Requires:* The expression `v == *x` shall be well-formed and its result
|
| 19 |
-
shall be convertible to `bool`.
|
| 20 |
-
|
| 21 |
-
*Effects:* Equivalent to: `return bool(x) ? 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 |
-
*Requires:* The expression `*x != v` shall be well-formed and its result
|
| 28 |
-
shall be convertible to `bool`.
|
| 29 |
-
|
| 30 |
-
*Effects:* Equivalent to: `return bool(x) ? *x != v : true;`
|
| 31 |
-
|
| 32 |
-
``` cpp
|
| 33 |
-
template <class T, class U> constexpr bool operator!=(const U& v, const optional<T>& x);
|
| 34 |
-
```
|
| 35 |
-
|
| 36 |
-
*Requires:* The expression `v != *x` shall be well-formed and its result
|
| 37 |
-
shall be convertible to `bool`.
|
| 38 |
-
|
| 39 |
-
*Effects:* Equivalent to: `return bool(x) ? 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 |
-
*Requires:* The expression `*x < v` shall be well-formed and its result
|
| 46 |
-
shall be convertible to `bool`.
|
| 47 |
-
|
| 48 |
-
*Effects:* Equivalent to: `return bool(x) ? *x < v : true;`
|
| 49 |
-
|
| 50 |
-
``` cpp
|
| 51 |
-
template <class T, class U> constexpr bool operator<(const U& v, const optional<T>& x);
|
| 52 |
-
```
|
| 53 |
-
|
| 54 |
-
*Requires:* The expression `v < *x` shall be well-formed and its result
|
| 55 |
-
shall be convertible to `bool`.
|
| 56 |
-
|
| 57 |
-
*Effects:* Equivalent to: `return bool(x) ? 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 |
-
*Requires:* The expression `*x <= v` shall be well-formed and its result
|
| 64 |
-
shall be convertible to `bool`.
|
| 65 |
-
|
| 66 |
-
*Effects:* Equivalent to: `return bool(x) ? *x <= v : true;`
|
| 67 |
-
|
| 68 |
-
``` cpp
|
| 69 |
-
template <class T, class U> constexpr bool operator<=(const U& v, const optional<T>& x);
|
| 70 |
-
```
|
| 71 |
-
|
| 72 |
-
*Requires:* The expression `v <= *x` shall be well-formed and its result
|
| 73 |
-
shall be convertible to `bool`.
|
| 74 |
-
|
| 75 |
-
*Effects:* Equivalent to: `return bool(x) ? v <= *x : false;`
|
| 76 |
-
|
| 77 |
-
``` cpp
|
| 78 |
-
template <class T, class U> constexpr bool operator>(const optional<T>& x, const U& v);
|
| 79 |
-
```
|
| 80 |
-
|
| 81 |
-
*Requires:* The expression `*x > v` shall be well-formed and its result
|
| 82 |
-
shall be convertible to `bool`.
|
| 83 |
-
|
| 84 |
-
*Effects:* Equivalent to: `return bool(x) ? *x > v : false;`
|
| 85 |
-
|
| 86 |
-
``` cpp
|
| 87 |
-
template <class T, class U> constexpr bool operator>(const U& v, const optional<T>& x);
|
| 88 |
-
```
|
| 89 |
-
|
| 90 |
-
*Requires:* The expression `v > *x` shall be well-formed and its result
|
| 91 |
-
shall be convertible to `bool`.
|
| 92 |
-
|
| 93 |
-
*Effects:* Equivalent to: `return bool(x) ? v > *x : true;`
|
| 94 |
-
|
| 95 |
-
``` cpp
|
| 96 |
-
template <class T, class U> constexpr bool operator>=(const optional<T>& x, const U& v);
|
| 97 |
-
```
|
| 98 |
-
|
| 99 |
-
*Requires:* The expression `*x >= v` shall be well-formed and its result
|
| 100 |
-
shall be convertible to `bool`.
|
| 101 |
-
|
| 102 |
-
*Effects:* Equivalent to: `return bool(x) ? *x >= v : false;`
|
| 103 |
-
|
| 104 |
-
``` cpp
|
| 105 |
-
template <class T, class U> constexpr bool operator>=(const U& v, const optional<T>& x);
|
| 106 |
-
```
|
| 107 |
-
|
| 108 |
-
*Requires:* The expression `v >= *x` shall be well-formed and its result
|
| 109 |
-
shall be convertible to `bool`.
|
| 110 |
-
|
| 111 |
-
*Effects:* Equivalent to: `return bool(x) ? v >= *x : true;`
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|