Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home

HP C++ User Documentation

 

output_iterators (3C++std) - Tru64 UNIX

Standard C++ Library
Copyright 1996, Rogue Wave Software, Inc.

NAME

  Output_Iterators  - A write-only, forward moving iterator.

DESCRIPTION

  For a complete discussion of iterators, see the Iterators section of this
  reference.

  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.

KEY TO ITERATOR REQUIREMENTS

  The following key pertains to the iterator requirements listed below:

  a and b   values of type X

  n   value of distance type

  u, Distance, tmp and m   identifiers

  r   value of type X&

  t   value of type T

REQUIREMENTS FOR OUTPUT ITERATORS

  The following expressions must be valid for output iterators:

  X(a)   copy constructor, a == X(a).

  X u(a)   copy constructor, u == a

  X u = a   assignment, u == a

  *a = t   result is not used

  ++r   returns X&

  r++   return value convertible to const X&

  *r++ = t   result is not used

  The only valid use for the operator * 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.

SEE ALSO

  Iterators, Input Iterators

STANDARDS CONFORMANCE

  ANSI X3J16/ISO WG21 Joint C++ Committee
About PDF files: The PDF files on this site can be read online or printed using Adobe® Acrobat® Reader. If you do not have this software on your system, you may download it from Adobe's website.
Privacy statement Using this site means you accept its terms C++ support
© 2008 Hewlett-Packard Development Company, L.P.