stl_iterator_base_funcs.h File Reference


Detailed Description

This is an internal header file, included by other library headers. You should not attempt to use it directly.

This file contains all of the general iterator-related utility functions, such as distance() and advance().

Definition in file stl_iterator_base_funcs.h.

Go to the source code of this file.

Namespaces

Defines

Functions


Function Documentation

void advance _InputIterator &  __i,
_Distance  __n
[inline]
 

A generalization of pointer arithmetic.

Parameters:
i An input iterator.
n The "delta" by which to change i.
Returns:
Nothing.
This increments i by n. For bidirectional and random access iterators, n may be negative, in which case i is decremented.

For random access iterators, this uses their + and - operations and are constant time. For other iterator classes they are linear time.

Definition at line 172 of file stl_iterator_base_funcs.h.

Referenced by std::equal_range(), std::lower_bound(), and std::upper_bound().

iterator_traits<_InputIterator>::difference_type distance _InputIterator  __first,
_InputIterator  __last
[inline]
 

A generalization of pointer arithmetic.

Parameters:
first An input iterator.
last An input iterator.
Returns:
The distance between them.
Returns n such that first + n == last. This requires that last must be reachable from first. Note that n may be negative.

For random access iterators, this uses their + and - operations and are constant time. For other iterator classes they are linear time.

Definition at line 114 of file stl_iterator_base_funcs.h.

Referenced by std::equal_range(), std::inplace_merge(), std::lower_bound(), __gnu_cxx::random_sample_n(), list::size(), and std::upper_bound().


Generated on Sat Apr 2 13:54:44 2005 for libstdc++ source by  doxygen 1.4.0