.\" ident @(#)Output_Iterators.3 .\" Standard Template Library .\" $$RW_INSERT_HEADER "slyrs.man" .TH Output_Iterators 3C++ "02 Apr 1998" "Rogue Wave Software" "-" .ce2 Standard C++ Library Copyright 1998, Rogue Wave Software, Inc. .SH NAME \f2Output_Iterators\fP \ - A write-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. Output iterators are write-only, forward moving iterators that satisfy the requirements listed below. Note that unlike other iterators used with the standard library, output iterators cannot be constant. .SH KEY TO ITERATOR REQUIREMENTS The following key pertains to the iterator requirements listed below: .HP 10 \f2a and b \fPvalues of type \f2X\fP .HP 0 .HP 4 \f2n \fPvalue of \f2distance\fP type .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 OUTPUT ITERATORS The following expressions must be valid for output iterators: .HP 7 \f2X(a) \fPcopy constructor, \f2a == X(a)\fP .HP 0 .HP 9 \f2X u(a) \fPcopy constructor, \f2u == a\fP .HP 0 .HP 10 \f2X u = a \fPassignment, \f2u == a\fP .HP 0 .HP 9 \f2*a = t \fPresult is not used .HP 0 .HP 6 \f2++r \fPreturns \f2X&\fP .HP 0 .HP 6 \f2r++ \fPreturn value convertible to const \f2X&\fP .HP 0 .HP 11 \f2*r++ = t \fPresult is not used .HP 0 The only valid use for the \f2operator *\fP is on the left-hand side of the assignment statement. Algorithms using output iterators should be single pass algorithms. That is, they should not pass through the same iterator twice. .SH SEE ALSO Iterators, Input_Iterators