Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::ranges::chunk_view<V>::end

      From cppreference.com
      <cpp‎ |ranges‎ |chunk view
       
       
      Ranges library
      Range adaptors
       
      std::ranges::chunk_view
      Member functions
      chunk_view::end
      Classes forinput_ranges
      Deduction guides
      outer-iterator
      outer-iterator::value_type
      inner-iterator
       
      V models onlyinput_range
      constexprstd::default_sentinel_t end()constnoexcept;
      (1)(since C++23)
      constexprauto end() requires(!__simple_view<V>);
      (2)(since C++23)
      constexprauto end()const requiresranges::forward_range<const V>;
      (3)(since C++23)

      Returns aniterator or astd::default_sentinel that compares equal to the end iterator of thechunk_view.

      1) Available only ifV modelsinput_range. Equivalent to:returnstd::default_sentinel.
      2,3) Available ifV modelsforward_range. Letbase_ denote the underlying adapted view,n_ denote the stored chunk size, anditerator denote the nested iterator class.
      2) Equivalent to
      ifconstexpr(ranges::common_range<V>&&ranges::sized_range<V>){auto missing=(n_-ranges::distance(base_)% n_)% n_;return iterator<false>(this,ranges::end(base_), missing);}elseifconstexpr(ranges::common_range<V>&&!ranges::bidirectional_range<V>)return iterator<false>(this,ranges::end(base_));elsereturnstd::default_sentinel;
      3) Equivalent to
      ifconstexpr(ranges::common_range<const V>&&ranges::sized_range<const V>){auto missing=(n_-ranges::distance(base_)% n_)% n_;return iterator<true>(this,ranges::end(base_), missing);}elseifconstexpr(ranges::common_range<const V>&&!ranges::bidirectional_range<const V>)return iterator<true>(this,ranges::end(base_));elsereturnstd::default_sentinel;

      [edit]Return value

      An iterator or sentinel representing the end of thechunk_view, as described above.

      [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/chunk_view/end&oldid=181235"

      [8]ページ先頭

      ©2009-2025 Movatter.jp