tenno 0.1.0
Loading...
Searching...
No Matches
tenno::vector< T, Allocator >::iterator Struct Reference

An iterator to iterate over the data. More...

#include <vector.hpp>

Public Types

using iterator_category = std::forward_iterator_tag
 
using difference_type = std::ptrdiff_t
 
using value_type = T
 
using pointer = T *
 
using reference = T &
 

Public Member Functions

 iterator (tenno::vector< T, Allocator > &_vec, const tenno::size _index)
 
iteratoroperator++ () noexcept
 
iterator operator++ (T) noexcept
 
bool operator== (const iterator &other) const noexcept
 
bool operator!= (const iterator &other) const noexcept
 
tenno::expected< tenno::reference_wrapper< T >, tenno::erroroperator* () noexcept
 
tenno::expected< tenno::reference_wrapper< T >, tenno::erroroperator-> () noexcept
 
tenno::expected< tenno::reference_wrapper< T >, tenno::errorget () noexcept
 

Data Fields

tenno::size index
 
tenno::vector< T, Allocator > & vec
 

Detailed Description

template<class T, class Allocator = tenno::allocator<T>>
struct tenno::vector< T, Allocator >::iterator

An iterator to iterate over the data.

Definition at line 320 of file vector.hpp.

Member Typedef Documentation

◆ difference_type

template<class T , class Allocator = tenno::allocator<T>>
using tenno::vector< T, Allocator >::iterator::difference_type = std::ptrdiff_t

Definition at line 323 of file vector.hpp.

◆ iterator_category

template<class T , class Allocator = tenno::allocator<T>>
using tenno::vector< T, Allocator >::iterator::iterator_category = std::forward_iterator_tag

Definition at line 322 of file vector.hpp.

◆ pointer

template<class T , class Allocator = tenno::allocator<T>>
using tenno::vector< T, Allocator >::iterator::pointer = T *

Definition at line 325 of file vector.hpp.

◆ reference

template<class T , class Allocator = tenno::allocator<T>>
using tenno::vector< T, Allocator >::iterator::reference = T &

Definition at line 326 of file vector.hpp.

◆ value_type

template<class T , class Allocator = tenno::allocator<T>>
using tenno::vector< T, Allocator >::iterator::value_type = T

Definition at line 324 of file vector.hpp.

Constructor & Destructor Documentation

◆ iterator()

template<class T , class Allocator = tenno::allocator<T>>
tenno::vector< T, Allocator >::iterator::iterator ( tenno::vector< T, Allocator > & _vec,
const tenno::size _index )
inlineexplicit

Definition at line 331 of file vector.hpp.

Member Function Documentation

◆ get()

template<class T , class Allocator = tenno::allocator<T>>
tenno::expected< tenno::reference_wrapper< T >, tenno::error > tenno::vector< T, Allocator >::iterator::get ( )
inlinenoexcept

Definition at line 372 of file vector.hpp.

◆ operator!=()

template<class T , class Allocator = tenno::allocator<T>>
bool tenno::vector< T, Allocator >::iterator::operator!= ( const iterator & other) const
inlinenoexcept

Definition at line 355 of file vector.hpp.

◆ operator*()

template<class T , class Allocator = tenno::allocator<T>>
tenno::expected< tenno::reference_wrapper< T >, tenno::error > tenno::vector< T, Allocator >::iterator::operator* ( )
inlinenoexcept

Definition at line 361 of file vector.hpp.

◆ operator++() [1/2]

template<class T , class Allocator = tenno::allocator<T>>
iterator & tenno::vector< T, Allocator >::iterator::operator++ ( )
inlinenoexcept

Definition at line 337 of file vector.hpp.

◆ operator++() [2/2]

template<class T , class Allocator = tenno::allocator<T>>
iterator tenno::vector< T, Allocator >::iterator::operator++ ( T )
inlinenoexcept

Definition at line 343 of file vector.hpp.

◆ operator->()

template<class T , class Allocator = tenno::allocator<T>>
tenno::expected< tenno::reference_wrapper< T >, tenno::error > tenno::vector< T, Allocator >::iterator::operator-> ( )
inlinenoexcept

Definition at line 367 of file vector.hpp.

◆ operator==()

template<class T , class Allocator = tenno::allocator<T>>
bool tenno::vector< T, Allocator >::iterator::operator== ( const iterator & other) const
inlinenoexcept

Definition at line 350 of file vector.hpp.

Field Documentation

◆ index

template<class T , class Allocator = tenno::allocator<T>>
tenno::size tenno::vector< T, Allocator >::iterator::index

Definition at line 328 of file vector.hpp.

◆ vec

template<class T , class Allocator = tenno::allocator<T>>
tenno::vector<T, Allocator>& tenno::vector< T, Allocator >::iterator::vec

Definition at line 329 of file vector.hpp.


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