Random_Access_Iterators man page on SunOS

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
SunOS logo
[printable version]

Random_Access_Iterators(3C++)	       -	 Random_Access_Iterators(3C++)

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

NAME
       Random_Access_Iterators

	-  An  iterator that reads, writes, and allows random access to a con‐
       tainer.

DESCRIPTION
       NOTE:
	  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. Random access itera‐
       tors  can  read,	 write, and allow random access to the containers they
       serve. These iterators satisfy the requirements listed below.

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 RANDOM ACCESS ITERATORS
       The following expressions must be valid for random access iterators:

       X u   u might have a singular value

       X()   X() might be singular

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

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

       X u = a	 assignment, u == a

       a == b, a != b	return value convertible to bool

       r = a   assignment, r == a

       *a   return value convertible to T&

       a->m   equivalent to (*a).m

       ++r   returns X&

       r++   return value convertible to const X&

       *r++   returns T&

       --r   returns X&

       r--   return value convertible to const X&

       *r--   returns T&

       r += n	Semantics of --r or ++r n times depending on the sign of n

       a + n, n + a   returns type X

       r -= n	returns X&, behaves as r += -n

       a - n   returns type X

       b - a   returns distance

       a[n]   *(a+n), return value convertible to T

       a < b   total ordering relation

       a > b   total ordering relation opposite to <

       a <= b	!(a < b)

       a >= b	!(a > b)

       Like forward iterators, random access iterators have the condition that
       a == b implies *a == *b.

       There are no restrictions on the number of passes an algorithm may make
       through the structure.

       All relational operators return a value convertible to bool.

SEE ALSO
       Iterators, Forward_Iterators, Bidirectional_Iterators

Rogue Wave Software		  02 Apr 1998	 Random_Access_Iterators(3C++)
[top]

List of man pages available for SunOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net