File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 692692The result of the application of library functions
693693to invalid ranges is undefined.
694694
695+ \pnum
696+ For an iterator \tcode {i} of a type that
697+ models \libconcept {contiguous_iterator}\iref {iterator.concept.contiguous },
698+ library functions are permitted
699+ to replace \range {i}{s} with
700+ \range {to_address(i)}{to_address(i + ranges::distance(i, s))}, and
701+ to replace \countedrange {i}{n} with \range {to_address(i)}{to_address(i + n)}.
702+ \begin {note }
703+ This means a program cannot rely on any side effects of
704+ dereferencing a contiguous iterator \tcode {i},
705+ because library functions might operate on
706+ pointers obtained by \tcode {to_address(i)}
707+ instead of operating on \tcode {i}.
708+ Similarly, a program cannot rely on any side effects of
709+ individual increments on a contiguous iterator \tcode {i},
710+ because library functions might advance \tcode {i} only once.
711+ \end {note }
712+
695713\pnum
696714All the categories of iterators require only those functions that are realizable for a given category in
697715constant time (amortized).
You can’t perform that action at this time.
0 commit comments