Skip to content

Commit

Permalink
[iterator.requirements.general] "counted range" defines a term of art
Browse files Browse the repository at this point in the history
  • Loading branch information
CaseyCarter committed Dec 3, 2018
1 parent e1da372 commit 80cf4ae
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions source/iterators.tex
Original file line number Diff line number Diff line change
Expand Up @@ -604,12 +604,15 @@
\range{i}{s} denotes a valid range.

\pnum
A counted range \range{i}{n} is empty if \tcode{n == 0}; otherwise, \range{i}{n}
refers to the \tcode{n} elements in the data structure starting with the element
pointed to by \tcode{i} and up to but not including the element, if any, pointed to by
the result of \tcode{n} applications of \tcode{++i}. A counted range
\range{i}{n} is valid if and only if \tcode{n == 0}; or \tcode{n} is positive,
\tcode{i} is dereferenceable, and \range{++i}{-{-}n} is valid.
A \defnx{counted range}{range!counted} \range{i}{n} is empty if \tcode{n == 0};
otherwise, \range{i}{n} refers to
the \tcode{n} elements in the data structure
starting with the element pointed to by \tcode{i} and up to but not including
the element, if any, pointed to by
the result of \tcode{n} applications of \tcode{++i}.
A counted range \range{i}{n} is valid if and only if \tcode{n == 0};
or \tcode{n} is positive, \tcode{i} is dereferenceable,
and \range{++i}{-{-}n} is valid.

\pnum
The result of the application of library functions
Expand Down

0 comments on commit 80cf4ae

Please sign in to comment.