40template <std::copy_constructible value_t>
41class repeat_view :
public std::ranges::view_interface<repeat_view<value_t>>
45 using base_t = std::ranges::view_interface<repeat_view<value_t>>;
51 using single_value_t =
decltype(std::views::single(std::declval<value_t>()));
68 template <
typename parent_type>
81 template <
typename range_type,
template <
typename...>
typename derived_t_template,
typename... args_t>
197template <std::copy_constructible value_t>
198template <
typename parent_type>
238 template <
typename parent_type2>
239 requires std::is_const_v<parent_type>
250 return base_t::operator==(rhs);
255 return !(*
this == rhs);
259 constexpr bool operator==(std::default_sentinel_t
const &)
const noexcept
265 constexpr bool operator!=(std::default_sentinel_t
const &)
const noexcept
292 template <std::copy_constructible value_type>
A CRTP base template for creating random access iterators.
Definition random_access_iterator.hpp:39
value_type * pointer
Pointer type is pointer of container element type.
Definition random_access_iterator.hpp:67
typename range_type::value_type value_type
Value type of container elements.
Definition random_access_iterator.hpp:59
typename range_type::difference_type difference_type
Type for distances between iterators.
Definition random_access_iterator.hpp:57
The forward declared iterator type for views::repeat (a random access iterator).
Definition repeat.hpp:200
friend constexpr bool operator==(std::default_sentinel_t const &, basic_iterator const &) noexcept
Equality comparison to the sentinel always returns false on an infinite view.
Definition repeat.hpp:271
basic_iterator & operator=(basic_iterator &&)=default
Defaulted.
constexpr bool operator!=(basic_iterator const &rhs) const noexcept
Equality comparison to the sentinel always returns false on an infinite view.
Definition repeat.hpp:253
basic_iterator(basic_iterator &&)=default
Defaulted.
constexpr bool operator==(basic_iterator const &rhs) const noexcept
Equality comparison to the sentinel always returns false on an infinite view.
Definition repeat.hpp:248
basic_iterator & operator=(basic_iterator const &)=default
Defaulted.
constexpr basic_iterator(parent_type &host) noexcept
Construct by host range.
Definition repeat.hpp:232
constexpr bool operator!=(std::default_sentinel_t const &) const noexcept
Inequality comparison to the sentinel always returns true on an infinite view.
Definition repeat.hpp:265
basic_iterator()=default
Defaulted.
constexpr bool operator==(std::default_sentinel_t const &) const noexcept
Equality comparison to the sentinel always returns false on an infinite view.
Definition repeat.hpp:259
constexpr basic_iterator(basic_iterator< parent_type2 > const &rhs) noexcept
Constructor for const version from non-const version.
Definition repeat.hpp:241
~basic_iterator()=default
Defaulted.
friend constexpr bool operator!=(std::default_sentinel_t const &, basic_iterator const &) noexcept
Inequality comparison to the sentinel always returns true on an infinite view.
Definition repeat.hpp:277
basic_iterator(basic_iterator const &)=default
Defaulted.
The type returned by seqan3::views::repeat.
Definition repeat.hpp:42
constexpr sentinel_type end() noexcept
Returns an iterator to the element following the last element of the range.
Definition repeat.hpp:148
~repeat_view()=default
Defaulted.
repeat_view & operator=(repeat_view const &)=default
Defaulted.
repeat_view & operator=(repeat_view &&)=default
Defaulted.
repeat_view(repeat_view &&)=default
Defaulted.
std::ranges::view_interface< repeat_view< value_t > > base_t
/brief the base type.
Definition repeat.hpp:45
ptrdiff_t difference_type
The type to store the difference of two iterators.
Definition repeat.hpp:64
std::default_sentinel_t sentinel_type
The sentinel type is set to std::default_sentinel_t.
Definition repeat.hpp:48
constexpr repeat_view(value_t const &value)
Construct from any type (Note: the value will be copied into views::single).
Definition repeat.hpp:96
repeat_view()=default
Defaulted.
constexpr const_iterator begin() const noexcept
Returns an iterator to the first element of the range.
Definition repeat.hpp:128
value_type const & const_reference
The const reference type.
Definition repeat.hpp:62
decltype(std::views::single(std::declval< value_t >())) single_value_t
The view which wraps the single value to repeat.
Definition repeat.hpp:51
single_value_t single_value
}
Definition repeat.hpp:193
constexpr const_reference operator[](difference_type const n) const noexcept
Returns the n-th element.
Definition repeat.hpp:179
repeat_view(repeat_view const &)=default
Defaulted.
constexpr iterator begin() noexcept
Returns an iterator to the first element of the range.
Definition repeat.hpp:122
constexpr repeat_view(value_t &&value)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition repeat.hpp:100
constexpr reference operator[](difference_type const n) noexcept
Returns the n-th element.
Definition repeat.hpp:185
constexpr sentinel_type end() const noexcept
Returns an iterator to the element following the last element of the range.
Definition repeat.hpp:154
Provides various transformation traits used by the range module.
constexpr detail::repeat_fn repeat
A view factory that repeats a given value infinitely.
Definition repeat.hpp:344
Provides various transformation traits for use on iterators.
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
The SeqAn namespace for views.
Definition char_strictly_to.hpp:19
SeqAn specific customisations in the standard namespace.
Provides the seqan3::detail::random_access_iterator class.
View factory definition for views::repeat.
Definition repeat.hpp:290
constexpr auto operator()(value_type &&value) const
Returns an instance of seqan3::detail::repeat_view constructed with value.
Definition repeat.hpp:293