libstdc++
Iterators
Collaboration diagram for Iterators:

Modules

Classes

Functions


Detailed Description

Abstractions for uniform iterating through various underlying types.


Function Documentation

template<typename _Iter >
iterator_traits<_Iter>::iterator_category std::__iterator_category ( const _Iter &  ) [inline]
template<typename _Container >
back_insert_iterator<_Container> std::back_inserter ( _Container &  __x) [inline]
Parameters:
__xA container of arbitrary type.
Returns:
An instance of back_insert_iterator working on __x.

This wrapper function helps in creating back_insert_iterator instances. Typing the name of the iterator requires knowing the precise full type of the container, which can be tedious and impedes generic programming. Using this function lets you take advantage of automatic template parameter deduction, making the compiler match the correct types for you.

Definition at line 481 of file stl_iterator.h.

Referenced by std::match_results< _FwdIterT, _Alloc >::format(), and std::regex_replace().

template<typename _Container >
front_insert_iterator<_Container> std::front_inserter ( _Container &  __x) [inline]
Parameters:
__xA container of arbitrary type.
Returns:
An instance of front_insert_iterator working on x.

This wrapper function helps in creating front_insert_iterator instances. Typing the name of the iterator requires knowing the precise full type of the container, which can be tedious and impedes generic programming. Using this function lets you take advantage of automatic template parameter deduction, making the compiler match the correct types for you.

Definition at line 571 of file stl_iterator.h.

template<typename _Container , typename _Iterator >
insert_iterator<_Container> std::inserter ( _Container &  __x,
_Iterator  __i 
) [inline]
Parameters:
__xA container of arbitrary type.
Returns:
An instance of insert_iterator working on __x.

This wrapper function helps in creating insert_iterator instances. Typing the name of the iterator requires knowing the precise full type of the container, which can be tedious and impedes generic programming. Using this function lets you take advantage of automatic template parameter deduction, making the compiler match the correct types for you.

Definition at line 685 of file stl_iterator.h.

template<class _Tp , class _CharT , class _Traits , class _Dist >
bool std::operator!= ( const istream_iterator< _Tp, _CharT, _Traits, _Dist > &  __x,
const istream_iterator< _Tp, _CharT, _Traits, _Dist > &  __y 
) [inline]

Return false if x and y are both end or not end, or x and y are the same.

Definition at line 137 of file stream_iterator.h.

template<typename _Tp , typename _CharT , typename _Traits , typename _Dist >
bool std::operator== ( const istream_iterator< _Tp, _CharT, _Traits, _Dist > &  __x,
const istream_iterator< _Tp, _CharT, _Traits, _Dist > &  __y 
) [inline]

Return true if x and y are both end or not end, or x and y are the same.

Definition at line 130 of file stream_iterator.h.

template<typename _Iterator >
bool std::operator== ( const reverse_iterator< _Iterator > &  __x,
const reverse_iterator< _Iterator > &  __y 
) [inline]
Parameters:
__xA reverse_iterator.
__yA reverse_iterator.
Returns:
A simple bool.

Reverse iterators forward many operations to their underlying base() iterators. Others are implemented in terms of one another.

Definition at line 293 of file stl_iterator.h.

References std::reverse_iterator< _Iterator >::base().