Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::ranges::enumerate_view<V>::end

      From cppreference.com
      <cpp‎ |ranges‎ |enumerate view
       
       
      Ranges library
      Range adaptors
       
      std::ranges::enumerate_view
      Member functions
      enumerate_view::end
      Deduction guides
      Nested classes
      Iterator
      Sentinel
       
      constexprauto end() requires(!__simple_view<V>);
      (1)(since C++23)
      constexprauto end()const requires/*range-with-movable-references*/<const V>;
      (2)(since C++23)

      Returns aniterator or asentinel that compares equal to the end iterator of theenumerate_view.

      Letbase_ denote the underlying view.

      1) Equivalent to:
      ifconstexpr(ranges::forward_range<V> andranges::common_range<V>  andranges::sized_range<V>)return/*iterator*/<false>(ranges::end(base_),ranges::distance(base_));elsereturn/*sentinel*/<false>(ranges::end(base_));
      2) Equivalent to:
      ifconstexpr(ranges::forward_range<const V> andranges::common_range<const V>  andranges::sized_range<const V>)return/*iterator*/<true>(ranges::end(base_),ranges::distance(base_));elsereturn/*sentinel*/<true>(ranges::end(base_));

      Contents

      [edit]Parameters

      (none)

      [edit]Return value

      Aniterator or asentinel representing the end of theenumerate_view, as described above.

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]Defect reports

      The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

      DRApplied toBehavior as publishedCorrect behavior
      LWG 3919C++23ranges::distance may invoke UB for sized common
      non-forward underlying ranges
      sentinel type is returned for such ranges

      [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/enumerate_view/end&oldid=170783"

      [8]ページ先頭

      ©2009-2025 Movatter.jp