| ||||||||||||||||||||||
| Range primitives | |||||||
| |||||||
| Range concepts | |||||||||||||||||||
| |||||||||||||||||||
| Range factories | |||||||||
| |||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Helper items | |||||||||||||||||
| |||||||||||||||||
| Member functions | ||||
enumerate_view::end | ||||
(C++26) | ||||
| Deduction guides | ||||
| Nested classes | ||||
| Iterator | ||||
| Sentinel | ||||
constexprauto end() requires(!__simple_view<V>); | (1) | (since C++23) |
constexprauto end()const requires/*range-with-movable-references*/<const V>; | (2) | (since C++23) |
Returns aniterator or asentinel that compares equal to the end iterator of theenumerate_view.
Letbase_ denote the underlying view.
ifconstexpr(ranges::forward_range<V> andranges::common_range<V> andranges::sized_range<V>)return/*iterator*/<false>(ranges::end(base_),ranges::distance(base_));elsereturn/*sentinel*/<false>(ranges::end(base_));
ifconstexpr(ranges::forward_range<const V> andranges::common_range<const V> andranges::sized_range<const V>)return/*iterator*/<true>(ranges::end(base_),ranges::distance(base_));elsereturn/*sentinel*/<true>(ranges::end(base_));
Contents |
(none)
Aniterator or asentinel representing the end of theenumerate_view, as described above.
| This section is incomplete Reason: no example |
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 3919 | C++23 | ranges::distance may invoke UB for sized commonnon-forward underlying ranges | sentinel type is returned for such ranges |
| returns an iterator to the beginning (public member function)[edit] | |
(C++20) | returns a sentinel indicating the end of a range (customization point object)[edit] |