![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
An iterator adaptor that wraps another iterator such that dereferencing the wrapped iterator yields an rvalue reference to the source value. More...
Public Types | |
| using | difference_type = typename iterator_traits<Iterator>::difference_type |
| The difference type of the iterator. | |
| using | iterator_category = typename iterator_traits<Iterator>::iterator_category |
| iterator category tag type | |
| using | iterator_type = Iterator |
| The type of the underlying iterator. | |
| using | pointer = Iterator |
| iterator pointer type | |
| using | reference |
| iterator reference type | |
| using | value_type = typename iterator_traits<Iterator>::value_type |
| iterator value type | |
Public Member Functions | |
| template<typename SfinaeIterator = Iterator, arene::base::constraints< enable_if_t< is_default_constructible_v< SfinaeIterator > > > = nullptr> | |
| move_iterator () noexcept(is_nothrow_default_constructible_v< Iterator >) | |
Default construct the iterator, holding a default-constructed underlying iterator. Only available if Iterator is default-constructible. | |
| move_iterator (Iterator iter) noexcept(is_nothrow_copy_constructible_v< Iterator >) | |
| Construct an iterator holding the specified value of the underlying iterator. | |
| move_iterator (move_iterator &&)=default | |
| Default move constructor. | |
| move_iterator (move_iterator const &)=default | |
| Default copy constructor. | |
| template<typename OtherIterator, arene::base::constraints< enable_if_t< is_convertible_v< OtherIterator, Iterator > > > = nullptr> | |
| move_iterator (move_iterator< OtherIterator > const &source) | |
Conversion constructor from another move iterator with a different type of underlying iterator. The stored iterator is constructed from the underlying iterator of the source move iterator. Requires that the source underlying iterator is convertible to Iterator. | |
| ~move_iterator ()=default | |
| Default destructor. | |
| auto | base () const -> iterator_type |
| Retrieve the underlying iterator. | |
| auto | operator* () const -> reference |
| Dereference the iterator. | |
| auto | operator+ (difference_type delta) const -> move_iterator |
| Obtain a new iterator referencing the value from moving the current iterator forwards by a specified amount. | |
| auto | operator++ () -> move_iterator & |
| Preincrement operator. Increments the stored iterator. | |
| auto | operator++ (int) -> move_iterator |
| Postincrement operator. Increments the stored iterator. | |
| auto | operator+= (difference_type delta) -> move_iterator & |
| Move the current iterator forwards by a specified amount. | |
| auto | operator- (difference_type delta) const -> move_iterator |
| Obtain a new iterator referencing the value from moving the current iterator backwards by a specified amount. | |
| auto | operator-- () -> move_iterator & |
| Predecrement operator. Decrements the stored iterator. | |
| auto | operator-- (int) -> move_iterator |
| Postdecrement operator. Decrements the stored iterator. | |
| auto | operator-= (difference_type delta) -> move_iterator & |
| Move the current iterator backwards by a specified amount. | |
| auto | operator-> () const -> pointer |
| Arrow dereference operator for accessing the referenced value. | |
| auto | operator= (move_iterator &&) -> move_iterator &=default |
| Default move assignment operator. | |
| auto | operator= (move_iterator const &) -> move_iterator &=default |
| Default copy assignment operator. | |
| template<typename OtherIterator, arene::base::constraints< enable_if_t< is_convertible_v< OtherIterator, Iterator > > > = nullptr> | |
| auto | operator= (move_iterator< OtherIterator > const &source) -> move_iterator & |
Conversion assignment from another move iterator with a different type of underlying iterator. The stored iterator is assigned from the underlying iterator of the source move iterator. Requires that the source underlying iterator can be assigned to Iterator. | |
| auto | operator[] (difference_type delta) const -> reference |
| Access the value at a specified offset from the current iterator. | |
An iterator adaptor that wraps another iterator such that dereferencing the wrapped iterator yields an rvalue reference to the source value.
| Iterator | the type of the underlying iterator |
| using std::move_iterator< Iterator >::difference_type = typename iterator_traits<Iterator>::difference_type |
The difference type of the iterator.
| using std::move_iterator< Iterator >::iterator_category = typename iterator_traits<Iterator>::iterator_category |
iterator category tag type
| using std::move_iterator< Iterator >::iterator_type = Iterator |
The type of the underlying iterator.
| using std::move_iterator< Iterator >::pointer = Iterator |
iterator pointer type
| using std::move_iterator< Iterator >::reference |
iterator reference type
| using std::move_iterator< Iterator >::value_type = typename iterator_traits<Iterator>::value_type |
iterator value type
|
inlinenoexcept |
Default construct the iterator, holding a default-constructed underlying iterator. Only available if Iterator is default-constructible.
| SfinaeIterator | Dummy type to ensure underlying iterator is default-constructible |
|
inlineexplicitnoexcept |
Construct an iterator holding the specified value of the underlying iterator.
| iter | The iterator to store |
|
default |
Default copy constructor.
|
default |
Default move constructor.
|
default |
Default destructor.
|
inline |
Conversion constructor from another move iterator with a different type of underlying iterator. The stored iterator is constructed from the underlying iterator of the source move iterator. Requires that the source underlying iterator is convertible to Iterator.
| OtherIterator | The type of the underlying iterator of the source iterator |
| source | The source iterator |
|
inline |
Retrieve the underlying iterator.
|
inline |
Dereference the iterator.
|
inline |
Obtain a new iterator referencing the value from moving the current iterator forwards by a specified amount.
| delta | The amount to move |
Iterator must be a random access iterator
|
inline |
Preincrement operator. Increments the stored iterator.
*this
|
inline |
Postincrement operator. Increments the stored iterator.
*this prior to the increment
|
inline |
Move the current iterator forwards by a specified amount.
| delta | The amount to move |
*this Iterator must be a random access iterator
|
inline |
Obtain a new iterator referencing the value from moving the current iterator backwards by a specified amount.
| delta | The amount to move |
Iterator must be a random access iterator
|
inline |
Predecrement operator. Decrements the stored iterator.
*this Iterator must be at least a bidirectional iterator
|
inline |
Postdecrement operator. Decrements the stored iterator.
*this prior to the decrement Iterator must be at least a bidirectional iterator
|
inline |
Move the current iterator backwards by a specified amount.
| delta | The amount to move |
*this Iterator must be a random access iterator
|
inline |
Arrow dereference operator for accessing the referenced value.
|
default |
Default move assignment operator.
|
default |
Default copy assignment operator.
|
inline |
Conversion assignment from another move iterator with a different type of underlying iterator. The stored iterator is assigned from the underlying iterator of the source move iterator. Requires that the source underlying iterator can be assigned to Iterator.
| OtherIterator | The type of the underlying iterator of the source iterator |
| source | The source iterator |
*this
|
inline |
Access the value at a specified offset from the current iterator.
| delta | The offset to the new position |
Iterator must be a random access iterator