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>
53 requires std::is_const_v<range_type>
55 &&
std::is_same_v<derived_t_template2<args2_t...>, derived_t_template<args_t...>>
68 typename range_type::const_reference,
69 typename range_type::reference>;
101 template <
typename range_type2>
102 requires std::is_const_v<range_type>
118 template <
typename range_type2>
126 template <
typename range_type2>
130 return !(*
this == rhs);
134 template <
typename range_type2>
138 return static_cast<bool>(
pos < rhs.
pos);
142 template <
typename range_type2>
150 template <
typename range_type2>
158 template <
typename range_type2>
280 return static_cast<derived_t const *
>(
this);
292template <
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:120
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:104
constexpr pointer operator->() const noexcept(noexcept((&host)[pos]))
Return pointer to this iterator.
Definition: random_access_iterator.hpp:258
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:241
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:136
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:160
constexpr derived_t const * this_derived() const
Cast this to derived type.
Definition: random_access_iterator.hpp:278
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:152
constexpr derived_t & operator-=(difference_type const skip) noexcept
Decrement iterator by skip.
Definition: random_access_iterator.hpp:221
constexpr random_access_iterator_base(range_type &host) noexcept
Construct by host, default position pointer with 0.
Definition: random_access_iterator.hpp:94
constexpr random_access_iterator_base(range_type &host, position_type const pos) noexcept
Construct by host and explicit position.
Definition: random_access_iterator.hpp:97
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:69
typename range_type::const_reference const_reference
Use const reference type provided by container.
Definition: random_access_iterator.hpp:71
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:144
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:178
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:264
constexpr reference operator*() const noexcept(noexcept((*host)[pos]))
Dereference operator returns element currently pointed at.
Definition: random_access_iterator.hpp:252
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:215
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:228
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:73
constexpr derived_t operator+(difference_type const skip) const noexcept
Forward copy of this iterator.
Definition: random_access_iterator.hpp:208
constexpr derived_t operator--(int) noexcept
Post-decrement, return previous iterator state.
Definition: random_access_iterator.hpp:193
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:75
constexpr derived_t & operator--() noexcept
Pre-decrement, return updated iterator.
Definition: random_access_iterator.hpp:186
typename range_type::value_type value_type
Value type of container elements.
Definition: random_access_iterator.hpp:65
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:128
constexpr derived_t & operator++() noexcept
Pre-increment, return updated iterator.
Definition: random_access_iterator.hpp:171
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:235
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:63
constexpr derived_t * this_derived()
Cast this to derived type.
Definition: random_access_iterator.hpp:272
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:201
~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:59
A generic random access iterator that delegates most operations to the range.
Definition: random_access_iterator.hpp:294
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29