From Jason Turner

[alg.adjacent.find]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpqyabe7k7/{from.md → to.md} +15 -5
tmp/tmpqyabe7k7/{from.md → to.md} RENAMED
@@ -25,10 +25,21 @@ template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
25
  constexpr I ranges::adjacent_find(I first, S last, Pred pred = {}, Proj proj = {});
26
  template<forward_range R, class Proj = identity,
27
  indirect_binary_predicate<projected<iterator_t<R>, Proj>,
28
  projected<iterator_t<R>, Proj>> Pred = ranges::equal_to>
29
  constexpr borrowed_iterator_t<R> ranges::adjacent_find(R&& r, Pred pred = {}, Proj proj = {});
 
 
 
 
 
 
 
 
 
 
 
30
  ```
31
 
32
  Let E be:
33
 
34
  - `*i == *(i + 1)` for the overloads with no parameter `pred`;
@@ -39,13 +50,12 @@ Let E be:
39
 
40
  *Returns:* The first iterator `i` such that both `i` and `i + 1` are in
41
  the range \[`first`, `last`) for which E holds. Returns `last` if no
42
  such iterator is found.
43
 
44
- *Complexity:* For the overloads with no `ExecutionPolicy`, exactly
45
  $$\min(\texttt{(i - first) + 1}, \ \texttt{(last - first) - 1})$$
46
  applications of the corresponding predicate, where `i` is
47
- `adjacent_find`’s return value. For the overloads with an
48
- `ExecutionPolicy`, 𝑂(`last - first`) applications of the corresponding
49
- predicate, and no more than twice as many applications of any
50
- projection.
51
 
 
25
  constexpr I ranges::adjacent_find(I first, S last, Pred pred = {}, Proj proj = {});
26
  template<forward_range R, class Proj = identity,
27
  indirect_binary_predicate<projected<iterator_t<R>, Proj>,
28
  projected<iterator_t<R>, Proj>> Pred = ranges::equal_to>
29
  constexpr borrowed_iterator_t<R> ranges::adjacent_find(R&& r, Pred pred = {}, Proj proj = {});
30
+
31
+ template<execution-policy Ep, random_access_iterator I, sized_sentinel_for<I> S,
32
+ class Proj = identity,
33
+ indirect_binary_predicate<projected<I, Proj>,
34
+ projected<I, Proj>> Pred = ranges::equal_to>
35
+ I ranges::adjacent_find(Ep&& exec, I first, S last, Pred pred = {}, Proj proj = {});
36
+ template<execution-policy Ep, sized-random-access-range R, class Proj = identity,
37
+ indirect_binary_predicate<projected<iterator_t<R>, Proj>,
38
+ projected<iterator_t<R>, Proj>> Pred = ranges::equal_to>
39
+ borrowed_iterator_t<R>
40
+ ranges::adjacent_find(Ep&& exec, R&& r, Pred pred = {}, Proj proj = {});
41
  ```
42
 
43
  Let E be:
44
 
45
  - `*i == *(i + 1)` for the overloads with no parameter `pred`;
 
50
 
51
  *Returns:* The first iterator `i` such that both `i` and `i + 1` are in
52
  the range \[`first`, `last`) for which E holds. Returns `last` if no
53
  such iterator is found.
54
 
55
+ *Complexity:* For the non-parallel algorithm overloads, exactly
56
  $$\min(\texttt{(i - first) + 1}, \ \texttt{(last - first) - 1})$$
57
  applications of the corresponding predicate, where `i` is
58
+ `adjacent_find`’s return value. For the parallel algorithm overloads,
59
+ 𝑂(`last - first`) applications of the corresponding predicate. No more
60
+ than twice as many applications of any projection.
 
61