tmp/tmp9pm5vcnn/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Any of <a id="alg.any.of">[[alg.any.of]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template<class InputIterator, class Predicate>
|
| 5 |
+
constexpr bool any_of(InputIterator first, InputIterator last, Predicate pred);
|
| 6 |
+
template<class ExecutionPolicy, class ForwardIterator, class Predicate>
|
| 7 |
+
bool any_of(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last,
|
| 8 |
+
Predicate pred);
|
| 9 |
+
|
| 10 |
+
template<input_iterator I, sentinel_for<I> S, class Proj = identity,
|
| 11 |
+
indirect_unary_predicate<projected<I, Proj>> Pred>
|
| 12 |
+
constexpr bool ranges::any_of(I first, S last, Pred pred, Proj proj = {});
|
| 13 |
+
template<input_range R, class Proj = identity,
|
| 14 |
+
indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
|
| 15 |
+
constexpr bool ranges::any_of(R&& r, Pred pred, Proj proj = {});
|
| 16 |
+
```
|
| 17 |
+
|
| 18 |
+
Let E be:
|
| 19 |
+
|
| 20 |
+
- `pred(*i)` for the overloads in namespace `std`;
|
| 21 |
+
- `invoke(pred, invoke(proj, *i))` for the overloads in namespace
|
| 22 |
+
`ranges`.
|
| 23 |
+
|
| 24 |
+
*Returns:* `true` if E is `true` for some iterator `i` in the range
|
| 25 |
+
\[`first`, `last`), and `false` otherwise.
|
| 26 |
+
|
| 27 |
+
*Complexity:* At most `last - first` applications of the predicate and
|
| 28 |
+
any projection.
|
| 29 |
+
|