libstdc++
bits/stl_iterator.h File Reference

Go to the source code of this file.

Classes

class  std::back_insert_iterator< _Container >
 
class  std::counted_iterator< _It >
 
class  std::front_insert_iterator< _Container >
 
class  std::insert_iterator< _Container >
 
class  std::move_iterator< _Iterator >
 
class  std::reverse_iterator< _Iterator >
 

Namespaces

 __gnu_cxx
 
 std
 
 std::__detail
 

Macros

#define __cpp_lib_array_constexpr
 
#define __cpp_lib_constexpr_iterator
 
#define __cpp_lib_make_reverse_iterator
 
#define _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(_Iter)
 
#define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter)
 

Typedefs

template<typename _Cat , typename _Limit , typename _Otherwise = _Cat>
using std::__detail::__clamp_iter_cat = __conditional_t< derived_from< _Cat, _Limit >, _Limit, _Otherwise >
 
template<typename _InputIterator >
using std::__iter_key_t = remove_const_t< typename iterator_traits< _InputIterator >::value_type::first_type >
 
template<typename _InputIterator >
using std::__iter_to_alloc_t = pair< add_const_t< __iter_key_t< _InputIterator > >, __iter_val_t< _InputIterator > >
 
template<typename _InputIterator >
using std::__iter_val_t = typename iterator_traits< _InputIterator >::value_type::second_type
 

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 _Iterator >
constexpr auto std::__miter_base (move_iterator< _Iterator > __it) -> decltype(__miter_base(__it.base()))
 
template<typename _Iterator >
constexpr auto std::__miter_base (reverse_iterator< _Iterator > __it) -> decltype(__make_reverse_iterator(__miter_base(__it.base())))
 
template<typename _Iterator , typename _Container >
constexpr _Iterator std::__niter_base (__gnu_cxx::__normal_iterator< _Iterator, _Container > __it) noexcept(/*conditional */)
 
template<typename _Iterator >
constexpr auto std::__niter_base (move_iterator< _Iterator > __it) -> decltype(make_move_iterator(__niter_base(__it.base())))
 
template<typename _Iterator >
constexpr auto std::__niter_base (reverse_iterator< _Iterator > __it) -> decltype(__make_reverse_iterator(__niter_base(__it.base())))
 
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<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 _Iterator , typename _Container >
constexpr bool __gnu_cxx::operator!= (const __normal_iterator< _Iterator, _Container > &__lhs, const __normal_iterator< _Iterator, _Container > &__rhs) noexcept
 
template<typename _IteratorL , typename _IteratorR , typename _Container >
constexpr bool __gnu_cxx::operator!= (const __normal_iterator< _IteratorL, _Container > &__lhs, const __normal_iterator< _IteratorR, _Container > &__rhs) noexcept
 
template<typename _Iterator >
constexpr bool std::operator!= (const move_iterator< _Iterator > &__x, const move_iterator< _Iterator > &__y)
 
template<typename _IteratorL , typename _IteratorR >
constexpr bool std::operator!= (const move_iterator< _IteratorL > &__x, const move_iterator< _IteratorR > &__y)
 
template<typename _IteratorL , typename _IteratorR >
constexpr bool std::operator!= (const reverse_iterator< _IteratorL > &__x, const reverse_iterator< _IteratorR > &__y) requires requires
 
template<typename _Iterator , typename _Container >
constexpr __normal_iterator< _Iterator, _Container > __gnu_cxx::operator+ (typename __normal_iterator< _Iterator, _Container >::difference_type __n, const __normal_iterator< _Iterator, _Container > &__i) noexcept
 
template<typename _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 _Iterator , typename _Container >
constexpr __normal_iterator< _Iterator, _Container >::difference_type __gnu_cxx::operator- (const __normal_iterator< _Iterator, _Container > &__lhs, const __normal_iterator< _Iterator, _Container > &__rhs) noexcept
 
template<typename _IteratorL , typename _IteratorR , typename _Container >
constexpr auto __gnu_cxx::operator- (const __normal_iterator< _IteratorL, _Container > &__lhs, const __normal_iterator< _IteratorR, _Container > &__rhs) noexcept -> decltype(__lhs.base() - __rhs.base())
 
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 _Iterator , typename _Container >
constexpr bool __gnu_cxx::operator< (const __normal_iterator< _Iterator, _Container > &__lhs, const __normal_iterator< _Iterator, _Container > &__rhs) noexcept
 
template<typename _IteratorL , typename _IteratorR , typename _Container >
bool __gnu_cxx::operator< (const __normal_iterator< _IteratorL, _Container > &__lhs, const __normal_iterator< _IteratorR, _Container > &__rhs) noexcept
 
template<typename _Iterator >
constexpr bool std::operator< (const move_iterator< _Iterator > &__x, const move_iterator< _Iterator > &__y)
 
template<typename _IteratorL , typename _IteratorR >
constexpr bool std::operator< (const move_iterator< _IteratorL > &__x, const move_iterator< _IteratorR > &__y) requires requires
 
template<typename _IteratorL , typename _IteratorR >
constexpr bool std::operator< (const reverse_iterator< _IteratorL > &__x, const reverse_iterator< _IteratorR > &__y) requires requires
 
template<typename _Iterator , typename _Container >
constexpr bool __gnu_cxx::operator<= (const __normal_iterator< _Iterator, _Container > &__lhs, const __normal_iterator< _Iterator, _Container > &__rhs) noexcept
 
template<typename _IteratorL , typename _IteratorR , typename _Container >
bool __gnu_cxx::operator<= (const __normal_iterator< _IteratorL, _Container > &__lhs, const __normal_iterator< _IteratorR, _Container > &__rhs) noexcept
 
template<typename _Iterator >
constexpr bool std::operator<= (const move_iterator< _Iterator > &__x, const move_iterator< _Iterator > &__y)
 
template<typename _IteratorL , typename _IteratorR >
constexpr bool std::operator<= (const move_iterator< _IteratorL > &__x, const move_iterator< _IteratorR > &__y) requires requires
 
template<typename _IteratorL , typename _IteratorR >
constexpr bool std::operator<= (const reverse_iterator< _IteratorL > &__x, const reverse_iterator< _IteratorR > &__y) requires requires
 
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 , typename _Container >
constexpr bool __gnu_cxx::operator== (const __normal_iterator< _Iterator, _Container > &__lhs, const __normal_iterator< _Iterator, _Container > &__rhs) noexcept
 
template<typename _IteratorL , typename _IteratorR , typename _Container >
constexpr bool __gnu_cxx::operator== (const __normal_iterator< _IteratorL, _Container > &__lhs, const __normal_iterator< _IteratorR, _Container > &__rhs) noexcept
 
template<typename _Iterator >
constexpr bool std::operator== (const move_iterator< _Iterator > &__x, const move_iterator< _Iterator > &__y)
 
template<typename _IteratorL , typename _IteratorR >
constexpr bool std::operator== (const move_iterator< _IteratorL > &__x, const move_iterator< _IteratorR > &__y) requires requires
 
template<typename _Iterator >
constexpr bool std::operator== (const reverse_iterator< _Iterator > &__x, const reverse_iterator< _Iterator > &__y) requires requires
 
template<typename _IteratorL , typename _IteratorR >
constexpr bool std::operator== (const reverse_iterator< _IteratorL > &__x, const reverse_iterator< _IteratorR > &__y) requires requires
 
template<typename _Iterator , typename _Container >
constexpr bool __gnu_cxx::operator> (const __normal_iterator< _Iterator, _Container > &__lhs, const __normal_iterator< _Iterator, _Container > &__rhs) noexcept
 
template<typename _IteratorL , typename _IteratorR , typename _Container >
bool __gnu_cxx::operator> (const __normal_iterator< _IteratorL, _Container > &__lhs, const __normal_iterator< _IteratorR, _Container > &__rhs) noexcept
 
template<typename _Iterator >
constexpr bool std::operator> (const move_iterator< _Iterator > &__x, const move_iterator< _Iterator > &__y)
 
template<typename _IteratorL , typename _IteratorR >
constexpr bool std::operator> (const move_iterator< _IteratorL > &__x, const move_iterator< _IteratorR > &__y) requires requires
 
template<typename _IteratorL , typename _IteratorR >
constexpr bool std::operator> (const reverse_iterator< _IteratorL > &__x, const reverse_iterator< _IteratorR > &__y) requires requires
 
template<typename _Iterator , typename _Container >
constexpr bool __gnu_cxx::operator>= (const __normal_iterator< _Iterator, _Container > &__lhs, const __normal_iterator< _Iterator, _Container > &__rhs) noexcept
 
template<typename _IteratorL , typename _IteratorR , typename _Container >
bool __gnu_cxx::operator>= (const __normal_iterator< _IteratorL, _Container > &__lhs, const __normal_iterator< _IteratorR, _Container > &__rhs) noexcept
 
template<typename _Iterator >
constexpr bool std::operator>= (const move_iterator< _Iterator > &__x, const move_iterator< _Iterator > &__y)
 
template<typename _IteratorL , typename _IteratorR >
constexpr bool std::operator>= (const move_iterator< _IteratorL > &__x, const move_iterator< _IteratorR > &__y) requires requires
 
template<typename _IteratorL , typename _IteratorR >
constexpr bool std::operator>= (const reverse_iterator< _IteratorL > &__x, const reverse_iterator< _IteratorR > &__y) requires requires
 
template<input_or_output_iterator _It, sentinel_for< _It > _Sent>
 std::requires (!same_as< _It, _Sent >) &&copyable< _It > class common_iterator
 
template<typename _Iterator1 , typename _Iterator2 >
 std::requires (!sized_sentinel_for< _Iterator1, _Iterator2 >) inline const expr bool disable_sized_sentinel_for< reverse_iterator< _Iterator1 >
 

Variables

template<typename _It >
concept std::__detail::__common_iter_has_arrow
 
template<typename _It >
concept std::__detail::__common_iter_use_postfix_proxy
 
 std::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.