From Jason Turner

[alg.equal]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpuegia9y6/{from.md → to.md} +21 -4
tmp/tmpuegia9y6/{from.md → to.md} RENAMED
@@ -7,15 +7,32 @@ template<class InputIterator1, class InputIterator2>
7
 
8
  template<class InputIterator1, class InputIterator2,
9
  class BinaryPredicate>
10
  bool equal(InputIterator1 first1, InputIterator1 last1,
11
  InputIterator2 first2, BinaryPredicate pred);
 
 
 
 
 
 
 
 
 
 
12
  ```
13
 
14
- *Returns:* `true` if for every iterator `i` in the range \[`first1`,
15
- `last1`) the following corresponding conditions hold:
 
 
 
 
16
  `*i == *(first2 + (i - first1)), pred(*i, *(first2 + (i - first1))) != false`.
17
  Otherwise, returns `false`.
18
 
19
- *Complexity:* At most `last1 - first1` applications of the corresponding
20
- predicate.
 
 
 
21
 
 
7
 
8
  template<class InputIterator1, class InputIterator2,
9
  class BinaryPredicate>
10
  bool equal(InputIterator1 first1, InputIterator1 last1,
11
  InputIterator2 first2, BinaryPredicate pred);
12
+
13
+ template<class InputIterator1, class InputIterator2>
14
+ bool equal(InputIterator1 first1, InputIterator1 last1,
15
+ InputIterator2 first2, InputIterator2 last2);
16
+
17
+ template<class InputIterator1, class InputIterator2,
18
+ class BinaryPredicate>
19
+ bool equal(InputIterator1 first1, InputIterator1 last1,
20
+ InputIterator2 first2, InputIterator2 last2,
21
+ BinaryPredicate pred);
22
  ```
23
 
24
+ *Remarks:* If `last2` was not given in the argument list, it denotes
25
+ `first2 + (last1 - first1)` below.
26
+
27
+ *Returns:* If `last1 - first1 != last2 - first2`, return `false`.
28
+ Otherwise return `true` if for every iterator `i` in the range
29
+ \[`first1`, `last1`) the following corresponding conditions hold:
30
  `*i == *(first2 + (i - first1)), pred(*i, *(first2 + (i - first1))) != false`.
31
  Otherwise, returns `false`.
32
 
33
+ *Complexity:* No applications of the corresponding predicate if
34
+ `InputIterator1` and `InputIterator2` meet the requirements of random
35
+ access iterators and `last1 - first1 != last2 - first2`. Otherwise, at
36
+ most `min(last1 - first1, last2 - first2)` applications of the
37
+ corresponding predicate.
38