Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::RefArray< T, N >::iterator Class Reference

Nested iterator class for RefArray, based on indexing into the pointer array. Provides semantics similar to what would be expected if std::array<T&, N> was possible. More...

#include <ref_array.hpp>

Public Member Functions

 iterator (RefArray const *array, std::size_t pos)
 Constructs an iterator for a given RefArray object.
 
T & operator* () const
 
iteratoroperator++ ()
 
iterator operator++ (int)
 
bool operator== (iterator const &other) const
 
bool operator!= (iterator const &other) const
 

Private Attributes

RefArray const * array
 
std::size_t pos
 

Detailed Description

template<typename T, std::size_t N>
class bb::RefArray< T, N >::iterator

Nested iterator class for RefArray, based on indexing into the pointer array. Provides semantics similar to what would be expected if std::array<T&, N> was possible.

Definition at line 77 of file ref_array.hpp.

Constructor & Destructor Documentation

◆ iterator()

template<typename T , std::size_t N>
bb::RefArray< T, N >::iterator::iterator ( RefArray const *  array,
std::size_t  pos 
)
inline

Constructs an iterator for a given RefArray object.

Parameters
arrayPointer to the RefArray object.
posThe starting position in the array.

Definition at line 85 of file ref_array.hpp.

Member Function Documentation

◆ operator!=()

template<typename T , std::size_t N>
bool bb::RefArray< T, N >::iterator::operator!= ( iterator const &  other) const
inline

Definition at line 110 of file ref_array.hpp.

◆ operator*()

template<typename T , std::size_t N>
T & bb::RefArray< T, N >::iterator::operator* ( ) const
inline

Definition at line 90 of file ref_array.hpp.

◆ operator++() [1/2]

template<typename T , std::size_t N>
iterator & bb::RefArray< T, N >::iterator::operator++ ( )
inline

Definition at line 96 of file ref_array.hpp.

◆ operator++() [2/2]

template<typename T , std::size_t N>
iterator bb::RefArray< T, N >::iterator::operator++ ( int  )
inline

Definition at line 102 of file ref_array.hpp.

◆ operator==()

template<typename T , std::size_t N>
bool bb::RefArray< T, N >::iterator::operator== ( iterator const &  other) const
inline

Definition at line 109 of file ref_array.hpp.

Member Data Documentation

◆ array

template<typename T , std::size_t N>
RefArray const* bb::RefArray< T, N >::iterator::array
private

Definition at line 113 of file ref_array.hpp.

◆ pos

template<typename T , std::size_t N>
std::size_t bb::RefArray< T, N >::iterator::pos
private

Definition at line 114 of file ref_array.hpp.


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