Skip to content

Commit 5474388

Browse files
committed
[iterator.operations, range.iter.op.distance] Reword "get to".
It was previously not explicitly stated that input iterators would actually be incremented (which invalidates copies). The new wording is more explicit about how the distance is measured, and in doing so calls out more explicitly that input iterators are indeed incremented.
1 parent dd99020 commit 5474388

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

source/iterators.tex

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2763,11 +2763,9 @@
27632763
\pnum
27642764
\effects
27652765
If \tcode{InputIterator} meets the \oldconcept{RandomAccessIterator} requirements,
2766-
returns \tcode{(last - first)}; otherwise, returns
2767-
the number of increments needed to get from
2768-
\tcode{first}
2769-
to
2770-
\tcode{last}.
2766+
returns \tcode{(last - first)}; otherwise, increments
2767+
\tcode{first} until \tcode{last} is reached and returns
2768+
the number of increments.
27712769
\end{itemdescr}
27722770

27732771
\indexlibraryglobal{next}%
@@ -2952,10 +2950,9 @@
29522950
\effects
29532951
If \tcode{S} and \tcode{I} model \tcode{\libconcept{sized_sentinel_for}<S, I>},
29542952
returns \tcode{(last - first)};
2955-
otherwise, returns the number of increments needed to get from
2956-
\tcode{first}
2957-
to
2958-
\tcode{last}.
2953+
otherwise, increments
2954+
\tcode{first} until \tcode{last} is reached and returns
2955+
the number of increments.
29592956
\end{itemdescr}
29602957

29612958
\indexlibraryglobal{distance}%

0 commit comments

Comments
 (0)