Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::ranges::iota_view<W, Bound>::end

      From cppreference.com
      <cpp‎ |ranges‎ |iota view
       
       
      Ranges library
      Range adaptors
       
      std::ranges::iota_view
      Member functions
      iota_view::end
      Deduction guides
      Nested classes
      Iterator
      Helper concepts
      Member types
      Member functions
      Non-member functions
      Sentinel
      Member functions
      Non-member functions
       
      constexprauto end()const;
      (1)(since C++20)
      constexpr/*iterator*/ end()const requiresstd::same_as<W, Bound>;
      (2)(since C++20)
      1) Obtains asentinel representing the sentinel value:
      2) Obtains aniterator to the sentinel value.

      [edit]Return value

      1) As specified above.
      2)iterator {bound_ }

      [edit]Example

      Run this code
      #include <iostream>#include <ranges> int main(){auto iota{std::views::iota(2,6)};auto end{iota.end()};for(auto iter{iota.begin()}; iter!= end;++iter)std::cout<<*iter<<' ';std::cout<<'\n';}

      Output:

      2 3 4 5
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/iota_view/end&oldid=176918"

      [8]ページ先頭

      ©2009-2025 Movatter.jp