From Jason Turner

[alg.find.first.of]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpjzyh465e/{from.md → to.md} +16 -3
tmp/tmpjzyh465e/{from.md → to.md} RENAMED
@@ -1,6 +1,6 @@
1
- ### Find first <a id="alg.find.first.of">[[alg.find.first.of]]</a>
2
 
3
  ``` cpp
4
  template<class InputIterator, class ForwardIterator>
5
  constexpr InputIterator
6
  find_first_of(InputIterator first1, InputIterator last1,
@@ -36,10 +36,23 @@ template<input_range R1, forward_range R2,
36
  requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
37
  constexpr borrowed_iterator_t<R1>
38
  ranges::find_first_of(R1&& r1, R2&& r2,
39
  Pred pred = {},
40
  Proj1 proj1 = {}, Proj2 proj2 = {});
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  ```
42
 
43
  Let E be:
44
 
45
  - `*i == *j` for the overloads with no parameter `pred`;
@@ -53,8 +66,8 @@ Let E be:
53
  *Returns:* The first iterator `i` in the range \[`first1`, `last1`) such
54
  that for some iterator `j` in the range \[`first2`, `last2`) E holds.
55
  Returns `last1` if \[`first2`, `last2`) is empty or if no such iterator
56
  is found.
57
 
58
- *Complexity:* At most `(last1-first1) * (last2-first2)` applications of
59
- the corresponding predicate and any projections.
60
 
 
1
+ ### Find first of <a id="alg.find.first.of">[[alg.find.first.of]]</a>
2
 
3
  ``` cpp
4
  template<class InputIterator, class ForwardIterator>
5
  constexpr InputIterator
6
  find_first_of(InputIterator first1, InputIterator last1,
 
36
  requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
37
  constexpr borrowed_iterator_t<R1>
38
  ranges::find_first_of(R1&& r1, R2&& r2,
39
  Pred pred = {},
40
  Proj1 proj1 = {}, Proj2 proj2 = {});
41
+
42
+ template<execution-policy Ep, random_access_iterator I1, sized_sentinel_for<I1> S1,
43
+ random_access_iterator I2, sized_sentinel_for<I2> S2,
44
+ class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
45
+ requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
46
+ I1 ranges::find_first_of(Ep&& exec, I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {},
47
+ Proj1 proj1 = {}, Proj2 proj2 = {});
48
+ template<execution-policy Ep, sized-random-access-range R1, sized-random-access-range R2,
49
+ class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
50
+ requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
51
+ borrowed_iterator_t<R1>
52
+ ranges::find_first_of(Ep&& exec, R1&& r1, R2&& r2, Pred pred = {},
53
+ Proj1 proj1 = {}, Proj2 proj2 = {});
54
  ```
55
 
56
  Let E be:
57
 
58
  - `*i == *j` for the overloads with no parameter `pred`;
 
66
  *Returns:* The first iterator `i` in the range \[`first1`, `last1`) such
67
  that for some iterator `j` in the range \[`first2`, `last2`) E holds.
68
  Returns `last1` if \[`first2`, `last2`) is empty or if no such iterator
69
  is found.
70
 
71
+ *Complexity:* At most `(last1 - first1) * (last2 - first2)` applications
72
+ of the corresponding predicate and any projections.
73