std::ranges::transform_view<V,F>::iterator

From cppreference.com
 
 
 
 
template< bool Const >
class /*iterator*/
(since C++20)

The return type of transform_view::begin, and of tranform_view::end when the underlying view is a common_range.

The type /*iterator*/<true> is returned by the const-qualified overloads. The type /*iterator*/<false> is returned by the non-const-qualified overloads.

The name of this class template (shown here as /*iterator*/) is unspecified.

Typical implementation holds two data members: an iterator into (possibly const-qualified) V, and a pointer to parent transform_view.

Member types

Member type Definition
Parent(private) const transform_view<V, F> if Const is true, otherwise transform_view<V, F>. The name is for exposition only
Base(private) const V if Const is true, otherwise V. The name is for exposition only
iterator_concept std::random_access_iterator_tag if V models random_access_range,
std::bidirectional_iterator_tag if V models bidirectional_range,
std::forward_iterator_tag if V models forward_range,
std::input_iterator_tag otherwise
iterator_category If std::invoke_result_t<F&, ranges::range_reference_t<Base>> is not an lvalue reference, std::input_iterator_tag.

Else, let C be std::iterator_traits<ranges::iterator_t<Base>>::iterator_category. If C is std::contiguous_iterator_tag, the type is std::random_access_iterator_tag; otherwise, the type is C.

value_type std::remove_cvref_t<std::invoke_result_t<F&, ranges::range_reference_t<Base>>>
difference_type ranges::range_difference_t<Base>

Member functions

constructs an iterator
(public member function)
returns the underlying iterator
(public member function)
accesses the transformed element
(public member function)
accesses an element by index
(public member function)
advances or decrements the underlying iterator
(public member function)

Non-member functions

compares the underlying iterators
(function)
performs iterator arithmetic
(function)
obtains an rvalue reference to the transformed element
(function)
swaps the elements pointed to by the underlying iterators
(function)