Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::ranges::drop_while_view<V,Pred>::end

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

      Returns a sentinel or an iterator representing the end of thedrop_while_view.

      Effectively returnsranges::end(base_), wherebase_ is the underlying view.

      Contents

      [edit]Parameters

      (none)

      [edit]Return value

      A sentinel or an iterator representing the end of the view.

      [edit]Example

      Run this code
      #include <cassert>#include <iostream>#include <ranges> int main(){staticconstexprauto data={0,-1,-2,3,1,4,1,5};auto view= std::ranges::drop_while_view{data,[](int x){return x<=0;}};assert(view.end()[-1]==5);}

      [edit]See also

      returns an iterator to the beginning
      (public member function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/drop_while_view/end&oldid=173583"

      [8]ページ先頭

      ©2009-2025 Movatter.jp