Skip to content

Commit 994d417

Browse files
committed
[mismatch] LWG3178 std::mismatch is missing an upper bound
1 parent 0ba5424 commit 994d417

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

source/algorithms.tex

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3654,17 +3654,18 @@
36543654
for the overloads with both parameters \tcode{pred} and \tcode{proj1}.
36553655
\end{itemize}
36563656

3657+
\pnum
3658+
Let $N$ be $\min(\tcode{last1 - first1}, \ \tcode{last2 - first2})$.
3659+
36573660
\pnum
36583661
\returns
36593662
\tcode{\{ first1 + n, first2 + n \}},
3660-
where \tcode{n} is the smallest integer such that $E$ holds,
3661-
or $\min(\tcode{last1 - first1}, \ \tcode{last2 - first2})$
3662-
if no such integer exists.
3663+
where \tcode{n} is the smallest integer in \range{0}{$N$} such that $E$ holds,
3664+
or $N$ if no such integer exists.
36633665

36643666
\pnum
36653667
\complexity
3666-
At most $\min(\tcode{last1 - first1}, \ \tcode{last2 - first2})$
3667-
applications of the corresponding predicate and any projections.
3668+
At most $N$ applications of the corresponding predicate and any projections.
36683669
\end{itemdescr}
36693670

36703671
\rSec2[alg.equal]{Equal}

0 commit comments

Comments
 (0)