/ranges/view "cpp/ranges/view") and produces a view of  [ tuple
](/w/cpp/utility/tuple "cpp/utility/tuple") s. ` i ` th  element (the tuple)
of the resulting sequence holds:

  * the value equal to ` i ` , which is a zero-based index of the element of underlying sequence, and 
  * the reference to the underlying element. 

2)  The name ` views::enumerate ` denotes a [ RangeAdaptorObject
](/w/cpp/named_req/RangeAdaptorObject "cpp/named req/RangeAdaptorObject") .
Given a subexpression  e  , the expression  views  ::  enumerate  (  e  )  is
[ expression-equivalent ](/w/cpp/language/expressions#Expression-equivalence
"cpp/language/expressions") to  enumerate_view  < [ views::  all_t
](http://en.cppreference.com/w/cpp/ranges/all_view) < decltype  (  (  e  )  )
>> (  e  )  for any suitable subexpression  e  .

3)  Ensures that the reference type of the underlying type can be moved.

` enumerate_view ` models the concepts [ ` random_access_range `
](/w/cpp/ranges/random_access_range "cpp/ranges/random access range") , [ `
bidirectional_range ` ](/w/cpp/ranges/bidirectional_range
"cpp/ranges/bidirectional range") , [ ` forward_range `
](/w/cpp/ranges/forward_range "cpp/ranges/forward range") , [ ` input_range `
](/w/cpp/ranges/input_range "cpp/ranges/input range") , [ ` common_range `
](/w/cpp/ranges/common_range "cpp/ranges/common range") , and [ ` sized_range
` ](/w/cpp/ranges/sized_range "cpp/ranges/sized range") when the underlying
view ` V ` models respective concepts.

##  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/enumerate_view&action=edit&section=1 "Edit
section: Data members") ]  Data members

Member name  |  Definition   
---|---  
` _base__ ` (private)  |  An iterator to the underlying sequence of type ` V ` .   
(  exposition-only member object*  )  
  
###  [ [ edit
](/mwiki/index.php?title=cpp/ranges/enumerate_view&action=edit&section=2 "Edit
section: Member functions") ]  Member functions

[ (constructor)  ](/w/cpp/ranges/enumerate_view/enumerate_view "cpp/ranges/enumerate view/enumerate view") (C++23)  |  constructs a ` enumerate_view `   
(public member function)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/adaptor/dsc_constructor&action=edit)  
---|---  
[ base  ](/w/cpp/ranges/enumerate_view/base "cpp/ranges/enumerate 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/enumerate_view/begin "cpp/ranges/enumerate 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/enumerate_view/end "cpp/ranges/enumerate 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/enumerate_view/size "cpp/ranges/enumerate 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