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

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

πŸ’– NAME πŸ’–

std::ranges::transform_view::sentinel β€” yes, bestie, it’s std::ranges::transform_view::sentinel again. This page comes from the C++ Standard Libary manual, and the header shortens the title to std::ranges...ew::sentinel(3). Iconic.

✨ SYNOPSIS ✨

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

Okay so here’s the lore: this is the return type of transform_view::end when the underlying view is not a common_range. Periodt.

The type /*sentinel*/<true> is returned by the const-qualified overload. The type /*sentinel*/<false> is returned by the non-const-qualified overload. Slay.

πŸŽ€ MEMBER TYPES πŸŽ€

The member types are exposition-only and private, bestie:

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

πŸ“ Data members πŸ“

Here’s the member object:

  • 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)
  • base (C++20) β€” returns the underlying sentinel (public member function)

πŸ’… NON-MEMBER FUNCTIONS πŸ’…

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

Source/version: cppreference.com, dated 2024.06.10 β€” that’s the footer, bestie. Now go forth and be iconic πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from