cpp/header/ranges

This header is part of the ranges library.

Namespace aliases
The namespace alias is provided as a shorthand for.

Helper concepts
Note: The following names are only for exposition, they are not part of the interface.

Class template std
{{source|1= template requires __range_with_movable_references class enumerate_view : public view_interface> { V base_ = V; // exposition only template class iterator; // exposition only template class sentinel; // exposition only public: constexpr enumerate_view requires default_initializable = default; constexpr explicit enumerate_view(V base); constexpr auto begin requires(!__simple_view) { return iterator (ranges::begin(base_), 0); } constexpr auto begin const requires __range_with_movable_references { return iterator (ranges::begin(base_), 0); } constexpr auto end requires(!__simple_view) { if constexpr (common_range && sized_range) return iterator (ranges::end(base_), ranges::distance(base_)); else return sentinel (ranges::end(base_)); } constexpr auto end const requires __range_with_movable_references { if constexpr (common_range && sized_range) return iterator (ranges::end(base_), ranges::distance(base_)); else return sentinel (ranges::end(base_)); } constexpr auto size requires sized_range { return ranges::size(base_); } constexpr auto size const requires sized_range { return ranges::size(base_); } constexpr V base const& requires copy_constructible<V> { return base_; } constexpr V base && { return std::move(base_); } }; template<class R> enumerate_view(R&&) -> enumerate_view<views::all_t<R>>; } }}