std::iterator< _Category, _Tp, _Distance, _Pointer, _Reference >

Section: C Library Functions (3)
Updated: Wed Apr 17 2019
Page Index
 

NAME

std::iterator< _Category, _Tp, _Distance, _Pointer, _Reference > - Common iterator class.

 

SYNOPSIS


 

Public Types


typedef _Distance difference_type
Distance between iterators is represented as this type.
typedef _Category iterator_category
One of the tag types.
typedef _Pointer pointer
This type represents a pointer-to-value_type.
typedef _Reference reference
This type represents a reference-to-value_type.
typedef _Tp value_type
The type 'pointed to' by the iterator.  

Detailed Description

 

template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, typename _Pointer = _Tp*, typename _Reference = _Tp&>


struct std::iterator< _Category, _Tp, _Distance, _Pointer, _Reference >" Common iterator class.

This class does nothing but define nested typedefs. Iterator classes can inherit from this class to save some work. The typedefs are then used in specializations and overloading.

In particular, there are no default implementations of requirements such as operator++ and the like. (How could there be?)

Definition at line 118 of file stl_iterator_base_types.h.  

Member Typedef Documentation

 

template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, typename _Pointer = _Tp*, typename _Reference = _Tp&> typedef _Distance std::iterator< _Category, _Tp, _Distance, _Pointer, _Reference >::difference_type

Distance between iterators is represented as this type.

Definition at line 125 of file stl_iterator_base_types.h.  

template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, typename _Pointer = _Tp*, typename _Reference = _Tp&> typedef _Category std::iterator< _Category, _Tp, _Distance, _Pointer, _Reference >::iterator_category

One of the tag types.

Definition at line 121 of file stl_iterator_base_types.h.  

template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, typename _Pointer = _Tp*, typename _Reference = _Tp&> typedef _Pointer std::iterator< _Category, _Tp, _Distance, _Pointer, _Reference >::pointer

This type represents a pointer-to-value_type.

Definition at line 127 of file stl_iterator_base_types.h.  

template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, typename _Pointer = _Tp*, typename _Reference = _Tp&> typedef _Reference std::iterator< _Category, _Tp, _Distance, _Pointer, _Reference >::reference

This type represents a reference-to-value_type.

Definition at line 129 of file stl_iterator_base_types.h.  

template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, typename _Pointer = _Tp*, typename _Reference = _Tp&> typedef _Tp std::iterator< _Category, _Tp, _Distance, _Pointer, _Reference >::value_type

The type 'pointed to' by the iterator.

Definition at line 123 of file stl_iterator_base_types.h.

 

Author

Generated automatically by Doxygen for libstdc++ from the source code.


 

Index

NAME
SYNOPSIS
Public Types
Detailed Description
template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, typename _Pointer = _Tp*, typename _Reference = _Tp&>
Member Typedef Documentation
template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, typename _Pointer = _Tp*, typename _Reference = _Tp&> typedef _Distance std::iterator< _Category, _Tp, _Distance, _Pointer, _Reference >::difference_type
template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, typename _Pointer = _Tp*, typename _Reference = _Tp&> typedef _Category std::iterator< _Category, _Tp, _Distance, _Pointer, _Reference >::iterator_category
template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, typename _Pointer = _Tp*, typename _Reference = _Tp&> typedef _Pointer std::iterator< _Category, _Tp, _Distance, _Pointer, _Reference >::pointer
template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, typename _Pointer = _Tp*, typename _Reference = _Tp&> typedef _Reference std::iterator< _Category, _Tp, _Distance, _Pointer, _Reference >::reference
template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, typename _Pointer = _Tp*, typename _Reference = _Tp&> typedef _Tp std::iterator< _Category, _Tp, _Distance, _Pointer, _Reference >::value_type
Author