iew:: _iterator_ ::operator*
](/w/cpp/ranges/repeat_view/iterator#Member_functions "cpp/ranges/repeat
view/iterator")  
[ repeat_view:: _iterator_ ::operator[]
](/w/cpp/ranges/repeat_view/iterator#Member_functions "cpp/ranges/repeat
view/iterator")  
[ repeat_view:: _iterator_ ::operator++  
repeat_view:: _iterator_ ::operator++  (int)  
](/w/cpp/ranges/repeat_view/iterator#Member_functions "cpp/ranges/repeat
view/iterator")  
[ repeat_view:: _iterator_ ::operator--  
repeat_view:: _iterator_ ::operator--  (int)  
](/w/cpp/ranges/repeat_view/iterator#Member_functions "cpp/ranges/repeat
view/iterator")  
[ repeat_view:: _iterator_ ::operator+=
](/w/cpp/ranges/repeat_view/iterator#Member_functions "cpp/ranges/repeat
view/iterator")  
[ repeat_view:: _iterator_ ::operator-=
](/w/cpp/ranges/repeat_view/iterator#Member_functions "cpp/ranges/repeat
view/iterator")  
[ Non-member functions ](/w/cpp/ranges/repeat_view/iterator#Non-
member_functions "cpp/ranges/repeat view/iterator")  
[ operator==  (repeat_view:: _iterator_ )  
operator<=> (repeat_view:: _iterator_ )
](/w/cpp/ranges/repeat_view/iterator#Non-member_functions "cpp/ranges/repeat
view/iterator")  
[ operator+  (repeat_view:: _iterator_ )
](/w/cpp/ranges/repeat_view/iterator#Non-member_functions "cpp/ranges/repeat
view/iterator")  
[ operator-  (repeat_view:: _iterator_ )
](/w/cpp/ranges/repeat_view/iterator#Non-member_functions "cpp/ranges/repeat
view/iterator")  
  
[ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/repeat_view/navbar_content&action=edit)

Defined in header ` [ <ranges> ](/w/cpp/header/ranges "cpp/header/ranges") ` |  |   
---|---|---  
template  < [ std::  move_constructible
](http://en.cppreference.com/w/cpp/concepts/move_constructible) W,  
[ std::  semiregular  ](http://en.cppreference.com/w/cpp/concepts/semiregular)
Bound  =  [ std::  unreachable_sentinel_t
](http://en.cppreference.com/w/cpp/iterator/unreachable_sentinel_t) >  
requires  (  [ std::  is_object_v
](http://en.cppreference.com/w/cpp/types/is_object) < W  > && [ std::  same_as
](http://en.cppreference.com/w/cpp/concepts/same_as) < W, [ std::  remove_cv_t
](http://en.cppreference.com/w/cpp/types/remove_cv) < W  >> &&  
(  /*is-integer-like*/  < Bound  > ||  
[ std::  same_as  ](http://en.cppreference.com/w/cpp/concepts/same_as) <
Bound, [ std::  unreachable_sentinel_t
](http://en.cppreference.com/w/cpp/iterator/unreachable_sentinel_t) > )  )  
class  repeat_view  :  public  [ ranges::  view_interface  ](http://en.cppreference.com/w/cpp/ranges/view_interface) < repeat_view  < W, Bound  >> |  (1)  |  (since C++23)   
namespace  views  {  
inline  constexpr  /*unspecified*/  repeat  =  /*unspecified*/  ;  
}  |  (2)  |  (since C++23)   
Call signature  |  |   
template  < class  W  >  
requires  /* see below */  
constexpr  /* see below */  repeat  (  W  && value  )  ;  |  |  (since C++23)   
template  < class  W,  class  Bound  >  
requires  /* see below */  
constexpr  /* see below */  repeat  (  W  && value, Bound  && bound  )  ;  |  |  (since C++23)   
|  |   
  
1)  A range factory that generates a sequence of elements by repeatedly
producing the same value. Can be either bounded or unbounded (infinite).

2)  views  ::  repeat  (  e  )  and  views  ::  repeat  (  e, f  )  are [
expression-equivalent ](/w/cpp/language/expressions#Expression-equivalence
"cpp/language/expressions") to (has the same effect as)  repeat_view  (  e  )
and  repeat_view  (  e, f  )  respectively for any suitable subexpressions  e
and  f  .

##  Contents

  * 1  Customization point objects 
  * 2  Data members 
  * 3  Member functions 
    * 3.1  Inherited from  std::ranges::view_interface 
  * 4  std::ranges::repeat_view::  repeat_view 
    * 4.1  Parameters 
  * 5  std::ranges::repeat_view::  begin 
  * 6  std::ranges::repeat_view::  end 
  * 7  std::ranges::repeat_view::  size 
    * 7.1  Deduction guides 
    * 7.2  Nested classes 
    * 7.3  Notes 
    * 7.4  Example 
    * 7.5