From Jason Turner

[mismatch]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp9amcyeyr/{from.md → to.md} +0 -83
tmp/tmp9amcyeyr/{from.md → to.md} RENAMED
@@ -1,83 +0,0 @@
1
- ### Mismatch <a id="mismatch">[[mismatch]]</a>
2
-
3
- ``` cpp
4
- template<class InputIterator1, class InputIterator2>
5
- constexpr pair<InputIterator1, InputIterator2>
6
- mismatch(InputIterator1 first1, InputIterator1 last1,
7
- InputIterator2 first2);
8
- template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2>
9
- pair<ForwardIterator1, ForwardIterator2>
10
- mismatch(ExecutionPolicy&& exec,
11
- ForwardIterator1 first1, ForwardIterator1 last1,
12
- ForwardIterator2 first2);
13
-
14
- template<class InputIterator1, class InputIterator2,
15
- class BinaryPredicate>
16
- constexpr pair<InputIterator1, InputIterator2>
17
- mismatch(InputIterator1 first1, InputIterator1 last1,
18
- InputIterator2 first2, BinaryPredicate pred);
19
- template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
20
- class BinaryPredicate>
21
- pair<ForwardIterator1, ForwardIterator2>
22
- mismatch(ExecutionPolicy&& exec,
23
- ForwardIterator1 first1, ForwardIterator1 last1,
24
- ForwardIterator2 first2, BinaryPredicate pred);
25
-
26
- template<class InputIterator1, class InputIterator2>
27
- constexpr pair<InputIterator1, InputIterator2>
28
- mismatch(InputIterator1 first1, InputIterator1 last1,
29
- InputIterator2 first2, InputIterator2 last2);
30
- template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2>
31
- pair<ForwardIterator1, ForwardIterator2>
32
- mismatch(ExecutionPolicy&& exec,
33
- ForwardIterator1 first1, ForwardIterator1 last1,
34
- ForwardIterator2 first2, ForwardIterator2 last2);
35
-
36
- template<class InputIterator1, class InputIterator2,
37
- class BinaryPredicate>
38
- constexpr pair<InputIterator1, InputIterator2>
39
- mismatch(InputIterator1 first1, InputIterator1 last1,
40
- InputIterator2 first2, InputIterator2 last2,
41
- BinaryPredicate pred);
42
- template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
43
- class BinaryPredicate>
44
- pair<ForwardIterator1, ForwardIterator2>
45
- mismatch(ExecutionPolicy&& exec,
46
- ForwardIterator1 first1, ForwardIterator1 last1,
47
- ForwardIterator2 first2, ForwardIterator2 last2,
48
- BinaryPredicate pred);
49
-
50
- template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
51
- class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
52
- requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
53
- constexpr ranges::mismatch_result<I1, I2>
54
- ranges::mismatch(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {},
55
- Proj1 proj1 = {}, Proj2 proj2 = {});
56
- template<input_range R1, input_range R2,
57
- class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
58
- requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
59
- constexpr ranges::mismatch_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>>
60
- ranges::mismatch(R1&& r1, R2&& r2, Pred pred = {},
61
- Proj1 proj1 = {}, Proj2 proj2 = {});
62
- ```
63
-
64
- Let `last2` be `first2 + (last1 - first1)` for the overloads with no
65
- parameter `last2` or `r2`.
66
-
67
- Let E be:
68
-
69
- - `!(*(first1 + n) == *(first2 + n))` for the overloads with no
70
- parameter `pred`;
71
- - `pred(*(first1 + n), *(first2 + n)) == false` for the overloads with a
72
- parameter `pred` and no parameter `proj1`;
73
- - `!invoke(pred, invoke(proj1, *(first1 + n)), invoke(proj2, *(first2 + n)))`
74
- for the overloads with both parameters `pred` and `proj1`.
75
-
76
- Let N be min(`last1 - first1`, `last2 - first2`).
77
-
78
- *Returns:* `{ first1 + n, first2 + n }`, where `n` is the smallest
79
- integer in \[`0`, N) such that E holds, or N if no such integer exists.
80
-
81
- *Complexity:* At most N applications of the corresponding predicate and
82
- any projections.
83
-