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

Public Types

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

Public Member Functions

template<typename _Iter >
requires constexpr __convertible< _Iter > move_iterator (const move_iterator< _Iter > &__i)
 
constexpr move_iterator (iterator_type __i)
 
constexpr iterator_type base () &&
 
constexpr const iterator_type & base () const &noexcept
 
constexpr reference operator* () const
 
constexpr move_iterator operator+ (difference_type __n) const
 
constexpr move_iteratoroperator++ ()
 
constexpr move_iterator operator++ (int)
 
constexpr void operator++ (int) requires(!forward_iterator< _Iterator >)
 
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 >
requires __convertible< _Iter > &&constexpr assignable_from< _Iterator &, const _Iter & > 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 1449 of file bits/stl_iterator.h.


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