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
Fixes #2931.
  • Loading branch information
CaseyCarter authored and zygoloid committed Jun 14, 2019
1 parent b3b1f63 commit 13d04d0
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 @@ -614,12 +614,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 \defnadj{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.

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

0 comments on commit 13d04d0

Please sign in to comment.