tmp/tmpb3si_smm/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Relational operators <a id="variant.relops">[[variant.relops]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template <class... Types>
|
| 5 |
+
constexpr bool operator==(const variant<Types...>& v, const variant<Types...>& w);
|
| 6 |
+
```
|
| 7 |
+
|
| 8 |
+
*Requires:* `get<`i`>(v) == get<`i`>(w)` is a valid expression returning
|
| 9 |
+
a type that is convertible to `bool`, for all i.
|
| 10 |
+
|
| 11 |
+
*Returns:* If `v.index() != w.index()`, `false`; otherwise if
|
| 12 |
+
`v.valueless_by_exception()`, `true`; otherwise
|
| 13 |
+
`get<`i`>(v) == get<`i`>(w)` with i being `v.index()`.
|
| 14 |
+
|
| 15 |
+
``` cpp
|
| 16 |
+
template <class... Types>
|
| 17 |
+
constexpr bool operator!=(const variant<Types...>& v, const variant<Types...>& w);
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
*Requires:* `get<`i`>(v) != get<`i`>(w)` is a valid expression returning
|
| 21 |
+
a type that is convertible to `bool`, for all i.
|
| 22 |
+
|
| 23 |
+
*Returns:* If `v.index() != w.index()`, `true`; otherwise if
|
| 24 |
+
`v.valueless_by_exception()`, `false`; otherwise
|
| 25 |
+
`get<`i`>(v) != get<`i`>(w)` with i being `v.index()`.
|
| 26 |
+
|
| 27 |
+
``` cpp
|
| 28 |
+
template <class... Types>
|
| 29 |
+
constexpr bool operator<(const variant<Types...>& v, const variant<Types...>& w);
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
*Requires:* `get<`i`>(v) < get<`i`>(w)` is a valid expression returning
|
| 33 |
+
a type that is convertible to `bool`, for all i.
|
| 34 |
+
|
| 35 |
+
*Returns:* If `w.valueless_by_exception()`, `false`; otherwise if
|
| 36 |
+
`v.valueless_by_exception()`, `true`; otherwise, if
|
| 37 |
+
`v.index() < w.index()`, `true`; otherwise if `v.index() > w.index()`,
|
| 38 |
+
`false`; otherwise `get<`i`>(v) < get<`i`>(w)` with i being `v.index()`.
|
| 39 |
+
|
| 40 |
+
``` cpp
|
| 41 |
+
template <class... Types>
|
| 42 |
+
constexpr bool operator>(const variant<Types...>& v, const variant<Types...>& w);
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
*Requires:* `get<`i`>(v) > get<`i`>(w)` is a valid expression returning
|
| 46 |
+
a type that is convertible to `bool`, for all i.
|
| 47 |
+
|
| 48 |
+
*Returns:* If `v.valueless_by_exception()`, `false`; otherwise if
|
| 49 |
+
`w.valueless_by_exception()`, `true`; otherwise, if
|
| 50 |
+
`v.index() > w.index()`, `true`; otherwise if `v.index() < w.index()`,
|
| 51 |
+
`false`; otherwise `get<`i`>(v) > get<`i`>(w)` with i being `v.index()`.
|
| 52 |
+
|
| 53 |
+
``` cpp
|
| 54 |
+
template <class... Types>
|
| 55 |
+
constexpr bool operator<=(const variant<Types...>& v, const variant<Types...>& w);
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
*Requires:* `get<`i`>(v) <= get<`i`>(w)` is a valid expression returning
|
| 59 |
+
a type that is convertible to `bool`, for all i.
|
| 60 |
+
|
| 61 |
+
*Returns:* If `v.valueless_by_exception()`, `true`; otherwise if
|
| 62 |
+
`w.valueless_by_exception()`, `false`; otherwise, if
|
| 63 |
+
`v.index() < w.index()`, `true`; otherwise if `v.index() > w.index()`,
|
| 64 |
+
`false`; otherwise `get<`i`>(v) <= get<`i`>(w)` with i being
|
| 65 |
+
`v.index()`.
|
| 66 |
+
|
| 67 |
+
``` cpp
|
| 68 |
+
template <class... Types>
|
| 69 |
+
constexpr bool operator>=(const variant<Types...>& v, const variant<Types...>& w);
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
*Requires:* `get<`i`>(v) >= get<`i`>(w)` is a valid expression returning
|
| 73 |
+
a type that is convertible to `bool`, for all i.
|
| 74 |
+
|
| 75 |
+
*Returns:* If `w.valueless_by_exception()`, `true`; otherwise if
|
| 76 |
+
`v.valueless_by_exception()`, `false`; otherwise, if
|
| 77 |
+
`v.index() > w.index()`, `true`; otherwise if `v.index() < w.index()`,
|
| 78 |
+
`false`; otherwise `get<`i`>(v) >= get<`i`>(w)` with i being
|
| 79 |
+
`v.index()`.
|
| 80 |
+
|