Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::ranges::chunk_view<V>::outer-iterator::value_type

      From cppreference.com
      <cpp‎ |ranges‎ |chunk view‎ |outer iterator
       
       
      Ranges library
      Range adaptors
       
      std::ranges::chunk_view
      Member functions
      Classes forinput_ranges
      Deduction guides
      outer-iterator
      outer-iterator::value_type
      inner-iterator
       
      Defined in header<ranges>
      struct value_type: view_interface<value_type>
      (since C++23)

      A value type of the iteratorchunk_view::outer-iterator, formed whenV modelsinput_range.

      Contents

      [edit]Data members

      Member object Definition
      parent_(private) A pointer to the "parent object" of typeranges::chunk_view*
      (exposition-only member object*)

      [edit]Member functions

      constructs anvalue_type
      (public member function)
      (C++23)
      returns the beginningchunk_view::inner-iterator
      (public member function)
      (C++23)
      returns the default sentinel
      (public member function)
      (C++23)
      returns the size of the view
      (public member function)
      Inherited fromstd::ranges::view_interface
      returns whether the derived view is empty, provided only if it satisfiessized_range orforward_range
      (public member function ofstd::ranges::view_interface<D>)[edit]
      (C++23)
      returns a constant iterator to the beginning of the range
      (public member function ofstd::ranges::view_interface<D>)[edit]
      (C++23)
      returns a sentinel for the constant iterator of the range
      (public member function ofstd::ranges::view_interface<D>)[edit]
      returns whether the derived view is not empty, provided only ifranges::empty is applicable to it
      (public member function ofstd::ranges::view_interface<D>)[edit]

      std::ranges::chunk_view::outer-iterator::value_type::value_type

      private:

      // exposition only

      constexprexplicit value_type( chunk_view& parent);
      (since C++23)

      Constructs thevalue_type object so thatparent_ is initialized withstd::addressof(parent).

      Parameters

      parent - thechunk_view object

      std::ranges::chunk_view::outer-iterator::value_type::begin

      constexpr/*inner-iterator*/ begin()constnoexcept;
      (since C++23)

      Equivalent toreturn/*inner-iterator*/(*parent_);.

      std::ranges::chunk_view::outer-iterator::value_type::end

      constexprstd::default_sentinel_t end()constnoexcept;
      (since C++23)

      Equivalent toreturnstd::default_sentinel;.

      std::ranges::chunk_view::outer-iterator::value_type::size

      constexprauto size()const
          requiresstd::sized_sentinel_for<ranges::sentinel_t<V>,ranges::iterator_t<V>>;
      (since C++23)

      Returns the size of the view.

      Equivalent to
      return/*to-unsigned-like*/(
         ranges::min(parent_->remainder_,ranges::end(parent_->base_)-*parent_->current_));

      [edit]Example

      This section is incomplete
      Reason: example

      [edit]References

      • C++23 standard (ISO/IEC 14882:2024):
      • 26.7.28.4 Class chunk_view::outer-iterator::value_type [range.chunk.outer.value]

      [edit]See also

      the output ("chunk-wise") iterator type whenV modelsinput_range
      (exposition-only member class ofstd::ranges::chunk_view<V>*)
      the inner ("element-wise") iterator type whenV modelsinput_range
      (exposition-only member class ofstd::ranges::chunk_view<V>*)
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/chunk_view/outer_iterator/value_type&oldid=157783"

      [8]ページ先頭

      ©2009-2025 Movatter.jp