From Jason Turner

[mismatch]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp26hi3db2/{from.md → to.md} +30 -12
tmp/tmp26hi3db2/{from.md → to.md} RENAMED
@@ -3,44 +3,62 @@
3
  ``` cpp
4
  template<class InputIterator1, class InputIterator2>
5
  pair<InputIterator1, InputIterator2>
6
  mismatch(InputIterator1 first1, InputIterator1 last1,
7
  InputIterator2 first2);
 
 
 
 
 
8
 
9
  template<class InputIterator1, class InputIterator2,
10
  class BinaryPredicate>
11
  pair<InputIterator1, InputIterator2>
12
  mismatch(InputIterator1 first1, InputIterator1 last1,
13
  InputIterator2 first2, BinaryPredicate pred);
 
 
 
 
 
 
14
 
15
  template<class InputIterator1, class InputIterator2>
16
  pair<InputIterator1, InputIterator2>
17
  mismatch(InputIterator1 first1, InputIterator1 last1,
18
  InputIterator2 first2, InputIterator2 last2);
 
 
 
 
 
19
 
20
  template<class InputIterator1, class InputIterator2,
21
  class BinaryPredicate>
22
  pair<InputIterator1, InputIterator2>
23
  mismatch(InputIterator1 first1, InputIterator1 last1,
24
  InputIterator2 first2, InputIterator2 last2,
25
  BinaryPredicate pred);
 
 
 
 
 
 
 
26
  ```
27
 
28
  *Remarks:* If `last2` was not given in the argument list, it denotes
29
  `first2 + (last1 - first1)` below.
30
 
31
- *Returns:* A pair of iterators `i` and `j` such that
32
- `j == first2 + (i - first1)` and `i` is the first iterator in the range
33
- \[`first1`, `last1`) for which the following corresponding conditions
34
- hold:
35
 
36
- - `j` is in the range `[first2, last2)`.
37
- - `!(*i == *(first2 + (i - first1)))`
38
- - `pred(*i, *(first2 + (i - first1))) == false`
39
 
40
- Returns the pair `first1 + min(last1 - first1, last2 - first2)` and
41
- `first2 + min(last1 - first1, last2 - first2)` if such an iterator `i`
42
- is not found.
43
 
44
- *Complexity:* At most `last1 - first1` applications of the corresponding
45
- predicate.
46
 
 
3
  ``` cpp
4
  template<class InputIterator1, class InputIterator2>
5
  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
  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
  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
  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
 
51
  *Remarks:* If `last2` was not given in the argument list, it denotes
52
  `first2 + (last1 - first1)` below.
53
 
54
+ *Returns:* A pair of iterators `first1 + n` and `first2 + n`, where `n`
55
+ is the smallest integer such that, respectively,
 
 
56
 
57
+ - `!(*(first1 + n) == *(first2 + n))` or
58
+ - `pred(*(first1 + n), *(first2 + n)) == false`,
 
59
 
60
+ or `min(last1 - first1, last2 - first2)` if no such integer exists.
 
 
61
 
62
+ *Complexity:* At most `min(last1 - first1, last2 - first2)` applications
63
+ of the corresponding predicate.
64