std::ranges...w::sentinel(3)

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

πŸ’… NAME πŸ’…

std::ranges::elements_view::sentinel β€” std::ranges::elements_view::sentinel. yes bestie, the name is literally right there twice and it's serving symmetry πŸ’–. This is the page for it in the C++ Standard Libary manual.


✨ Synopsis ✨

okay so here's the whole shape of it, no cap:

template< bool Const >  (exposition only*)
class /*sentinel*/;

The return type of elements_view::end when the underlying view is not a common_range πŸ‘€.

The type /*sentinel*/<true> is returned by the const-qualified overload. The type /*sentinel*/<false> is returned by the non-const-qualified overload. periodt πŸ’….


πŸŽ€ Member types πŸŽ€

  • Member type: Base (private) β€” Definition: const V if Const is true, otherwise V. (exposition-only member type*)

πŸ¦‹ Data members πŸ¦‹

  • Member object: end_ (private) β€” Definition: a sentinel obtained from (possibly const-qualified) V. (exposition-only member object*)

🌸 Member functions 🌸

  • constructor β€” constructs a sentinel (public member function).
  • base (C++20) β€” returns the underlying sentinel (public member function).

🌈 Non-member functions 🌈

  • operator== (C++20) β€” compares a sentinel with an iterator returned from elements_view::begin (function).
  • operator- (C++20) β€” computes the distance between a sentinel and an iterator returned from elements_view::begin (function).

source/version/date vibes: http://cppreference.com Β· 2024.06.10 Β· page std::ranges...w::sentinel(3) β€” bye bestie, go read your ranges docs πŸ’–πŸ«Άβœ¨

πŸ“¦ where this page comes from