Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

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

      From cppreference.com
      <cpp‎ |ranges‎ |take while view
       
       
      Ranges library
      Range adaptors
       
       
      constexprauto end() requires(!/*simple-view*/<V>);
      (1)(since C++20)
      constexprauto end()const requires

         ranges::range<const V>&&

         std::indirect_unary_predicate<const Pred,ranges::iterator_t<const V>>;
      (2)(since C++20)

      Returns asentinel representing the end of the view.

      Letbase_ denote the underlying view.

      1) Effectively returns/*sentinel*/<false>(ranges::end(base_),std::addressof(pred())).
      2) Effectively returns/*sentinel*/<true>(ranges::end(base_),std::addressof(pred())).

      Overload(1) does not participate in overload resolution ifV is asimple view (that is, ifV andconst V are views with the same iterator and sentinel types).

      Contents

      [edit]Parameters

      (none)

      [edit]Return value

      Asentinel representing the end of the view.

      [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 3450C++20theconst overload might return a sentinel non-comparable to the iteratorconstrained

      [edit]See also

      returns an iterator to the beginning
      (public member function)[edit]
      (C++20)
      compares a sentinel with an iterator returned fromtake_while_view::begin
      (function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/take_while_view/end&oldid=173568"

      [8]ページ先頭

      ©2009-2025 Movatter.jp