33 using value_type =
typename std::iterator_traits<Iterator>::value_type;
35 using pointer =
typename std::iterator_traits<Iterator>::pointer;
36 using reference =
typename std::iterator_traits<Iterator>::reference;
88 if constexpr(std::is_lvalue_reference_v<
decltype(*mIterator)> || std::is_rvalue_reference_v<
decltype(*mIterator)>) {
127 std::forward<Range>(
range));
An iterator type that keeps an index count of the current item.
Definition Enumerate.hpp:23
typename std::iterator_traits< Iterator >::iterator_category iterator_category
Definition Enumerate.hpp:32
EnumerateIterator & operator+(difference_type offset)
Advances the iterator by the given offset.
Definition Enumerate.hpp:58
EnumerateIterator & operator--()
Decrements the iterator. Will also decrement the index position.
Definition Enumerate.hpp:65
typename std::iterator_traits< Iterator >::value_type value_type
Definition Enumerate.hpp:33
bool operator!=(const EnumerateIterator &other) const
Definition Enumerate.hpp:99
bool operator==(const EnumerateIterator &other) const
Definition Enumerate.hpp:98
EnumerateIterator operator++(int)
Increments the iterator. Will also increment the index position.
Definition Enumerate.hpp:50
bool operator<(const EnumerateIterator &other) const
Definition Enumerate.hpp:102
auto operator*() const noexcept
Dereferences the iterator and obtain it's value.
Definition Enumerate.hpp:87
bool operator>=(const EnumerateIterator &other) const
Definition Enumerate.hpp:101
EnumerateIterator operator--(int)
Decrements the iterator. Will also decrement the index position.
Definition Enumerate.hpp:72
bool operator>(const EnumerateIterator &other) const
Definition Enumerate.hpp:100
typename std::iterator_traits< Iterator >::reference reference
Definition Enumerate.hpp:36
auto * operator->() const noexcept
Dereferences the iterator and obtain it's value.
Definition Enumerate.hpp:96
EnumerateIterator & operator-(difference_type offset)
Recedes the iterator by the given offset.
Definition Enumerate.hpp:80
Iterator mIterator
The current iterator position.
Definition Enumerate.hpp:29
typename std::iterator_traits< Iterator >::pointer pointer
Definition Enumerate.hpp:35
bool operator<=(const EnumerateIterator &other) const
Definition Enumerate.hpp:103
EnumerateIterator(Index index, Iterator &&iterator)
Creates a new enumerate iterator at the given index positioned at the given it iterator.
Definition Enumerate.hpp:40
typename std::iterator_traits< Iterator >::difference_type difference_type
Definition Enumerate.hpp:34
EnumerateIterator & operator++()
Increments the iterator. Will also increment the index position.
Definition Enumerate.hpp:43
Index mIndex
The current iteration index.
Definition Enumerate.hpp:26
IteratorPrototype where advance is defined by the functional held by F.
Definition Iterator.hpp:212
Definition Application.hpp:19
auto range()
Returns an iterator that increases it's value from 0 to end by 1 for each step.
Definition Iterator.hpp:350
auto enumerate(Range &range, Index startingAt=0)
Return a range object.
Definition Enumerate.hpp:113
@ Index
Index buffer type.
auto wrap(IB &&a, IE &&b, Context &&context)
Wraps two iterators into a single-use container with begin/end methods to match the C++ iterator conv...
Definition Iterator.hpp:296
void copy(const A &a, B &b, T &&t=T())
Copies values from one container to another.
Definition Iterator.hpp:564
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25