std::experi...::sentinel_t(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

Okay so, welcome to the C++ Standard Libary manual page for std::experi...::sentinel_t(3) β€” aka the group-chat title for std::experimental::ranges::iterator_t, std::experimental::ranges::sentinel_t 🫢✨

The NAME is literally this whole combo, no cap: std::experimental::ranges::iterator_t,std::experimental::ranges::sentinel_t β€” and yes, the original page says the same thing twice, so we're keeping that energy. It's giving β€œname so nice they listed it twice” πŸ’….


✨ Synopsis ✨

Defined in header <experimental/ranges/range> β€” write that down, bestie, it's important πŸ“.

          template< class T >                                             (1)
       (ranges TS)
          using iterator_t = decltype(ranges::begin(std::declval<T&>()));
          template< class T >                                             (2)
       (ranges TS)
          using sentinel_t = decltype(ranges::end(std::declval<T&>()));

So here's the tea β˜•: these two aliases are how you obtain the iterator and sentinel types of a range T. Literally that's the whole vibe β€” iterator_t and sentinel_t, both (ranges TS), both defined in that header, both doing their little decltype magic. Obsessed. 🌸


Source/version: cppreference.com, dated 2024.06.10. Mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from