template <typename Soa, size_t... Columns>
soagen::iterator class

RandomAccessIterator for SoA types.

Public types

using difference_type = std::ptrdiff_t
Signed integer difference type used by the corresponding SoA type.
using iterator_category = std::random_access_iterator_tag
This iterator type is a RandomAccessIterator.
using reference = row_type
Alias for row_type.
using row_type = soagen::row_type<Soa, Columns...>
The soagen::row type dereferenced by this iterator.
using size_type = std::size_t
Unsigned integer size type used by the corresponding SoA type.
using soa_ref = detail::coerce_ref<Soa>
Cvref-qualified version of soa_type.
using soa_type = detail::remove_cvref<Soa>
Base SoA type for this iterator.
using value_type = row_type
Alias for row_type.

Constructors, destructors, conversion operators

iterator() constexpr noexcept
Default constructor.
iterator(const iterator&) defaulted
Copy constructor.
iterator(soa_ref src, difference_type pos) constexpr noexcept
Constructs an iterator to some row of a SoA container.

Public functions

auto operator=(const iterator&) →  iterator& defaulted
Copy-assignment operator.

Decrementing

auto operator-(const iterator& it, difference_type n) →  iterator constexpr noexcept
Returns a copy of an iterator decremented by some arbitrary number of rows.
auto operator--(iterator& it) →  iterator& constexpr noexcept
Decrements the iterator by one row (pre-fix).
auto operator--(iterator& it, int) →  iterator constexpr noexcept
Decrements the iterator by one row (post-fix).
auto operator-=(iterator& it, difference_type n) →  iterator& constexpr noexcept
Decrements the iterator by some arbitrary number of rows.

Dereferencing

auto operator*() const →  reference constexpr noexcept
Returns the row the iterator refers to.
auto operator->() const →  detail::arrow_proxy<row_type> constexpr noexcept
Returns the row the iterator refers to.
auto operator[](difference_type offset) const →  reference constexpr noexcept
Returns the row at some arbitrary offset from the one the iterator refers to.

Difference

SOAGEN_CONSTRAINED_TEMPLATE((same_table_type<Soa, T>), typename T, size_t... Cols) const expr difference_type operator-(const iterator< T
Returns the difference between two iterators.

Incrementing

auto operator+(const iterator& it, difference_type n) →  iterator constexpr noexcept
Returns a copy of an iterator incremented by some arbitrary number of rows.
auto operator++(iterator& it) →  iterator& constexpr noexcept
Increments the iterator by one row (pre-fix).
auto operator++(iterator& it, int) →  iterator constexpr noexcept
Increments the iterator by one row (post-fix).
auto operator+=(iterator& it, difference_type n) →  iterator& constexpr noexcept
Increments the iterator by some arbitrary number of rows.