std::ranges...le_view::end(3)
π
std::ranges...le_view::end(3) β C++ Standard Libary π
okay bestie, this is the end() page for take_while_view, and no cap itβs shorter than it looks β but every little constraint matters, so here we go π«Ά
πΈ NAME πΈ
std::ranges::take_while_view::end β std::ranges::take_while_view::end
β¨ Synopsis β¨
hereβs the exact synopsis vibe, both overloads since C++20:
constexpr auto end() requires (!__SimpleView<V>);
(1) (since C++20)
constexpr auto end() const requires
ranges::range<const V> &&
(2) (since C++20)
std::indirect_unary_predicate<const Pred,
ranges::iterator_t<const V>>;
it returns a sentinel representing the end of the view π
let base_ denote the underlying view. so like:
- overload (1) effectively returns
/*sentinel*/<false>(ranges::end(base_), std::addressof(pred())). - overload (2) effectively returns
/*sentinel*/<true>(ranges::end(base_), std::addressof(pred())).
β οΈ and listen: overload (1) does not participate in overload resolution ifVis a simple view β that is, ifVandconst Vare views with the same iterator and sentinel types. that constraint is iconic, donβt ignore it π
π Parameters π
none. zero. zilch. π«Ά
π Return value π
a sentinel representing the end of the view. periodt. β¨
π¦ Example π¦
This section is incomplete.
Reason: no example.
so yeah, no example here β the source literally says that π
π Defect reports π
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
- DR:
LWG 3450 - Applied to:
C++20 - Behavior as published: the const overload might return a sentinel constrained non-comparable to the iterator
- Correct behavior: (none shown separately in the source text)
π See also π
beginβ returns an iterator to the beginning (C++20) (public member function)operator==β compares a sentinel with an iterator returned fromtake_while_view::begin(C++20) (function)
π Category π
Todo no example
made with π from http://cppreference.com, dated 2024.06.10, for std::ranges...le_view::end(3) β bye bestie, go read the constraints again πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms