std::ranges...ew::sentinel(3)
π NAME π
std::ranges::split_view::sentinel β thatβs the whole name, bestie π. Weβre in the C++ Standard Libary manual (yes, βLibaryβ is literally how the page header spells it, no cap π«Ά), and this page is all about the sentinel type for std::ranges::split_view.
β¨ Synopsis β¨
class /*sentinel*/; (since C++20)
(exposition only*)
So this is the return type of split_view::end when the underlying view type (V) does not model common_range β like, itβs the special end-y type for that situation. π
π Member functions π
- constructor β constructs a sentinel (C++20) (public member function) β¨
π¦ std::ranges::split_view::sentinel::sentinel π¦
/*sentinel*/() = default; (1)
(since C++20)
constexpr explicit /*sentinel*/( ranges::split_view& parent ); (2)
(since C++20)
- Value-initializes
end_via its default member initializer (= ranges::sentinel_t<V>()). - Initializes
end_withranges::end(parent.base_).
π Non-member functions π
operator==β compares the underlying iterator and the underlying sentinel (C++20) (function) π₯
π operator==(std::ranges::split_view::iterator, std::ranges::split_view::sentinel) π
friend constexpr bool operator==( const /*iterator*/& x,
const /*sentinel*/& y );
(since C++20)
Equivalent to return x.cur_ == y.end_ and !x.trailing_empty_; β thatβs the whole vibe check. π«Ά
The != operator is synthesized from operator==.
This function is not visible to ordinary unqualified or qualified lookup, and can only be found by argument-dependent lookup when std::ranges::split_view::sentinel is an associated class of the arguments. π
thatβs the page, bestie π source: http://cppreference.com Β· version/date: 2024.06.10 Β· manual page: std::ranges...ew::sentinel(3) πβ¨
π¦ 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