Public Member Functions | |
template<typename Rng > | |
CPP_TEMPLATE_AUX_0 | c (requires viewable_range< Rng > &&input_range< Rng > &&constructible_from< range_value_t< Rng >, range_reference_t< Rng >>) ccconstexpr cache1_view< all_t< Rng >> operator()(Rng &&rng) const |
Caches the most recent element within the view so that dereferencing the view's iterator multiple times doesn't incur any recomputation. This can be useful in adaptor pipelines that include combinations of view::filter and view::transform , for instance. More... | |
Related Functions | |
(Note that these are not member functions.) | |
constexpr view_closure< cache1_fn > | cache1 {} |
CPP_TEMPLATE_AUX_0 ranges::views::cache1_fn::c | ( | requires viewable_range< Rng > &&input_range< Rng > &&constructible_from< range_value_t< Rng >, range_reference_t< Rng >> | ) | const && |
Caches the most recent element within the view so that dereferencing the view's iterator multiple times doesn't incur any recomputation. This can be useful in adaptor pipelines that include combinations of view::filter
and view::transform
, for instance.
views::cache1
is always single-pass.