libstdc++
std::move_iterator< _Iterator > Class Template Reference

#include <stl_iterator.h>

Public Types

typedef __traits_type::difference_type difference_type
 
typedef __traits_type::iterator_category iterator_category
 
using iterator_type = _Iterator
 
typedef _Iterator pointer
 
typedef conditional< is_reference< __base_ref >::value, typenameremove_reference< __base_ref >::type &&, __base_ref >::type reference
 
typedef __traits_type::value_type value_type
 

Public Member Functions

template<typename _Iter >
constexpr move_iterator (const move_iterator< _Iter > &__i)
 
constexpr move_iterator (iterator_type __i)
 
constexpr iterator_type base () const
 
constexpr reference operator* () const
 
constexpr move_iterator operator+ (difference_type __n) const
 
constexpr move_iteratoroperator++ ()
 
constexpr move_iterator operator++ (int)
 
constexpr move_iteratoroperator+= (difference_type __n)
 
constexpr move_iterator operator- (difference_type __n) const
 
constexpr move_iteratoroperator-- ()
 
constexpr move_iterator operator-- (int)
 
constexpr move_iteratoroperator-= (difference_type __n)
 
constexpr pointer operator-> () const
 
template<typename _Iter >
constexpr move_iteratoroperator= (const move_iterator< _Iter > &__i)
 
constexpr reference operator[] (difference_type __n) const
 

Detailed Description

template<typename _Iterator>
class std::move_iterator< _Iterator >

Class template move_iterator is an iterator adapter with the same behavior as the underlying iterator except that its dereference operator implicitly converts the value returned by the underlying iterator's dereference operator to an rvalue reference. Some generic algorithms can be called with move iterators to replace copying with moving.

Definition at line 1370 of file bits/stl_iterator.h.

Member Typedef Documentation

◆ difference_type

template<typename _Iterator >
typedef __traits_type::difference_type std::move_iterator< _Iterator >::difference_type

Definition at line 1406 of file bits/stl_iterator.h.

◆ iterator_category

template<typename _Iterator >
typedef __traits_type::iterator_category std::move_iterator< _Iterator >::iterator_category

Definition at line 1404 of file bits/stl_iterator.h.

◆ iterator_type

template<typename _Iterator >
using std::move_iterator< _Iterator >::iterator_type = _Iterator

Definition at line 1394 of file bits/stl_iterator.h.

◆ pointer

template<typename _Iterator >
typedef _Iterator std::move_iterator< _Iterator >::pointer

Definition at line 1408 of file bits/stl_iterator.h.

◆ reference

template<typename _Iterator >
typedef conditional<is_reference<__base_ref>::value,typenameremove_reference<__base_ref>::type&&,__base_ref>::type std::move_iterator< _Iterator >::reference

Definition at line 1413 of file bits/stl_iterator.h.

◆ value_type

template<typename _Iterator >
typedef __traits_type::value_type std::move_iterator< _Iterator >::value_type

Definition at line 1405 of file bits/stl_iterator.h.

Constructor & Destructor Documentation

◆ move_iterator() [1/3]

template<typename _Iterator >
constexpr std::move_iterator< _Iterator >::move_iterator ( )
inlineconstexpr

Definition at line 1417 of file bits/stl_iterator.h.

◆ move_iterator() [2/3]

template<typename _Iterator >
constexpr std::move_iterator< _Iterator >::move_iterator ( iterator_type  __i)
inlineexplicitconstexpr

Definition at line 1421 of file bits/stl_iterator.h.

◆ move_iterator() [3/3]

template<typename _Iterator >
template<typename _Iter >
constexpr std::move_iterator< _Iterator >::move_iterator ( const move_iterator< _Iter > &  __i)
inlineconstexpr

Definition at line 1429 of file bits/stl_iterator.h.

Member Function Documentation

◆ base()

template<typename _Iterator >
constexpr iterator_type std::move_iterator< _Iterator >::base ( ) const
inlineconstexpr

Definition at line 1446 of file bits/stl_iterator.h.

◆ operator*()

template<typename _Iterator >
constexpr reference std::move_iterator< _Iterator >::operator* ( ) const
inlineconstexpr

Definition at line 1459 of file bits/stl_iterator.h.

◆ operator+()

template<typename _Iterator >
constexpr move_iterator std::move_iterator< _Iterator >::operator+ ( difference_type  __n) const
inlineconstexpr

Definition at line 1507 of file bits/stl_iterator.h.

◆ operator++() [1/2]

template<typename _Iterator >
constexpr move_iterator & std::move_iterator< _Iterator >::operator++ ( )
inlineconstexpr

Definition at line 1471 of file bits/stl_iterator.h.

◆ operator++() [2/2]

template<typename _Iterator >
constexpr move_iterator std::move_iterator< _Iterator >::operator++ ( int  )
inlineconstexpr

Definition at line 1478 of file bits/stl_iterator.h.

◆ operator+=()

template<typename _Iterator >
constexpr move_iterator & std::move_iterator< _Iterator >::operator+= ( difference_type  __n)
inlineconstexpr

Definition at line 1511 of file bits/stl_iterator.h.

◆ operator-()

template<typename _Iterator >
constexpr move_iterator std::move_iterator< _Iterator >::operator- ( difference_type  __n) const
inlineconstexpr

Definition at line 1518 of file bits/stl_iterator.h.

◆ operator--() [1/2]

template<typename _Iterator >
constexpr move_iterator & std::move_iterator< _Iterator >::operator-- ( )
inlineconstexpr

Definition at line 1492 of file bits/stl_iterator.h.

◆ operator--() [2/2]

template<typename _Iterator >
constexpr move_iterator std::move_iterator< _Iterator >::operator-- ( int  )
inlineconstexpr

Definition at line 1499 of file bits/stl_iterator.h.

◆ operator-=()

template<typename _Iterator >
constexpr move_iterator & std::move_iterator< _Iterator >::operator-= ( difference_type  __n)
inlineconstexpr

Definition at line 1522 of file bits/stl_iterator.h.

◆ operator->()

template<typename _Iterator >
constexpr pointer std::move_iterator< _Iterator >::operator-> ( ) const
inlineconstexpr

Definition at line 1467 of file bits/stl_iterator.h.

◆ operator=()

template<typename _Iterator >
template<typename _Iter >
constexpr move_iterator & std::move_iterator< _Iterator >::operator= ( const move_iterator< _Iter > &  __i)
inlineconstexpr

Definition at line 1438 of file bits/stl_iterator.h.

◆ operator[]()

template<typename _Iterator >
constexpr reference std::move_iterator< _Iterator >::operator[] ( difference_type  __n) const
inlineconstexpr

Definition at line 1529 of file bits/stl_iterator.h.

Friends And Related Function Documentation

◆ move_iterator

template<typename _Iterator >
template<typename _Iter2 >
friend class move_iterator
friend

Definition at line 1383 of file bits/stl_iterator.h.


The documentation for this class was generated from the following file: