std::ranges...h_view::end(3)

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

std::ranges...h_view::end(3) ✨

okay bestie, welcome to the C++ Standard Libary manual page for std::ranges::join_with_view::end β€” yes, the header abbreviates it as std::ranges...h_view::end(3), and it’s section 3. We’re keeping the manual name exactly as it appears in the header, spelling and all, no cap πŸ’….


πŸ’– NAME

std::ranges::join_with_view::end - std::ranges::join_with_view::end

(the manual really says it twice; iconic repetition, we respect it 🫢)

πŸ“œ Synopsis

constexpr auto end();

(1) β€” since C++23 ✨

constexpr auto end() const

  requires ranges::input_range<const V> &&
           ranges::forward_range<const Pattern> &&
           std::is_reference_v<ranges::range_reference_t<const V>>;

(2) β€” since C++23 ✨

Okay so what does it do? It returns an iterator or a sentinel that compares equal to the end iterator of the join_with_view. That’s the whole vibe, bestie.

Let base_ denote the underlying view:

1) Equivalent to:

if constexpr (ranges::forward_range<V> &&
              std::is_reference_v<ranges::range_reference_t<V>> &&
              ranges::forward_range<ranges::range_reference_t<V>> &&
              ranges::common_range<V> &&
              ranges::common_range<ranges::range_reference_t<V>>)
    return /*iterator*/<__SimpleView<V> &&
__SimpleView<Pattern>>{*this, ranges::end(base_)};
else
    return /*sentinel*/<__SimpleView<V> &&
__SimpleView<Pattern>>{*this};

2) Equivalent to:

if constexpr (ranges::forward_range<const V> &&
              ranges::forward_range<ranges::range_reference_t<const V>> &&
              ranges::common_range<const V> &&
              ranges::common_range<ranges::range_reference_t<const V>>)
    return /*iterator*/<true>{*this, ranges::end(base_)};
else
    return /*sentinel*/<true>{*this};

πŸŽ›οΈ Parameters

(none) β€” literally no parameters, bestie, not a single one. clean.

🎁 Return value

An iterator or sentinel representing the end of the join_with_view, as described above. slay.

πŸ§ͺ Example

This section is incomplete. Reason: no example 😭

(the manual said it, not me β€” we’re not inventing one either, periodt πŸ’€)

πŸ‘€ See also

  • begin β€” returns an iterator to the beginning (C++23) (public member function)
  • ranges::end β€” returns a sentinel indicating the end of a range (C++20) (customization point object)

🏷️ Category

  • * Todo no example

(the manual put an asterisk and Todo, so here it is in all its unfinished glory πŸ’€)


k bye bestie πŸ’… β€” source/version: http://cppreference.com, date: 2024.06.10 (footer title: std::ranges...h_view::end(3)).

πŸ“¦ where this page comes from