GNU g++  v5.2.1
GNU Standard C++
stl_iterator_base_funcs.h File Reference

This is an internal header file, included by other library headers. More...

#include <bits/concept_check.h>
#include <debug/debug.h>
Include dependency graph for stl_iterator_base_funcs.h:
This graph shows which files directly or indirectly include this file:

Functions

namespace std _GLIBCXX_VISIBILITY (default)
 

Detailed Description

This is an internal header file, included by other library headers.

Do not attempt to use it directly. {iterator}

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

Function Documentation

namespace std _GLIBCXX_VISIBILITY ( default  )

A generalization of pointer arithmetic.

Parameters
__firstAn input iterator.
__lastAn 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.

A generalization of pointer arithmetic.

Parameters
__iAn input iterator.
__nThe 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.

References __glibcxx_function_requires, and _GLIBCXX_DEBUG_ASSERT.