tmp/tmpul232lpf/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Comparison algorithms <a id="cmp.alg">[[cmp.alg]]</a>
|
| 2 |
+
|
| 3 |
+
The name `strong_order` denotes a customization point object
|
| 4 |
+
[[customization.point.object]]. Given subexpressions `E` and `F`, the
|
| 5 |
+
expression `strong_order(E, F)` is expression-equivalent
|
| 6 |
+
[[defns.expression-equivalent]] to the following:
|
| 7 |
+
|
| 8 |
+
- If the decayed types of `E` and `F` differ, `strong_order(E, F)` is
|
| 9 |
+
ill-formed.
|
| 10 |
+
- Otherwise, `strong_ordering(strong_order(E, F))` if it is a
|
| 11 |
+
well-formed expression with overload resolution performed in a context
|
| 12 |
+
that does not include a declaration of `std::strong_order`.
|
| 13 |
+
- Otherwise, if the decayed type `T` of `E` is a floating-point type,
|
| 14 |
+
yields a value of type `strong_ordering` that is consistent with the
|
| 15 |
+
ordering observed by `T`’s comparison operators, and if
|
| 16 |
+
`numeric_limits<T>::is_iec559` is `true`, is additionally consistent
|
| 17 |
+
with the `totalOrder` operation as specified in ISO/IEC/IEEE 60559.
|
| 18 |
+
- Otherwise, `strong_ordering(compare_three_way()(E, F))` if it is a
|
| 19 |
+
well-formed expression.
|
| 20 |
+
- Otherwise, `strong_order(E, F)` is ill-formed. \[*Note 1*: This case
|
| 21 |
+
can result in substitution failure when `strong_order(E, F)` appears
|
| 22 |
+
in the immediate context of a template instantiation. — *end note*]
|
| 23 |
+
|
| 24 |
+
The name `weak_order` denotes a customization point object
|
| 25 |
+
[[customization.point.object]]. Given subexpressions `E` and `F`, the
|
| 26 |
+
expression `weak_order(E, F)` is expression-equivalent
|
| 27 |
+
[[defns.expression-equivalent]] to the following:
|
| 28 |
+
|
| 29 |
+
- If the decayed types of `E` and `F` differ, `weak_order(E, F)` is
|
| 30 |
+
ill-formed.
|
| 31 |
+
- Otherwise, `weak_ordering(weak_order(E, F))` if it is a well-formed
|
| 32 |
+
expression with overload resolution performed in a context that does
|
| 33 |
+
not include a declaration of `std::weak_order`.
|
| 34 |
+
- Otherwise, if the decayed type `T` of `E` is a floating-point type,
|
| 35 |
+
yields a value of type `weak_ordering` that is consistent with the
|
| 36 |
+
ordering observed by `T`’s comparison operators and `strong_order`,
|
| 37 |
+
and if `numeric_limits<T>::is_iec559` is `true`, is additionally
|
| 38 |
+
consistent with the following equivalence classes, ordered from lesser
|
| 39 |
+
to greater:
|
| 40 |
+
- together, all negative NaN values;
|
| 41 |
+
- negative infinity;
|
| 42 |
+
- each normal negative value;
|
| 43 |
+
- each subnormal negative value;
|
| 44 |
+
- together, both zero values;
|
| 45 |
+
- each subnormal positive value;
|
| 46 |
+
- each normal positive value;
|
| 47 |
+
- positive infinity;
|
| 48 |
+
- together, all positive NaN values.
|
| 49 |
+
- Otherwise, `weak_ordering(compare_three_way()(E, F))` if it is a
|
| 50 |
+
well-formed expression.
|
| 51 |
+
- Otherwise, `weak_ordering(strong_order(E, F))` if it is a well-formed
|
| 52 |
+
expression.
|
| 53 |
+
- Otherwise, `weak_order(E, F)` is ill-formed. \[*Note 2*: This case can
|
| 54 |
+
result in substitution failure when `std::weak_order(E, F)` appears in
|
| 55 |
+
the immediate context of a template instantiation. — *end note*]
|
| 56 |
+
|
| 57 |
+
The name `partial_order` denotes a customization point object
|
| 58 |
+
[[customization.point.object]]. Given subexpressions `E` and `F`, the
|
| 59 |
+
expression `partial_order(E, F)` is expression-equivalent
|
| 60 |
+
[[defns.expression-equivalent]] to the following:
|
| 61 |
+
|
| 62 |
+
- If the decayed types of `E` and `F` differ, `partial_order(E, F)` is
|
| 63 |
+
ill-formed.
|
| 64 |
+
- Otherwise, `partial_ordering(partial_order(E, F))` if it is a
|
| 65 |
+
well-formed expression with overload resolution performed in a context
|
| 66 |
+
that does not include a declaration of `std::partial_order`.
|
| 67 |
+
- Otherwise, `partial_ordering(compare_three_way()(E, F))` if it is a
|
| 68 |
+
well-formed expression.
|
| 69 |
+
- Otherwise, `partial_ordering(weak_order(E, F))` if it is a well-formed
|
| 70 |
+
expression.
|
| 71 |
+
- Otherwise, `partial_order(E, F)` is ill-formed. \[*Note 3*: This case
|
| 72 |
+
can result in substitution failure when `std::partial_order(E, F)`
|
| 73 |
+
appears in the immediate context of a template
|
| 74 |
+
instantiation. — *end note*]
|
| 75 |
+
|
| 76 |
+
The name `compare_strong_order_fallback` denotes a customization point
|
| 77 |
+
object [[customization.point.object]]. Given subexpressions `E` and F,
|
| 78 |
+
the expression `compare_strong_order_fallback(E, F)` is
|
| 79 |
+
expression-equivalent [[defns.expression-equivalent]] to:
|
| 80 |
+
|
| 81 |
+
- If the decayed types of `E` and `F` differ,
|
| 82 |
+
`compare_strong_order_fallback(E, F)` is ill-formed.
|
| 83 |
+
- Otherwise, `strong_order(E, F)` if it is a well-formed expression.
|
| 84 |
+
- Otherwise, if the expressions `E == F` and `E < F` are both
|
| 85 |
+
well-formed and convertible to `bool`,
|
| 86 |
+
``` cpp
|
| 87 |
+
E == F ? strong_ordering::equal :
|
| 88 |
+
E < F ? strong_ordering::less :
|
| 89 |
+
strong_ordering::greater
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
+
except that `E` and `F` are evaluated only once.
|
| 93 |
+
- Otherwise, `compare_strong_order_fallback(E, F)` is ill-formed.
|
| 94 |
+
|
| 95 |
+
The name `compare_weak_order_fallback` denotes a customization point
|
| 96 |
+
object [[customization.point.object]]. Given subexpressions `E` and `F`,
|
| 97 |
+
the expression `compare_weak_order_fallback(E, F)` is
|
| 98 |
+
expression-equivalent [[defns.expression-equivalent]] to:
|
| 99 |
+
|
| 100 |
+
- If the decayed types of `E` and `F` differ,
|
| 101 |
+
`compare_weak_order_fallback(E, F)` is ill-formed.
|
| 102 |
+
- Otherwise, `weak_order(E, F)` if it is a well-formed expression.
|
| 103 |
+
- Otherwise, if the expressions `E == F` and `E < F` are both
|
| 104 |
+
well-formed and convertible to `bool`,
|
| 105 |
+
``` cpp
|
| 106 |
+
E == F ? weak_ordering::equivalent :
|
| 107 |
+
E < F ? weak_ordering::less :
|
| 108 |
+
weak_ordering::greater
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
except that `E` and `F` are evaluated only once.
|
| 112 |
+
- Otherwise, `compare_weak_order_fallback(E, F)` is ill-formed.
|
| 113 |
+
|
| 114 |
+
The name `compare_partial_order_fallback` denotes a customization point
|
| 115 |
+
object [[customization.point.object]]. Given subexpressions `E` and `F`,
|
| 116 |
+
the expression `compare_partial_order_fallback(E, F)` is
|
| 117 |
+
expression-equivalent [[defns.expression-equivalent]] to:
|
| 118 |
+
|
| 119 |
+
- If the decayed types of `E` and `F` differ,
|
| 120 |
+
`compare_partial_order_fallback(E, F)` is ill-formed.
|
| 121 |
+
- Otherwise, `partial_order(E, F)` if it is a well-formed expression.
|
| 122 |
+
- Otherwise, if the expressions `E == F` and `E < F` are both
|
| 123 |
+
well-formed and convertible to `bool`,
|
| 124 |
+
``` cpp
|
| 125 |
+
E == F ? partial_ordering::equivalent :
|
| 126 |
+
E < F ? partial_ordering::less :
|
| 127 |
+
F < E ? partial_ordering::greater :
|
| 128 |
+
partial_ordering::unordered
|
| 129 |
+
```
|
| 130 |
+
|
| 131 |
+
except that `E` and `F` are evaluated only once.
|
| 132 |
+
- Otherwise, `compare_partial_order_fallback(E, F)` is ill-formed.
|
| 133 |
+
|