37template <
typename range_type,
template <
typename...>
typename derived_t_template,
typename... args_t>
49 template <
typename range_type2,
template <
typename...>
typename derived_t_template2,
typename... args2_t>
62 typename range_type::const_reference,
63 typename range_type::reference>;
95 template <
typename range_type2>
96 requires std::is_const_v<range_type>
112 template <
typename range_type2>
120 template <
typename range_type2>
124 return !(*
this == rhs);
128 template <
typename range_type2>
132 return static_cast<bool>(
pos < rhs.
pos);
136 template <
typename range_type2>
144 template <
typename range_type2>
152 template <
typename range_type2>
274 return static_cast<derived_t const *
>(
this);
286template <
typename range_type>
A CRTP base template for creating random access iterators.
Definition random_access_iterator.hpp:39
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:114
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:98
constexpr pointer operator->() const noexcept(noexcept((&host)[pos]))
Return pointer to this iterator.
Definition random_access_iterator.hpp:252
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:235
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:130
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:154
constexpr derived_t const * this_derived() const
Cast this to derived type.
Definition random_access_iterator.hpp:272
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:146
constexpr derived_t & operator-=(difference_type const skip) noexcept
Decrement iterator by skip.
Definition random_access_iterator.hpp:215
constexpr random_access_iterator_base(range_type &host) noexcept
Construct by host, default position pointer with 0.
Definition random_access_iterator.hpp:88
constexpr random_access_iterator_base(range_type &host, position_type const pos) noexcept
Construct by host and explicit position.
Definition random_access_iterator.hpp:91
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:63
typename range_type::const_reference const_reference
Use const reference type provided by container.
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 greater than rhs.
Definition random_access_iterator.hpp:138
std::make_unsigned_t< typename range_type::difference_type > position_type
Use container's size_type as a position.
Definition random_access_iterator.hpp:44
constexpr derived_t operator++(int) noexcept
Post-increment, return previous iterator state.
Definition random_access_iterator.hpp:172
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:258
constexpr reference operator*() const noexcept(noexcept((*host)[pos]))
Dereference operator returns element currently pointed at.
Definition random_access_iterator.hpp:246
std::add_pointer_t< range_type > host
Iterator stores pointer to underlying container structure.
Definition random_access_iterator.hpp:42
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:209
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:222
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:67
constexpr derived_t operator+(difference_type const skip) const noexcept
Forward copy of this iterator.
Definition random_access_iterator.hpp:202
constexpr derived_t operator--(int) noexcept
Post-decrement, return previous iterator state.
Definition random_access_iterator.hpp:187
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:69
constexpr derived_t & operator--() noexcept
Pre-decrement, return updated iterator.
Definition random_access_iterator.hpp:180
typename range_type::value_type value_type
Value type of container elements.
Definition random_access_iterator.hpp:59
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:122
constexpr derived_t & operator++() noexcept
Pre-increment, return updated iterator.
Definition random_access_iterator.hpp:165
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:229
position_type pos
Store position index for container.
Definition random_access_iterator.hpp:46
typename range_type::difference_type difference_type
Type for distances between iterators.
Definition random_access_iterator.hpp:57
constexpr derived_t * this_derived()
Cast this to derived type.
Definition random_access_iterator.hpp:266
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:195
~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:53
A generic random access iterator that delegates most operations to the range.
Definition random_access_iterator.hpp:288
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26