libstdc++: stl_iterator.h File Reference

libstdc++

stl_iterator.h File Reference

Go to the source code of this file.

## Classes
class | std::back_insert_iterator< _Container >
class | std::common_iterator< _It, _Sent >
class | std::counted_iterator< _It >
class | std::front_insert_iterator< _Container >
class | std::insert_iterator< _Container >
class | std::move_iterator< _Iterator >
class | std::move_sentinel< _Sent >
class | std::reverse_iterator< _Iterator >

## Namespaces
namespace | __gnu_cxx
namespace | __gnu_debug
namespace | std
namespace | std::__detail

## Macros
#define | _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(_Iter)
#define | _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter)

## Typedefs
template<indirectly_readable _It>
using | std::__detail::__iter_const_rvalue_reference_t
template<typename _InputIterator>
using | std::__iter_key_t
template<typename _InputIterator>
using | std::__iter_to_alloc_t
template<typename _InputIterator>
using | std::__iter_val_t
template<input_iterator _It>
using | std::const_iterator
template<semiregular _Sent>
using | std::const_sentinel
template<indirectly_readable _It>
using | std::iter_const_reference_t

## Functions
template<typename _Iterator, typename _ReturnType = __conditional_t<__move_if_noexcept_cond <typename iterator_traits<_Iterator>::value_type>::value, _Iterator, move_iterator<_Iterator>>>
constexpr _ReturnType | std::__make_move_if_noexcept_iterator (_Iterator __i)
template<typename _Tp, typename _ReturnType = __conditional_t<__move_if_noexcept_cond<_Tp>::value, const _Tp*, move_iterator<_Tp*>>>
constexpr _ReturnType | std::__make_move_if_noexcept_iterator (_Tp *__i)
template<typename _Iterator>
constexpr reverse_iterator< _Iterator > | std::__make_reverse_iterator (_Iterator __i)
template<typename _Container>
constexpr back_insert_iterator< _Container > | std::back_inserter (_Container &__x)
template<typename _Container>
constexpr front_insert_iterator< _Container > | std::front_inserter (_Container &__x)
template<typename _Container>
constexpr insert_iterator< _Container > | std::inserter (_Container &__x, std::__detail::__range_iter_t< _Container > __i)
template<input_iterator _It>
constexpr const_iterator< _It > | std::make_const_iterator (_It __it) noexcept(is_nothrow_convertible_v< _It, const_iterator< _It > >)
template<semiregular _Sent>
constexpr const_sentinel< _Sent > | std::make_const_sentinel (_Sent __s) noexcept(is_nothrow_convertible_v< _Sent, const_sentinel< _Sent > >)
template<typename _Iterator>
constexpr move_iterator< _Iterator > | std::make_move_iterator (_Iterator __i)
template<typename _Iterator>
constexpr reverse_iterator< _Iterator > | std::make_reverse_iterator (_Iterator __i)
template<typename _IteratorL, typename _IteratorR> requires requires { { __x.base() != __y.base() } -> convertible_to<bool>; }
constexpr bool | std::operator!= (const reverse_iterator< _IteratorL > &__x, const reverse_iterator< _IteratorR > &__y)
template<typename _Iterator> requires requires { { __x.base() + __n } -> same_as<_Iterator>; }
constexpr move_iterator< _Iterator > | std::operator+ (typename move_iterator< _Iterator >::difference_type __n, const move_iterator< _Iterator > &__x)
template<typename _Iterator>
constexpr reverse_iterator< _Iterator > | std::operator+ (typename reverse_iterator< _Iterator >::difference_type __n, const reverse_iterator< _Iterator > &__x)
template<typename _IteratorL, typename _IteratorR>
constexpr auto | std::operator- (const move_iterator< _IteratorL > &__x, const move_iterator< _IteratorR > &__y) -> decltype(__x.base() - __y.base())
template<typename _IteratorL, typename _IteratorR>
constexpr auto | std::operator- (const reverse_iterator< _IteratorL > &__x, const reverse_iterator< _IteratorR > &__y) -> decltype(__y.base() - __x.base())
template<typename _IteratorL, typename _IteratorR> requires requires { { __x.base() < __y.base() } -> convertible_to<bool>; }
constexpr bool | std::operator< (const move_iterator< _IteratorL > &__x, const move_iterator< _IteratorR > &__y)
template<typename _IteratorL, typename _IteratorR> requires requires { { __x.base() > __y.base() } -> convertible_to<bool>; }
constexpr bool | std::operator< (const reverse_iterator< _IteratorL > &__x, const reverse_iterator< _IteratorR > &__y)
template<typename _IteratorL, typename _IteratorR> requires requires { { __y.base() < __x.base() } -> convertible_to<bool>; }
constexpr bool | std::operator<= (const move_iterator< _IteratorL > &__x, const move_iterator< _IteratorR > &__y)
template<typename _IteratorL, typename _IteratorR> requires requires { { __x.base() >= __y.base() } -> convertible_to<bool>; }
constexpr bool | std::operator<= (const reverse_iterator< _IteratorL > &__x, const reverse_iterator< _IteratorR > &__y)
template<three_way_comparable _Iterator>
constexpr compare_three_way_result_t< _Iterator > | std::operator<=> (const move_iterator< _Iterator > &__x, const move_iterator< _Iterator > &__y)
template<typename _IteratorL, three_way_comparable_with< _IteratorL > _IteratorR>
constexpr compare_three_way_result_t< _IteratorL, _IteratorR > | std::operator<=> (const move_iterator< _IteratorL > &__x, const move_iterator< _IteratorR > &__y)
template<three_way_comparable _Iterator>
constexpr compare_three_way_result_t< _Iterator, _Iterator > | std::operator<=> (const reverse_iterator< _Iterator > &__x, const reverse_iterator< _Iterator > &__y)
template<typename _IteratorL, three_way_comparable_with< _IteratorL > _IteratorR>
constexpr compare_three_way_result_t< _IteratorL, _IteratorR > | std::operator<=> (const reverse_iterator< _IteratorL > &__x, const reverse_iterator< _IteratorR > &__y)
template<typename _Iterator>
constexpr bool | std::operator== (const move_iterator< _Iterator > &__x, const move_iterator< _Iterator > &__y)
template<typename _IteratorL, typename _IteratorR> requires requires { { __x.base() == __y.base() } -> convertible_to<bool>; }
constexpr bool | std::operator== (const move_iterator< _IteratorL > &__x, const move_iterator< _IteratorR > &__y)
template<typename _Iterator> requires requires { { __x.base() == __y.base() } -> convertible_to<bool>; }
constexpr bool | std::operator== (const reverse_iterator< _Iterator > &__x, const reverse_iterator< _Iterator > &__y)
template<typename _IteratorL, typename _IteratorR> requires requires { { __x.base() == __y.base() } -> convertible_to<bool>; }
constexpr bool | std::operator== (const reverse_iterator< _IteratorL > &__x, const reverse_iterator< _IteratorR > &__y)
template<typename _IteratorL, typename _IteratorR> requires requires { { __y.base() < __x.base() } -> convertible_to<bool>; }
constexpr bool | std::operator> (const move_iterator< _IteratorL > &__x, const move_iterator< _IteratorR > &__y)
template<typename _IteratorL, typename _IteratorR> requires requires { { __x.base() < __y.base() } -> convertible_to<bool>; }
constexpr bool | std::operator> (const reverse_iterator< _IteratorL > &__x, const reverse_iterator< _IteratorR > &__y)
template<typename _IteratorL, typename _IteratorR> requires requires { { __x.base() < __y.base() } -> convertible_to<bool>; }
constexpr bool | std::operator>= (const move_iterator< _IteratorL > &__x, const move_iterator< _IteratorR > &__y)
template<typename _IteratorL, typename _IteratorR> requires requires { { __x.base() <= __y.base() } -> convertible_to<bool>; }
constexpr bool | std::operator>= (const reverse_iterator< _IteratorL > &__x, const reverse_iterator< _IteratorR > &__y)

## Variables
template<typename _Tp>
constexpr bool | std::__detail::__is_const_iterator
template<typename _It>
constexpr bool | std::__detail::__is_const_iterator< basic_const_iterator< _It > >
template<typename _Iterator1, typename _Iterator2>
constexpr bool | std::disable_sized_sentinel_for< move_iterator< _Iterator1 >, move_iterator< _Iterator2 > >
template<typename _Iterator1, typename _Iterator2>
constexpr bool | std::disable_sized_sentinel_for< reverse_iterator< _Iterator1 >, reverse_iterator< _Iterator2 > >

## Detailed Description

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <iterator>.

This file implements reverse_iterator, back_insert_iterator, front_insert_iterator, insert_iterator, __normal_iterator, and their supporting functions and overloaded operators.

Definition in file bits/stl_iterator.h.