ressions#Expression-
equivalence "cpp/language/expressions") to  stride_view  (  e, n  )  .

The ` n ` must be greater than  ​  0  ​  , otherwise the behavior is
undefined.

` stride_view ` always models [ ` input_range ` ](/w/cpp/ranges/input_range
"cpp/ranges/input range") , and models [ ` forward_range `
](/w/cpp/ranges/forward_range "cpp/ranges/forward range") , [ `
bidirectional_range ` ](/w/cpp/ranges/bidirectional_range
"cpp/ranges/bidirectional range") , [ ` random_access_range `
](/w/cpp/ranges/random_access_range "cpp/ranges/random access range") , and/or
[ ` sized_range ` ](/w/cpp/ranges/sized_range "cpp/ranges/sized range") , if
adapted [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") type  V  models the
corresponding concept.  stride_view  < V  > models [ ` common_range `
](/w/cpp/ranges/common_range "cpp/ranges/common range") whenever the
underlying view  V  does.

##  Contents

  * 1  Data members 
  * 2  Member functions 
    * 2.1  Inherited from  std::ranges::view_interface 
  * 3  Deduction guides 
  * 4  Nested classes 
  * 5  Helper templates 
  * 6  Notes 
  * 7  Example 
  * 8  References 
  * 9  See also 

  
---  
  
###  [ [ edit
](/mwiki/index.php?title=cpp/ranges/stride_view&action=edit&section=1 "Edit
section: Data members") ]  Data members

Member object  |  Definition   
---|---  
` _base__ ` (private)  |  The underlying [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") of type ` V ` .   
(  exposition-only member object*  )  
` _stride__ ` (private)  |  The size object (the "stride") of type  [ ranges::  range_difference_t  ](http://en.cppreference.com/w/cpp/ranges/iterator_t) < V  > .   
(  exposition-only member object*  )  
  
###  [ [ edit
](/mwiki/index.php?title=cpp/ranges/stride_view&action=edit&section=2 "Edit
section: Member functions") ]  Member functions

[ (constructor)  ](/w/cpp/ranges/stride_view/stride_view "cpp/ranges/stride view/stride view") (C++23)  |  constructs a ` stride_view `   
(public member function)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/adaptor/dsc_constructor&action=edit)  
---|---  
[ stride  ](/w/cpp/ranges/stride_view/stride "cpp/ranges/stride view/stride") (C++23)  |  returns the stored stride value   
(public member function)  
[ base  ](/w/cpp/ranges/stride_view/base "cpp/ranges/stride view/base") (C++23)  |  returns a copy of the underlying (adapted) view   
(public member function)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/adaptor/dsc_base&action=edit)  
[ begin  ](/w/cpp/ranges/stride_view/begin "cpp/ranges/stride view/begin") (C++23)  |  returns an iterator to the beginning   
(public member function)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/adaptor/dsc_begin&action=edit)  
[ end  ](/w/cpp/ranges/stride_view/end "cpp/ranges/stride view/end") (C++23)  |  returns an iterator or a sentinel to the end   
(public member function)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/adaptor/dsc_end&action=edit)  
[ size  ](/w/cpp/ranges/stride_view/size "cpp/ranges/stride view/size") (C++23)  |  returns the number of elements. Provided only if the underlying (adapted) range satisfies [ ` sized_range ` ](/w/cpp/ranges/sized_range "cpp/ranges/sized range") .   
(public member function)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/adaptor/dsc_size&action=edit)  
  
#####  Inherited from  [ std::ranges::view_interface
](/w/cpp/ranges/view_interface "cpp/ranges/view interface")  
  
[ empty  ](/w/cpp/ranges/view_interface/empty "cpp/ranges/view interface/empty") (C++20)  |  returns whether the derived view is empty. Provided if it satisfies [ ` sized_range ` ](/w/cpp/ranges/sized_range "cpp/ranges/sized range") or [ ` forward_range ` ](/w/cpp/ranges/forward_range "cpp/ranges/forward range") .   
(public member function of ` std::ranges::view_interface<D> ` )  [ [edit]
](https:/