Skip to content

Commit 93838cd

Browse files
committed
Uniform notation of distance(first, last) to (last - first)
As allowed in 25.1 [algorithms.general] p12, to express the same things as same.
1 parent 898a677 commit 93838cd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

source/algorithms.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,11 +1201,11 @@
12011201
\complexity No applications of the corresponding predicate if \tcode{ForwardIterator1}
12021202
and \tcode{ForwardIter\-ator2} meet the requirements of random access iterators and
12031203
\tcode{last1 - first1 != last2 - first2}.
1204-
Otherwise, exactly \tcode{distance(first1, last1)} applications of the
1204+
Otherwise, exactly \tcode{last1 - first1} applications of the
12051205
corresponding predicate if \tcode{equal(\brk{}first1, last1, first2, last2)}
12061206
would return \tcode{true} if \tcode{pred} was not given in the argument list
12071207
or \tcode{equal(first1, last1, first2, last2, pred)} would return \tcode{true} if pred was given in the argument list; otherwise, at
1208-
worst \bigoh{N^2}, where $N$ has the value \tcode{distance(first1, last1)}.
1208+
worst \bigoh{N^2}, where $N$ has the value \tcode{last1 - first1}.
12091209
\end{itemdescr}
12101210

12111211
\rSec2[alg.search]{Search}
@@ -2441,7 +2441,7 @@
24412441
if there exists an integer
24422442
\tcode{n}
24432443
such that for all
2444-
\tcode{0 <= i < distance(start, finish)},
2444+
\tcode{0 <= i < (finish - start)},
24452445
\tcode{f(*(start + i))}
24462446
is true if and only if
24472447
\tcode{i < n}.
@@ -2667,7 +2667,7 @@
26672667

26682668
\begin{itemdescr}
26692669
\pnum
2670-
\returns If \tcode{distance(first, last) < 2}, returns
2670+
\returns If \tcode{(last - first) < 2}, returns
26712671
\tcode{last}. Otherwise, returns
26722672
the last iterator \tcode{i} in \crange{first}{last} for which the
26732673
range \range{first}{i} is sorted.
@@ -3538,7 +3538,7 @@
35383538

35393539
\begin{itemdescr}
35403540
\pnum
3541-
\returns If \tcode{distance(first, last) < 2}, returns
3541+
\returns If \tcode{(last - first) < 2}, returns
35423542
\tcode{last}. Otherwise, returns
35433543
the last iterator \tcode{i} in \crange{first}{last} for which the
35443544
range \range{first}{i} is a heap.
@@ -3788,7 +3788,7 @@
37883788
\complexity
37893789
At most
37903790
$max(\lfloor{\frac{3}{2}} (N-1)\rfloor, 0)$
3791-
applications of the corresponding predicate, where $N$ is \tcode{distance(first, last)}.
3791+
applications of the corresponding predicate, where $N$ is \tcode{last - first}.
37923792
\end{itemdescr}
37933793

37943794
\rSec2[alg.lex.comparison]{Lexicographical comparison}

0 commit comments

Comments
 (0)