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

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

πŸ’– NAME πŸ’–

std::ranges::join_view::sentinel β€” std::ranges::join_view::sentinel. That’s the whole name, bestie, no notes πŸ’….

This is the std::ranges...w::sentinel(3) page from the C++ Standard Libary manual, and it’s giving very specific C++20 sentinel energy ✨.


✨ Synopsis ✨

template< bool Const >  (since C++20)
class /*sentinel*/      (exposition only*)

Okay so std::ranges::join_view::sentinel is the return type of join_view::end when either of the underlying ranges (V or ranges::range_reference_t<V>) is not a common_range, or when the parent join_view is not a forward_range. That’s the vibe check 🫢.

If V is not a simple view, Const is true for sentinels returned from the const overloads, and false otherwise. If V is a simple view, Const is true. No cap πŸ’….


πŸŽ€ Member types πŸŽ€

Both of these member types are private and exposition-only, so peek respectfully bestie:

  • Parent (private) β€” const ranges::join_view<V> if Const is true, otherwise ranges::join_view<V>. (exposition-only member type*)
  • Base (private) β€” const V if Const is true, otherwise V. (exposition-only member type*)

πŸ¦‹ Data members πŸ¦‹

Only one data member object here, and she’s private + exposition-only:

  • end_ (private) β€” a sentinel of type std::sentinel_t<Base> obtained from (possibly const-qualified) V. (exposition-only member object*)

🌸 Member functions 🌸

  • constructor β€” constructs a sentinel (public member function).

πŸ’œ Non-member functions πŸ’œ

  • operator== (C++20) β€” compares a sentinel with an iterator returned from join_view::begin (function).

That’s the entire page, bestie 🫢. Source/version: cppreference.com; date: 2024.06.10. The sentinel said slay and logged off πŸ‘‘βœ¨.

πŸ“¦ where this page comes from