Range adaptor that creates an enumerate view, optionally starting at a selected index.
More...
|
| template<detray::ranges::range range_t> |
| constexpr auto | operator() (range_t &&rng) |
| | Call operator for range composition.
|
|
constexpr | enumerate ()=default |
| | Partial construction for range composition.
|
| constexpr | enumerate (incr_t start) |
| | Create an adaptor that starts enumeration at start.
|
template<detray::ranges::range range_t>
requires (!std::same_as<range_t, enumerate>) |
| constexpr | enumerate (range_t &&rng) |
| | Direct view constructionCreate a view starting at zero.
|
| template<detray::ranges::range range_t> |
| constexpr | enumerate (range_t &&rng, incr_t start) |
| | Create a view starting at start.
|
| template<detray::ranges::range deduced_range_t, typename volume_t, typename = typename std::remove_reference_t<volume_t>::volume_def> |
| | enumerate (deduced_range_t &&range, const volume_t &vol) |
| | Enumerate the portion of range covered by vol, using its first index.
|
|
constexpr | enumerate_view ()=default |
| | Default constructor (only works if imrementable_t is default constructible).
|
| constexpr auto | begin () -> iterator |
| constexpr auto | end () const -> iterator |
| constexpr decltype(auto) | back () const |
| | Return a reference to the last element.
|
| constexpr auto | data () const |
| | Return a pointer to the first element, or null for an empty view.
|
| constexpr auto | empty () const -> bool |
| | Check whether the view contains no elements.
|
| constexpr decltype(auto) | front () const |
| | Return a reference to the first element.
|
| constexpr | operator bool () const |
| | Test whether the view contains at least one element.
|
| constexpr decltype(auto) | operator[] (const dindex i) const |
| | Subscript operator that takes detray dindex.
|
| constexpr auto | size () const |
| | Return the number of elements in the view.
|
template<std::input_iterator range_itr_t, std::incrementable incr_t = dindex>
requires std::convertible_to<std::iter_difference_t<range_itr_t>, incr_t>
struct detray::ranges::views::enumerate< range_itr_t, incr_t >
Range adaptor that creates an enumerate view, optionally starting at a selected index.