# std::ranges::take_while_view<V,Pred>::pred

From cppreference.com
< cpp‎ | ranges‎ | take while view

constexpr const Pred& pred() const; |  | (since C++20)

Returns a reference to the stored predicate.

If *this does not store a predicate (e.g. an exception is thrown on the assignment to *this, which copy-constructs or move-constructs a `Pred`), the behavior is undefined.

### Parameters

(none)

### Return value

a reference to the stored predicate

### Example

| This section is incomplete Reason: no example

Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/take_while_view/pred&oldid=132598"