43template <std::copy_constructible value_t>
44class repeat_view :
public std::ranges::view_interface<repeat_view<value_t>>
48 using base_t = std::ranges::view_interface<repeat_view<value_t>>;
54 using single_value_t =
decltype(std::views::single(std::declval<value_t>()));
71 template <
typename parent_type>
84 template <
typename parent_type,
typename crtp_base>
200template <std::copy_constructible value_t>
201template <
typename parent_type>
241 template <
typename parent_type2>
242 requires std::is_const_v<parent_type>
252 using base_t::operator==;
254 using base_t::operator!=;
257 constexpr bool operator==(std::default_sentinel_t
const &)
const noexcept
263 constexpr bool operator!=(std::default_sentinel_t
const &)
const noexcept
290 template <std::copy_constructible value_type>
A CRTP base template for creating random access iterators.
Definition: random_access_iterator.hpp:42
value_type * pointer
Pointer type is pointer of container element type.
Definition: random_access_iterator.hpp:70
typename range_type::value_type value_type
Value type of container elements.
Definition: random_access_iterator.hpp:62
typename range_type::difference_type difference_type
Type for distances between iterators.
Definition: random_access_iterator.hpp:60
The forward declared iterator type for views::repeat (a random access iterator).
Definition: repeat.hpp:203
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:269
basic_iterator & operator=(basic_iterator &&)=default
Defaulted.
basic_iterator(basic_iterator &&)=default
Defaulted.
basic_iterator & operator=(basic_iterator const &)=default
Defaulted.
constexpr basic_iterator(parent_type &host) noexcept
Construct by host range.
Definition: repeat.hpp:235
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:263
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:257
constexpr basic_iterator(basic_iterator< parent_type2 > const &rhs) noexcept
Constructor for const version from non-const version.
Definition: repeat.hpp:244
~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:275
basic_iterator(basic_iterator const &)=default
Defaulted.
The type returned by seqan3::views::repeat.
Definition: repeat.hpp:45
constexpr sentinel_type end() noexcept
Returns an iterator to the element following the last element of the range.
Definition: repeat.hpp:151
~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:48
ptrdiff_t difference_type
The type to store the difference of two iterators.
Definition: repeat.hpp:67
std::default_sentinel_t sentinel_type
The sentinel type is set to std::default_sentinel_t.
Definition: repeat.hpp:51
constexpr repeat_view(value_t const &value)
Construct from any type (Note: the value will be copied into views::single).
Definition: repeat.hpp:99
repeat_view()=default
Defaulted.
constexpr const_iterator begin() const noexcept
Returns an iterator to the first element of the range.
Definition: repeat.hpp:131
value_type const & const_reference
The const reference type.
Definition: repeat.hpp:65
decltype(std::views::single(std::declval< value_t >())) single_value_t
The view which wraps the single value to repeat.
Definition: repeat.hpp:54
single_value_t single_value
}
Definition: repeat.hpp:196
constexpr const_reference operator[](difference_type const n) const noexcept
Returns the n-th element.
Definition: repeat.hpp:182
repeat_view(repeat_view const &)=default
Defaulted.
constexpr iterator begin() noexcept
Returns an iterator to the first element of the range.
Definition: repeat.hpp:125
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:103
constexpr reference operator[](difference_type const n) noexcept
Returns the n-th element.
Definition: repeat.hpp:188
constexpr sentinel_type end() const noexcept
Returns an iterator to the element following the last element of the range.
Definition: repeat.hpp:157
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:342
Provides various transformation traits for use on iterators.
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
The SeqAn namespace for views.
Definition: char_strictly_to.hpp:22
SeqAn specific customisations in the standard namespace.
Provides the seqan3::detail::random_access_iterator class.
View factory definition for views::repeat.
Definition: repeat.hpp:288
constexpr auto operator()(value_type &&value) const
Returns an instance of seqan3::detail::repeat_view constructed with value.
Definition: repeat.hpp:291