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

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

🌸 NAME 🌸

std::ranges::adjacent_view::end β€” std::ranges::adjacent_view::end

okay so bestie, this is the std::ranges::adjacent_view::end page from the C++ Standard Libary manual, and it's <highkey>giving β€œend of the view” realness</highkey>. We're gonna get you comfy with it, no cap. πŸ’…


πŸ’« Synopsis πŸ’«

constexpr auto end() requires (!__SimpleView<V>);           (1)

since C++23

constexpr auto end() const requires ranges::range<const V>; (2)

since C++23

Returns an iterator or a sentinel representing the end of the adjacent_view.

Let base_ be the underlying view.

  1. Equivalent to:
        if constexpr (ranges::common_range<V>)
            return /*iterator*/<false>(__as_sentinel{}, ranges::begin(base_),
       ranges::end(base_));
        else
            return /*sentinel*/<false>(ranges::end(base_));
  1. Equivalent to:
        if constexpr (ranges::common_range<const V>)
            return /*iterator*/<true>(__as_sentinel{}, ranges::begin(base_),
       ranges::end(base_));
        else
            return /*sentinel*/<true>(ranges::end(base_));

🧚 Parameters 🧚

(none) β€” literally no parameters, bestie. Clean. ✨

πŸ” Return value πŸ”

An iterator to the element following the last element, if the underlying view V models common_range. Otherwise, a sentinel which compares equal to the end iterator. That's the whole tea. πŸ«–

πŸ“ Notes πŸ“

ranges::adjacent_view<V,N> models common_range whenever the underlying view V does. iykyk πŸ’œ

πŸŽ€ Example πŸŽ€

This section is incomplete.

Reason: no example

bestie, they really left us hanging on this one 😭

πŸ‘€ 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

and that's the whole page, bestie πŸ’– β€” footer tea: std::ranges...nt_view::end(3), source http://cppreference.com, dated 2024.06.10. byeee 🫢✨

πŸ“¦ where this page comes from