Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::ranges::stride_view<V>::end

      From cppreference.com
      <cpp‎ |ranges‎ |stride view
       
       
      Ranges library
      Range adaptors
       
      std::ranges::stride_view
      Member functions
      stride_view::end
      Deduction guides
      Iterator
      Member functions
      Non-member functions
       
      constexprauto end() requires(!/*simple-view*/<V>);
      (1)(since C++23)
      constexprauto end()const requiresranges::range<const V>
      (2)(since C++23)

      Returns aniterator or asentinel representing the end of thestride_view.

      Letbase_ andstride_ be the underlying data members.

      1) LetConst be defined asusing Const=false; andBase asusing Base= V;.
      2) LetConst be defined asusing Const=true; andBase asusing Base=const V;.

      Equivalent to:

      ifconstexpr(ranges::common_range<Base>&&ranges::sized_range<Base>&&ranges::forward_range<Base>){auto missing=(stride_-ranges::distance(base_)% stride_)% stride_;return iterator<Const>(this,ranges::end(base_), missing);}elseifconstexpr(ranges::common_range<Base>&&!ranges::bidirectional_range<Base>){return iterator<Const>(this,ranges::end(base_));}else{returnstd::default_sentinel;}

      Contents

      [edit]Parameters

      (none)

      [edit]Return value

      Aniterator to the element following the last element, if the underlying viewV modelscommon_range. Otherwise, thestd::default_sentinel which compares equal to the end iterator.

      [edit]Notes

      stride_view<V> modelscommon_range whenever the underlying viewV does.

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      returns an iterator to the beginning
      (public member function)[edit]
      returns a sentinel indicating the end of a range
      (customization point object)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/stride_view/end&oldid=172650"

      [8]ページ先頭

      ©2009-2025 Movatter.jp