.\" ident @(#)Input_Iterators.3 .\" Standard Template Library .\" $$RW_INSERT_HEADER "slyrs.man" .TH Input_Iterators 3C++ "02 Apr 1998" "Rogue Wave Software" "-" .ce2 Standard C++ Library Copyright 1998, Rogue Wave Software, Inc. .SH NAME \f2Input_Iterators\fP \ - A read-only, forward moving iterator. .SH DESCRIPTION .B NOTE: .RS 3 For a complete discussion of iterators, see the Iterators section of this reference. .RE Iterators are a generalization of pointers that allow a C++ program to uniformly interact with different data structures. Input iterators are read-only, forward moving iterators that satisfy the requirements listed below. .SH KEY TO ITERATOR REQUIREMENTS The following key pertains to the iterator requirement descriptions listed below: .HP 10 \f2a and b \fPvalues of type \f2X\fP .HP 0 .HP 4 \f2n \fPvalue representing a \f2distance\fP between two iterators .HP 0 .HP 25 \f2u, Distance, tmp and m \fPidentifiers .HP 0 .HP 4 \f2r \fPvalue of type \f2X&\fP .HP 0 .HP 4 \f2t \fPvalue of type \f2T\fP .HP 0 .SH REQUIREMENTS FOR INPUT ITERATORS The following expressions must be valid for input iterators: .HP 9 \f2X u(a) \fPcopy constructor, \f2u == a\fP .HP 0 .HP 10 \f2X u = a \fPassignment, \f2u == a\fP .HP 0 .HP 17 \f2a == b, a != b \fPreturn value convertible to \f2bool\fP .HP 0 .HP 5 \f2*a a == b\fP implies \f2*a == *b\fP .HP 0 .HP 6 \f2++r \fPreturns \f2X&\fP .HP 0 .HP 6 \f2r++ \fPreturn value convertible to const \f2X&\fP .HP 0 .HP 7 \f2*r++ \fPreturns type \f2T\fP .HP 0 .HP 9 \f2a -> m \fPreturns \f2(*a).m\fP .HP 0 For input iterators, \f2a == b\fP does not imply that\f2 ++a == ++b\fP. Algorithms using input iterators should be single pass algorithms. That is, they should not pass through the same iterator twice. The value of type \f2T\fP does not have to be an \f2lvalue\fP. .SH SEE ALSO Iterators, Output_Iterators