tmp/tmp3sl6ql1q/{from.md → to.md}
RENAMED
|
@@ -12,16 +12,19 @@ template<class T, class Proj = identity,
|
|
| 12 |
```
|
| 13 |
|
| 14 |
Let `comp` be `less{}` for the overloads with no parameter `comp`, and
|
| 15 |
let `proj` be `identity{}` for the overloads with no parameter `proj`.
|
| 16 |
|
| 17 |
-
*Preconditions:*
|
| 18 |
-
|
| 19 |
-
|
|
|
|
| 20 |
|
| 21 |
-
*Returns:* `lo` if
|
| 22 |
-
`bool(comp(proj
|
|
|
|
|
|
|
| 23 |
|
| 24 |
[*Note 1*: If NaN is avoided, `T` can be a floating-point
|
| 25 |
type. — *end note*]
|
| 26 |
|
| 27 |
*Complexity:* At most two comparisons and three applications of the
|
|
|
|
| 12 |
```
|
| 13 |
|
| 14 |
Let `comp` be `less{}` for the overloads with no parameter `comp`, and
|
| 15 |
let `proj` be `identity{}` for the overloads with no parameter `proj`.
|
| 16 |
|
| 17 |
+
*Preconditions:*
|
| 18 |
+
`bool(invoke(comp, invoke(proj, hi), invoke(proj, lo)))` is `false`. For
|
| 19 |
+
the first form, type `T` meets the *Cpp17LessThanComparable*
|
| 20 |
+
requirements ([[cpp17.lessthancomparable]]).
|
| 21 |
|
| 22 |
+
*Returns:* `lo` if
|
| 23 |
+
`bool(invoke(comp, invoke(proj, v), invoke(proj, lo)))` is `true`, `hi`
|
| 24 |
+
if `bool(invoke(comp, invoke(proj, hi), invoke(proj, v)))` is `true`,
|
| 25 |
+
otherwise `v`.
|
| 26 |
|
| 27 |
[*Note 1*: If NaN is avoided, `T` can be a floating-point
|
| 28 |
type. — *end note*]
|
| 29 |
|
| 30 |
*Complexity:* At most two comparisons and three applications of the
|