[range.enumerate.overview]

# 25 Ranges library [[ranges]](./#ranges)

## 25.7 Range adaptors [[range.adaptors]](range.adaptors#range.enumerate.overview)

### 25.7.24 Enumerate view [[range.enumerate]](range.enumerate#overview)

#### 25.7.24.1 Overview [range.enumerate.overview]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L10790)

enumerate_view is a view whose
elements represent both the position and value from
a sequence of elements[.](#1.sentence-1)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L10796)

The name views​::​enumerate denotes a range adaptor object ([[range.adaptor.object]](range.adaptor.object "25.7.2 Range adaptor objects"))[.](#2.sentence-1)

Given a subexpression E,
the expression views​::​enumerate(E) is expression-equivalent toenumerate_view<views​::​all_t<decltype((E))>>(E)[.](#2.sentence-2)

[*Example [1](#example-1)*: vector<int> vec{ 1, 2, 3 };for (auto [index, value] : views::enumerate(vec)) cout << index << ":" << value << ' '; // prints 0:1 1:2 2:3 â *end example*]
