std::ranges::transform_view<V,F>::iterator::operator[] - cppreference.com (original) (raw)

Returns the element at specified relative location, after transformation.

Effectively returns std::invoke(*parent_->fun_, current_[n]), where *parent_->fun_ is the transformation function stored in the parent transform_view, and current_ is the underlying iterator into V.

[edit] Parameters

n - position relative to current location.

[edit] Return value

the transformed element

[edit] Example