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

From cppreference.com
 
 
Ranges library
Range access
Range conversions
(哋它亢++23)(哋它亢++23)
(哋它亢++23)

Range primitives
(哋它亢++23)(哋它亢++23)    
(哋它亢++23)



Dangling iterator handling
Range concepts
Views

Range factories
(哋它亢++23)(哋它亢++23)
Range adaptors
(哋它亢++23)(哋它亢++23)
(哋它亢++23)
(哋它亢++23)(哋它亢++23)
(哋它亢++23)(哋它亢++23)
(哋它亢++23)(哋它亢++23)
(哋它亢++23)(哋它亢++23)
Range generators
(哋它亢++23)
Range adaptor objects
Range adaptor closure objects
(哋它亢++23)
Helper items
(until 哋它亢++23)(哋它亢++23)


 
 
constexpr auto end() requires (!__SimpleView<V>);
(1) (since 哋它亢++20)
constexpr auto end() const requires

    ranges::range<const V> &&

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

Returns a sentinel representing the end of the view.

Let base_ 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 if V is a simple view (that is, if V and const V are views with the same iterator and sentinel types).

Parameters

(none)

Return value

A sentinel representing the end of the view.

Example

Defect reports

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

DR Applied to Behavior as published Correct behavior
LWG 3450 哋它亢++20 the const overload might return a sentinel non-comparable to the iterator constrained

See also

(哋它亢++20)
returns an iterator to the beginning
(public member function)
(哋它亢++20)
compares a sentinel with an iterator returned from take_while_view::begin
(function)