tmp/tmpvrnpdovf/{from.md → to.md}
RENAMED
|
@@ -12,12 +12,12 @@ template<class T, class U>
|
|
| 12 |
};
|
| 13 |
```
|
| 14 |
|
| 15 |
Given types `T` and `U`, let `t` and `u` be lvalues of types
|
| 16 |
`const remove_reference_t<T>` and `const remove_reference_t<U>`
|
| 17 |
-
respectively. `T` and `U` model
|
| 18 |
-
|
| 19 |
|
| 20 |
- `t == u`, `u == t`, `t != u`, and `u != t` have the same domain.
|
| 21 |
- `bool(u == t) == bool(t == u)`.
|
| 22 |
- `bool(t != u) == !bool(t == u)`.
|
| 23 |
- `bool(u != t) == bool(t != u)`.
|
|
@@ -37,24 +37,29 @@ symmetric. — *end note*]
|
|
| 37 |
|
| 38 |
``` cpp
|
| 39 |
template<class T, class U>
|
| 40 |
concept equality_comparable_with =
|
| 41 |
equality_comparable<T> && equality_comparable<U> &&
|
| 42 |
-
|
| 43 |
equality_comparable<
|
| 44 |
common_reference_t<
|
| 45 |
const remove_reference_t<T>&,
|
| 46 |
const remove_reference_t<U>&>> &&
|
| 47 |
weakly-equality-comparable-with<T, U>;
|
| 48 |
```
|
| 49 |
|
| 50 |
-
Given types `T` and `U`, let `t`
|
| 51 |
-
`const remove_reference_t<T>`
|
| 52 |
-
`
|
|
|
|
|
|
|
| 53 |
|
| 54 |
``` cpp
|
| 55 |
common_reference_t<const remove_reference_t<T>&, const remove_reference_t<U>&>
|
| 56 |
```
|
| 57 |
|
| 58 |
`T` and `U` model `equality_comparable_with<T, U>` only if
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
| 60 |
|
|
|
|
| 12 |
};
|
| 13 |
```
|
| 14 |
|
| 15 |
Given types `T` and `U`, let `t` and `u` be lvalues of types
|
| 16 |
`const remove_reference_t<T>` and `const remove_reference_t<U>`
|
| 17 |
+
respectively. `T` and `U` model `weakly-equality-comparable-with<T, U>`
|
| 18 |
+
only if
|
| 19 |
|
| 20 |
- `t == u`, `u == t`, `t != u`, and `u != t` have the same domain.
|
| 21 |
- `bool(u == t) == bool(t == u)`.
|
| 22 |
- `bool(t != u) == !bool(t == u)`.
|
| 23 |
- `bool(u != t) == bool(t != u)`.
|
|
|
|
| 37 |
|
| 38 |
``` cpp
|
| 39 |
template<class T, class U>
|
| 40 |
concept equality_comparable_with =
|
| 41 |
equality_comparable<T> && equality_comparable<U> &&
|
| 42 |
+
comparison-common-type-with<T, U> &&
|
| 43 |
equality_comparable<
|
| 44 |
common_reference_t<
|
| 45 |
const remove_reference_t<T>&,
|
| 46 |
const remove_reference_t<U>&>> &&
|
| 47 |
weakly-equality-comparable-with<T, U>;
|
| 48 |
```
|
| 49 |
|
| 50 |
+
Given types `T` and `U`, let `t` and `t2` be lvalues denoting distinct
|
| 51 |
+
equal objects of types `const remove_reference_t<T>` and
|
| 52 |
+
`remove_cvref_t<T>`, respectively, let `u` and `u2` be lvalues denoting
|
| 53 |
+
distinct equal objects of types `const remove_reference_t<U>` and
|
| 54 |
+
`remove_cvref_t<U>`, respectively, and let `C` be:
|
| 55 |
|
| 56 |
``` cpp
|
| 57 |
common_reference_t<const remove_reference_t<T>&, const remove_reference_t<U>&>
|
| 58 |
```
|
| 59 |
|
| 60 |
`T` and `U` model `equality_comparable_with<T, U>` only if
|
| 61 |
+
|
| 62 |
+
``` cpp
|
| 63 |
+
bool(t == u) == bool(CONVERT_TO_LVALUE<C>(t2) == CONVERT_TO_LVALUE<C>(u2))
|
| 64 |
+
```
|
| 65 |
|