Skip to content

Commit a63abc1

Browse files
committed
[iterator.requirements.general,range.counted] Rework notation for counted ranges.
1 parent 5c5e8f1 commit a63abc1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

source/iterators.tex

+4-4
Original file line numberDiff line numberDiff line change
@@ -620,15 +620,15 @@
620620
\range{i}{s} denotes a valid range.
621621

622622
\pnum
623-
A \defnadj{counted}{range} \range{i}{n} is empty if \tcode{n == 0};
624-
otherwise, \range{i}{n} refers to
623+
A \defnadj{counted}{range} $\tcode{i} + \range{0}{n}$ is empty if \tcode{n == 0};
624+
otherwise, $\tcode{i} + \range{0}{n}$ refers to
625625
the \tcode{n} elements in the data structure
626626
starting with the element pointed to by \tcode{i} and up to but not including
627627
the element, if any, pointed to by
628628
the result of \tcode{n} applications of \tcode{++i}.
629-
A counted range \range{i}{n} is valid if and only if \tcode{n == 0};
629+
A counted range $\tcode{i} + \range{0}{n}$ is valid if and only if \tcode{n == 0};
630630
or \tcode{n} is positive, \tcode{i} is dereferenceable,
631-
and \range{++i}{-{-}n} is valid.
631+
and $\tcode{++i} + \range{0}{-{-}n}$ is valid.
632632

633633
\pnum
634634
The result of the application of library functions

source/ranges.tex

+2-1
Original file line numberDiff line numberDiff line change
@@ -5718,8 +5718,9 @@
57185718
\rSec2[range.counted]{Counted view}
57195719

57205720
\pnum
5721+
\indextext{range!counted}%
57215722
A counted view presents a \libconcept{view} of the elements
5722-
of the counted range\iref{iterator.requirements.general} \range{i}{n}
5723+
of the counted range\iref{iterator.requirements.general} $\tcode{i} + \range{0}{n}$
57235724
for some iterator \tcode{i} and non-negative integer \tcode{n}.
57245725

57255726
\pnum

0 commit comments

Comments
 (0)