|
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.
|
A non-consuming transform view preserving reentrancy. More...
#include <jh/ranges/vis_transform_view.h>
Classes | |
| struct | iterator |
| Iterator type implementing the transformation projection. More... | |
Public Types | |
| using | traits = jh::concepts::range_storage_traits<R, false> |
Public Member Functions | |
| vis_transform_view (R &&base, F func) | |
Construct a vis_transform_view over a base range and callable. | |
| constexpr auto | begin () const |
| Obtain a constant iterator to the beginning of the transformed range. | |
| constexpr auto | end () const |
| Obtain a constant sentinel or iterator to the end of the range. | |
| constexpr auto | begin () |
| constexpr auto | end () |
Public Attributes | |
| traits::stored_t | base_ |
| F | func_ |
A non-consuming transform view preserving reentrancy.
| R | The underlying range type. |
| F | The callable transformation type. |
This view wraps a base range and lazily applies a callable to each element. Unlike std::ranges::transform_view, it does not consume the range. The resulting iteration can be repeated safely, provided the base range itself is reentrant.
|
inline |
Construct a vis_transform_view over a base range and callable.
| base | The input range. |
| func | The transformation function. |