std::ranges...w::sentinel(3)
β¨ NAME β¨
std::ranges::filter_view::sentinel β std::ranges::filter_view::sentinel
okay so bestie, welcome to the std::ranges...w::sentinel(3) page from the C++ Standard Libary manual. Today's main character is std::ranges::filter_view::sentinel, and she is lowkey an exposition-only icon π
π¦ Synopsis π¦
class /*sentinel*/; (since C++20)
(exposition only*)
the vibe: this is the return type of filter_view::end when the underlying view type (V) does not model common_range. no cap, that's the condition π«Ά
π Member functions π
- constructor β constructs a sentinel.
(C++20)(public member function) - base β returns the underlying sentinel.
(C++20)(public member function)
πΈ std::ranges::filter_view::sentinel::sentinel πΈ
/*sentinel*/() = default; (1) (since C++20)
constexpr explicit /*sentinel*/( filter_view& parent ); (2) (since C++20)
- Value-initializes
end_via its default member initializer (= ranges::sentinel_t<V>()). - Initializes
end_withranges::end(parent.base_).
π std::ranges::filter_view::sentinel::base π
constexpr ranges::sentinel_t<V> base() const; (since C++20)
Equivalent to return end_;. literally that's the whole function, and she ate π
π Non-member functions π
operator==β compares the underlying iterator and the underlying sentinel.(C++20)(function)
β¨ operator==(std::ranges::filter_view::iterator, std::ranges::filter_view::sentinel) β¨
friend constexpr bool operator==( const /*iterator*/& x, (since C++20)
const /*sentinel*/& y );
Equivalent to return x.current_ == y.end_;, where current_ is the underlying iterator wrapped in filter_view::iterator.
The != operator is synthesized from operator==. freebie behavior, iykyk π
heads up: this function is not visible to ordinary unqualified or qualified lookup, and can only be found by argument-dependent lookup when std::ranges::filter_view::sentinel is an associated class of the arguments. so don't just go searching for her anywhere, bestie π
and that's the page, babes π
source: cppreference.com, version/date: 2024.06.10 β cute little sign-off from the std::ranges...w::sentinel(3) manual, periodt ππ¦β¨
π¦ 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