File tree 1 file changed +9
-13
lines changed 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change 556
556
\end {note }
557
557
558
558
\pnum
559
+ \indextext {past-the-end iterator|see{iterator, past-the-end}}%
560
+ \indextext {dereferenceable iterator|see{iterator, dereferenceable}}%
559
561
Just as a regular pointer to an array guarantees that there is a pointer value pointing past the last element
560
562
of the array, so for any iterator type there is an iterator value that points past the last element of a
561
563
corresponding sequence.
562
- Such a value is called a \defnadj {past-the-end}{value}.
563
- Values of an iterator
564
- \tcode {i}
565
- for which the expression
566
- \tcode {*i}
567
- is defined are called
568
- \defn {dereferenceable}.
564
+ Such a value is called a \defnx {past-the-end value}{iterator!past-the-end}.
565
+ Values of an iterator \tcode {i}
566
+ for which the expression \tcode {*i} is defined
567
+ are called \defnx {dereferenceable}{iterator!dereferenceable}.
569
568
The library never assumes that past-the-end values are dereferenceable.
570
569
Iterators can also have singular values that are not associated with any
571
570
sequence.
572
571
\begin {example }
573
- After the declaration of an uninitialized pointer
574
- \tcode {x}
575
- (as with
576
- \tcode {int* x;}),
577
- \tcode {x}
578
- must always be assumed to have a singular value of a pointer.
572
+ After the declaration of an uninitialized pointer \tcode {x}
573
+ (as with \tcode {int* x;}),
574
+ \tcode {x} must always be assumed to have a singular value of a pointer.
579
575
\end {example }
580
576
Results of most expressions are undefined for singular values;
581
577
the only exceptions are destroying an iterator that holds a singular value,
You can’t perform that action at this time.
0 commit comments