Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::ranges::zip_transform_view<F,Views...>::iterator<Const>::operator[]

      From cppreference.com
      <cpp‎ |ranges‎ |zip transform view‎ |iterator
       
       
      Ranges library
      Range adaptors
       
      std::ranges::zip_transform_view
      Member functions
      Deduction guides
      Iterator
      Member functions
      zip_transform_view::iterator::operator[]
      Non-member functions
      Sentinel
      Member functions
      Non-member functions
       
      constexpr decltype(auto) operator[]( difference_type n)const
          requiresranges::random_access_range<Base>;
      (since C++23)

      Returns the element at specified relative location, after transformation.

      Equivalent to

      returnstd::apply([&]<class...Is>(const Is&...iters)-> decltype(auto){returnstd::invoke(*parent_->fun_, iters[std::iter_difference_t<Is>(n)]...);},        inner_.current_);

      where*parent_->fun_ is the transformation function of typeF stored in the parentranges::zip_transform_view, andcurrent_ is the underlying tuple of iterators intoViews....

      Contents

      [edit]Parameters

      n - position relative to current location.

      [edit]Return value

      The element which is the result of transformation (mapping).

      [edit]Notes

      The behavior is undefined if theparent_ pointer to parentranges::zip_transform_view is null (e.g. if*this is default constructed).

      [edit]Example

      This section is incomplete
      Reason: no example
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/zip_transform_view/iterator/operator_at&oldid=142004"

      [8]ページ先頭

      ©2009-2025 Movatter.jp