|
barretenberg
|
A template class for a reference array. Behaves as if std::array<T&, N> was possible. More...
#include <ref_array.hpp>
Classes | |
| class | 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. More... | |
Public Member Functions | |
| RefArray (const std::array< T *, N > &ptr_array) | |
| template<typename... Ts> | |
| RefArray (T &ref, Ts &... rest) | |
| T & | operator[] (std::size_t idx) const |
| constexpr std::size_t | size () const |
| iterator | begin () const |
| Returns an iterator to the beginning of the RefArray. | |
| iterator | end () const |
| Returns an iterator to the end of the RefArray. | |
A template class for a reference array. Behaves as if std::array<T&, N> was possible.
This class provides a fixed-size array of pointers to elements of type T, exposed as references. It offers random access to its elements and provides an iterator class for traversal.
| T | The type of elements stored in the array. |
| N | The size of the array. |
Returns an iterator to the beginning of the RefArray.
Returns an iterator to the end of the RefArray.