Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::ranges::split_view<V,Pattern>::end

      From cppreference.com
      <cpp‎ |ranges‎ |split view
       
       
      Ranges library
      Range adaptors
       
       
      constexprauto end()const;
      (since C++20)

      Returns aniterator or asentinel representing the end of the resulting subrange. Equivalent to:

      constexprauto end()
      {
         ifconstexpr(ranges::common_range<V>)
             return
       iterator{*this,ranges::end(base_),{}};
         else
             return
       sentinel{*this};
      }

      [edit]Return value

      Aniterator or asentinel.

      [edit]Example

      Run this code
      #include <cassert>#include <ranges>#include <string_view> int main(){constexprstd::string_view keywords{"bitand bitor bool break"};    std::ranges::split_view kw{keywords,' '};assert(4== std::ranges::distance(kw.begin(), kw.end()));}

      [edit]See also

      returns an iterator to the beginning
      (public member function)[edit]
      returns an iterator or a sentinel to the end
      (public member function ofstd::ranges::lazy_split_view<V,Pattern>)[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/split_view/end&oldid=179911"

      [8]ページ先頭

      ©2009-2025 Movatter.jp