|
JH-Toolkit v1.4.1
An engineering-oriented C++20 toolkit with duck-typed concepts, static design, async coroutines, and semantic containers — header-only, RTTI-free, and concurrency-friendly.
|
jh::ranges::views::enumerate — sequence-aware enumerate adaptor.
More...
#include "jh/ranges/views/zip.h"Go to the source code of this file.
Namespaces | |
| namespace | jh::ranges |
| Semantic pipeline namespace for JH range operations. | |
| namespace | jh::ranges::views |
| Range view adaptor implementations with explicit semantic control. | |
Variables | |
| constexpr detail::enumerate_fn | jh::ranges::views::enumerate {} |
| The user-facing enumerate adaptor. | |
jh::ranges::views::enumerate — sequence-aware enumerate adaptor.
This adaptor provides a Python-like enumerate view, implemented via jh::ranges::views::zip and std::views::iota. It pairs each element of a sequence with an increasing index.
Usage (same form as zip):
About index type (diff_t):
jh::concepts::sequence_difference_t<std::remove_cvref_t<Seq>>. difference_type, or supports subtraction (it - it), that type is used (they must be consistent if both exist). std::ptrdiff_t. difference_type and subtraction result) invalidate the type — such a type does not model jh::concepts::sequence. start is static_cast to diff_t; invalid conversions are ill-formed. zip. 1.3.x
2025