sparrow 0.3.0
Loading...
Searching...
No Matches
sparrow::repeat_view< T > Class Template Reference

A view that repeats a value a given number of times. More...

#include <repeat_container.hpp>

Inheritance diagram for sparrow::repeat_view< T >:
[legend]
Collaboration diagram for sparrow::repeat_view< T >:
[legend]

Public Types

using value_type = T
 
using self_type = repeat_view<value_type>
 
using const_iterator = repeat_view_iterator<value_type>
 

Public Member Functions

constexpr repeat_view (const T &value, size_t count) noexcept
 Constructs a repeat_view.
 
constexpr const_iterator begin () const noexcept
 
constexpr const_iterator end () const noexcept
 
constexpr const_iterator cbegin () const noexcept
 
constexpr const_iterator cend () const noexcept
 
constexpr size_t size () const noexcept
 

Detailed Description

template<typename T>
class sparrow::repeat_view< T >

A view that repeats a value a given number of times.

Definition at line 67 of file repeat_container.hpp.

Member Typedef Documentation

◆ const_iterator

template<typename T>
using sparrow::repeat_view< T >::const_iterator = repeat_view_iterator<value_type>

Definition at line 73 of file repeat_container.hpp.

◆ self_type

template<typename T>
using sparrow::repeat_view< T >::self_type = repeat_view<value_type>

Definition at line 72 of file repeat_container.hpp.

◆ value_type

template<typename T>
using sparrow::repeat_view< T >::value_type = T

Definition at line 71 of file repeat_container.hpp.

Constructor & Destructor Documentation

◆ repeat_view()

template<typename T>
sparrow::repeat_view< T >::repeat_view ( const T & value,
size_t count )
constexprnoexcept

Constructs a repeat_view.

Parameters
valueThe value to repeat
countThe number of times to repeat the value

Definition at line 144 of file repeat_container.hpp.

Member Function Documentation

◆ begin()

template<typename T>
auto sparrow::repeat_view< T >::begin ( ) const
constexprnoexcept

Definition at line 151 of file repeat_container.hpp.

◆ cbegin()

template<typename T>
auto sparrow::repeat_view< T >::cbegin ( ) const
constexprnoexcept

Definition at line 163 of file repeat_container.hpp.

◆ cend()

template<typename T>
auto sparrow::repeat_view< T >::cend ( ) const
constexprnoexcept

Definition at line 169 of file repeat_container.hpp.

◆ end()

template<typename T>
auto sparrow::repeat_view< T >::end ( ) const
constexprnoexcept

Definition at line 157 of file repeat_container.hpp.

◆ size()

template<typename T>
size_t sparrow::repeat_view< T >::size ( ) const
nodiscardconstexprnoexcept

Definition at line 175 of file repeat_container.hpp.


The documentation for this class was generated from the following file: