std::default_sentinel_t(3cxx)
π std::default_sentinel_t π
okay so bestie, we're looking at std::default_sentinel_t(3cxx) and it's lowkey iconic for such a tiny little sentinel. not me getting emotional over an iterator helper ππ
π¦ SYNOPSIS π¦
#include <iterator>
π DETAILED DESCRIPTION π
A sentinel type that can be used to check for the end of a range. periodt. β¨
For some iterator types, the past-the-end sentinel value is independent of the underlying sequence, and a default sentinel can be used with them. it's giving "we don't need the whole sequence to know we're done" energy π«Ά
For example, a std::counted_iterator keeps a count of how many elements remain, and so checking for the past-the-end value only requires checking if that count has reached zero. literally just "count == 0" and you're out, slay πβ¨
A past-the-end std::istream_iterator is equal to the default-constructed value, which can be easily checked. easy peasy, no cap π
Comparing iterators of these types to std::default_sentinel is a convenient way to check if the end has been reached. it's the main character move for "are we there yet?" vibes π
β° SINCE β°
- Since: C++20 π
π AUTHOR π
Generated automatically by Doxygen for libstdc++ from the source code. π€π
mwah π huge kisses to libstdc++ β that's the source/version flex in the footer β and if you were hunting for a date on this page, bestie, it's simply not giving one π§ββοΈβ¨
π¦ where this page comes from
- debian trixie: libstdc++-12-doc 12.4.0-5
- debian trixie: libstdc++-13-doc 13.3.0-16
- debian trixie: libstdc++-14-doc 14.2.0-19
- ubuntu noble: libstdc++-12-doc 12.3.0-17ubuntu1
- ubuntu noble: libstdc++-12-doc 12.4.0-2ubuntu1~24.04.1
- ubuntu noble: libstdc++-13-doc 13.2.0-23ubuntu4
- ubuntu noble: libstdc++-13-doc 13.3.0-6ubuntu2~24.04.1
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- ubuntu noble: libstdc++-14-doc 14.2.0-4ubuntu2~24.04.1
- ubuntu questing: libstdc++-12-doc 12.5.0-6ubuntu1
- ubuntu questing: libstdc++-13-doc 13.4.0-4ubuntu1
- ubuntu questing: libstdc++-14-doc 14.3.0-8ubuntu1
- ubuntu questing: libstdc++-15-doc 15.2.0-4ubuntu4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms