From Jason Turner

[alg.contains]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp0ofxxrb4/{from.md → to.md} +44 -3
tmp/tmp0ofxxrb4/{from.md → to.md} RENAMED
@@ -1,18 +1,34 @@
1
  ### Contains <a id="alg.contains">[[alg.contains]]</a>
2
 
3
  ``` cpp
4
- template<input_iterator I, sentinel_for<I> S, class T, class Proj = identity>
 
5
  requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>
6
  constexpr bool ranges::contains(I first, S last, const T& value, Proj proj = {});
7
- template<input_range R, class T, class Proj = identity>
8
  requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*>
9
  constexpr bool ranges::contains(R&& r, const T& value, Proj proj = {});
10
  ```
11
 
12
  *Returns:* `ranges::find(std::move(first), last, value, proj) != last`.
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  ``` cpp
15
  template<forward_iterator I1, sentinel_for<I1> S1,
16
  forward_iterator I2, sentinel_for<I2> S2,
17
  class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
18
  requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
@@ -24,7 +40,32 @@ template<forward_range R1, forward_range R2,
24
  constexpr bool ranges::contains_subrange(R1&& r1, R2&& r2, Pred pred = {},
25
  Proj1 proj1 = {}, Proj2 proj2 = {});
26
  ```
27
 
28
  *Returns:*
29
- `first2 == last2 || !ranges::search(first1, last1, first2, last2, pred, proj1, proj2).empty()`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
 
1
  ### Contains <a id="alg.contains">[[alg.contains]]</a>
2
 
3
  ``` cpp
4
+ template<input_iterator I, sentinel_for<I> S, class Proj = identity,
5
+ class T = projected_value_t<I, Proj>>
6
  requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>
7
  constexpr bool ranges::contains(I first, S last, const T& value, Proj proj = {});
8
+ template<input_range R, class Proj = identity, class T = projected_value_t<iterator_t<R>, Proj>>
9
  requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*>
10
  constexpr bool ranges::contains(R&& r, const T& value, Proj proj = {});
11
  ```
12
 
13
  *Returns:* `ranges::find(std::move(first), last, value, proj) != last`.
14
 
15
+ ``` cpp
16
+ template<execution-policy Ep, random_access_iterator I, sized_sentinel_for<I> S,
17
+ class Proj = identity, class T = projected_value_t<I, Proj>>
18
+ requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>
19
+ bool ranges::contains(Ep&& exec, I first, S last, const T& value, Proj proj = {});
20
+ template<execution-policy Ep, sized-random-access-range R, class Proj = identity,
21
+ class T = projected_value_t<iterator_t<R>, Proj>>
22
+ requires
23
+ indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*>
24
+ bool ranges::contains(Ep&& exec, R&& r, const T& value, Proj proj = {});
25
+ ```
26
+
27
+ *Returns:*
28
+ `ranges::find(std::forward<Ep>(exec), first, last, value, proj) != last`.
29
+
30
  ``` cpp
31
  template<forward_iterator I1, sentinel_for<I1> S1,
32
  forward_iterator I2, sentinel_for<I2> S2,
33
  class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
34
  requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
 
40
  constexpr bool ranges::contains_subrange(R1&& r1, R2&& r2, Pred pred = {},
41
  Proj1 proj1 = {}, Proj2 proj2 = {});
42
  ```
43
 
44
  *Returns:*
45
+
46
+ ``` cpp
47
+ first2 == last2 || !ranges::search(first1, last1, first2, last2,
48
+ pred, proj1, proj2).empty()
49
+ ```
50
+
51
+ ``` cpp
52
+ template<execution-policy Ep, random_access_iterator I1, sized_sentinel_for<I1> S1,
53
+ random_access_iterator I2, sized_sentinel_for<I2> S2,
54
+ class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
55
+ requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
56
+ bool ranges::contains_subrange(Ep&& exec, I1 first1, S1 last1, I2 first2, S2 last2,
57
+ Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {});
58
+ template<execution-policy Ep, sized-random-access-range R1, sized-random-access-range R2,
59
+ class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
60
+ requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
61
+ bool ranges::contains_subrange(Ep&& exec, R1&& r1, R2&& r2, Pred pred = {},
62
+ Proj1 proj1 = {}, Proj2 proj2 = {});
63
+ ```
64
+
65
+ *Returns:*
66
+
67
+ ``` cpp
68
+ first2 == last2 || !ranges::search(std::forward<Ep>(exec), first1, last1,
69
+ first2, last2, pred, proj1, proj2).empty()
70
+ ```
71