From Jason Turner

[mismatch]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpgtqho12_/{from.md → to.md} +21 -6
tmp/tmpgtqho12_/{from.md → to.md} RENAMED
@@ -9,23 +9,38 @@ template<class InputIterator1, class InputIterator2>
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
 
 
 
 
16
  *Returns:* A pair of iterators `i` and `j` such that
17
  `j == first2 + (i - first1)` and `i` is the first iterator in the range
18
  \[`first1`, `last1`) for which the following corresponding conditions
19
  hold:
20
 
21
- ``` cpp
22
- !(*i == *(first2 + (i - first1)))
23
- pred(*i, *(first2 + (i - first1))) == false
24
- ```
25
 
26
- Returns the pair `last1` and `first2 + (last1 - first1)` if such an
27
- iterator `i` is not found.
 
28
 
29
  *Complexity:* At most `last1 - first1` applications of the corresponding
30
  predicate.
31
 
 
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