40template <
typename range_type,
template <
typename...>
typename derived_t_template,
typename... args_t>
52 template <
typename range_type2,
template <
typename...>
typename derived_t_template2,
typename... args2_t>
65 typename range_type::const_reference,
66 typename range_type::reference>;
98 template <
typename range_type2>
99 requires std::is_const_v<range_type>
115 template <
typename range_type2>
123 template <
typename range_type2>
127 return !(*
this == rhs);
131 template <
typename range_type2>
135 return static_cast<bool>(
pos < rhs.
pos);
139 template <
typename range_type2>
147 template <
typename range_type2>
155 template <
typename range_type2>
277 return static_cast<derived_t const *
>(
this);
289template <
typename range_type>
A CRTP base template for creating random access iterators.
Definition: random_access_iterator.hpp:42
constexpr bool operator==(random_access_iterator_base< range_type2, derived_t_template > const &rhs) const noexcept
Checks whether *this is equal to rhs.
Definition: random_access_iterator.hpp:117
constexpr random_access_iterator_base(random_access_iterator_base< range_type2, derived_t_template > const &rhs) noexcept
Constructor for const version from non-const version.
Definition: random_access_iterator.hpp:101
constexpr pointer operator->() const noexcept(noexcept((&host)[pos]))
Return pointer to this iterator.
Definition: random_access_iterator.hpp:255
constexpr friend difference_type operator-(derived_t const &lhs, derived_t const &rhs) noexcept
Return offset between this and remote iterator's position.
Definition: random_access_iterator.hpp:238
constexpr bool operator<(random_access_iterator_base< range_type2, derived_t_template > const &rhs) const noexcept
Checks whether *this is less than rhs.
Definition: random_access_iterator.hpp:133
constexpr bool operator>=(random_access_iterator_base< range_type2, derived_t_template > const &rhs) const noexcept
Checks whether *this is greater than or equal to rhs.
Definition: random_access_iterator.hpp:157
constexpr derived_t const * this_derived() const
Cast this to derived type.
Definition: random_access_iterator.hpp:275
constexpr bool operator<=(random_access_iterator_base< range_type2, derived_t_template > const &rhs) const noexcept
Checks whether *this is less than or equal to rhs.
Definition: random_access_iterator.hpp:149
constexpr derived_t & operator-=(difference_type const skip) noexcept
Decrement iterator by skip.
Definition: random_access_iterator.hpp:218
constexpr random_access_iterator_base(range_type &host) noexcept
Construct by host, default position pointer with 0.
Definition: random_access_iterator.hpp:91
constexpr random_access_iterator_base(range_type &host, position_type const pos) noexcept
Construct by host and explicit position.
Definition: random_access_iterator.hpp:94
std::conditional_t< std::is_const_v< range_type >, typename range_type::const_reference, typename range_type::reference > reference
Use reference type defined by container.
Definition: random_access_iterator.hpp:66
typename range_type::const_reference const_reference
Use const reference type provided by container.
Definition: random_access_iterator.hpp:68
constexpr bool operator>(random_access_iterator_base< range_type2, derived_t_template > const &rhs) const noexcept
Checks whether *this is greater than rhs.
Definition: random_access_iterator.hpp:141
std::make_unsigned_t< typename range_type::difference_type > position_type
Use container's size_type as a position.
Definition: random_access_iterator.hpp:47
constexpr derived_t operator++(int) noexcept
Post-increment, return previous iterator state.
Definition: random_access_iterator.hpp:175
constexpr reference operator[](position_type const n) const noexcept(noexcept((*host)[pos+n]))
Return underlying container value currently pointed at.
Definition: random_access_iterator.hpp:261
constexpr reference operator*() const noexcept(noexcept((*host)[pos]))
Dereference operator returns element currently pointed at.
Definition: random_access_iterator.hpp:249
std::add_pointer_t< range_type > host
Iterator stores pointer to underlying container structure.
Definition: random_access_iterator.hpp:45
constexpr friend derived_t operator+(difference_type const skip, derived_t const &it) noexcept
Non-member operator+ delegates to non-friend operator+.
Definition: random_access_iterator.hpp:212
constexpr random_access_iterator_base(random_access_iterator_base &&)=default
Move constructor.
constexpr derived_t operator-(difference_type const skip) const noexcept
Return decremented copy of this iterator.
Definition: random_access_iterator.hpp:225
constexpr random_access_iterator_base(random_access_iterator_base const &)=default
Copy constructor.
constexpr random_access_iterator_base & operator=(random_access_iterator_base &&)=default
Move assignment.
value_type * pointer
Pointer type is pointer of container element type.
Definition: random_access_iterator.hpp:70
constexpr derived_t operator+(difference_type const skip) const noexcept
Forward copy of this iterator.
Definition: random_access_iterator.hpp:205
constexpr derived_t operator--(int) noexcept
Post-decrement, return previous iterator state.
Definition: random_access_iterator.hpp:190
constexpr random_access_iterator_base & operator=(random_access_iterator_base const &)=default
Copy construction via assignment.
std::random_access_iterator_tag iterator_category
Tag this class as a random access iterator.
Definition: random_access_iterator.hpp:72
constexpr derived_t & operator--() noexcept
Pre-decrement, return updated iterator.
Definition: random_access_iterator.hpp:183
typename range_type::value_type value_type
Value type of container elements.
Definition: random_access_iterator.hpp:62
constexpr bool operator!=(random_access_iterator_base< range_type2, derived_t_template > const &rhs) const noexcept
Checks whether *this is not equal to rhs.
Definition: random_access_iterator.hpp:125
constexpr derived_t & operator++() noexcept
Pre-increment, return updated iterator.
Definition: random_access_iterator.hpp:168
constexpr friend derived_t operator-(difference_type const skip, derived_t const &it) noexcept
Non-member operator- delegates to non-friend operator-.
Definition: random_access_iterator.hpp:232
position_type pos
Store position index for container.
Definition: random_access_iterator.hpp:49
typename range_type::difference_type difference_type
Type for distances between iterators.
Definition: random_access_iterator.hpp:60
constexpr derived_t * this_derived()
Cast this to derived type.
Definition: random_access_iterator.hpp:269
constexpr random_access_iterator_base()=default
Default constructor.
constexpr derived_t & operator+=(difference_type const skip) noexcept
Forward this iterator.
Definition: random_access_iterator.hpp:198
~random_access_iterator_base()=default
Use default deconstructor.
derived_t_template< range_type > derived_t
Because this is CRTP, we know the full derived type:
Definition: random_access_iterator.hpp:56
A generic random access iterator that delegates most operations to the range.
Definition: random_access_iterator.hpp:291
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29