81 [[nodiscard]]
constexpr reference dereference() const noexcept;
82 constexpr
void increment() noexcept;
83 constexpr
void decrement() noexcept;
86 [[nodiscard]] constexpr
bool equal(const
self_type& rhs) const noexcept;
87 [[nodiscard]] constexpr
bool less_than(const
self_type& rhs) const noexcept;
89 const T* m_value =
nullptr;
114 std::is_nothrow_constructible_v<typename storage_traits::storage_type, typename storage_traits::constructor_reference>
118 std::is_nothrow_move_constructible_v<value_type>
120 requires(!std::is_reference_v<T>);
126 [[nodiscard]] constexpr
size_t size() const noexcept;
130 [[nodiscard]] constexpr const
value_type& stored_value() const noexcept;
136 template <typename T>
139 template <typename T>
142 template <typename T>
149 template <
typename T>
150 constexpr auto repeat_view_iterator<T>::dereference() const noexcept ->
reference
155 template <
typename T>
156 constexpr void repeat_view_iterator<T>::increment() noexcept
161 template <
typename T>
167 template <
typename T>
173 template <
typename T>
179 template <
typename T>
182 return m_index == rhs.m_index;
185 template <
typename T>
188 return m_index < rhs.m_index;
191 template <
typename T>
193 std::is_nothrow_constructible_v<typename storage_traits::storage_type, typename storage_traits::constructor_reference>
200 template <
typename T>
202 std::is_nothrow_move_constructible_v<value_type>
204 requires(!std::is_reference_v<T>)
205 : m_value(std::move(value))
210 template <
typename T>
212 repeat_view<T>::stored_value() const noexcept
214 return storage_traits::get(m_value);
217 template <
typename T>
223 template <
typename T>
229 template <
typename T>
235 template <
typename T>
241 template <
typename T>
sparrow::iterator_base< self_type, const T, std::random_access_iterator_tag > base_type
constexpr repeat_view_iterator(const T &value, size_t index)
Constructs a repeat_view_iterator.
repeat_view_iterator< T > self_type
std::random_access_iterator_tag iterator_category
friend class iterator_access
typename base_type::reference reference
constexpr repeat_view_iterator()=default
typename base_type::difference_type difference_type
A view that repeats a value a given number of times.
constexpr size_t size() const noexcept
typename storage_traits::value_type value_type
constexpr const_iterator begin() const noexcept
detail::repeat_view_storage_traits< T > storage_traits
constexpr repeat_view(typename storage_traits::constructor_reference value, size_t count) noexcept(std::is_nothrow_constructible_v< typename storage_traits::storage_type, typename storage_traits::constructor_reference >)
Constructs a repeat_view.
constexpr const_iterator cend() const noexcept
constexpr const_iterator cbegin() const noexcept
repeat_view< T > self_type
repeat_view_iterator< value_type > const_iterator
constexpr const_iterator end() const noexcept
repeat_view(T &, size_t) -> repeat_view< T & >
Extensions to the C++ standard library.
value_type & constructor_reference
std::remove_reference_t< T > value_type
std::reference_wrapper< value_type > storage_type
static constexpr const value_type & get(const storage_type &value) noexcept
static constexpr const value_type & get(const storage_type &value) noexcept
const value_type & constructor_reference