std::ranges...m_view::end(3)
π std::ranges...m_view::end(3) π
okay bestie, welcome to the std::ranges...m_view::end(3) page from the C++ Standard Libary manual β yes, thatβs the exact manual name, typo and all, and the title really does have that ... in it. iconic behavior, no cap. π
β¨ NAME β¨
std::ranges::transform_view::end - std::ranges::transform_view::end.
π Synopsis π
constexpr /*sentinel*/<false> end();
(1) (since C++20)
constexpr /*iterator*/<false> end() requires
(2) (since C++20)
ranges::common_range<V>;
constexpr /*sentinel*/<true> end() const
requires ranges::range<const V> &&
(3) (since C++20)
std::regular_invocable<const F&,
ranges::range_reference_t<const V>>;
constexpr /*iterator*/<true> end() const
requires ranges::common_range<const V> &&
(4) (since C++20)
std::regular_invocable<const F&,
ranges::range_reference_t<const V>>;
So the vibe is: this gives you back a sentinel or an iterator that represents the end of the transform_view. Four overloads, all since C++20, and they are numbered (1) through (4). slay.
Let base_ be the underlying view. Hereβs what each overload is equivalent to, exactly:
(1)Equivalent toreturn /*sentinel*/<false>{ranges::end(base_)};.(2)Equivalent toreturn /*iterator*/<false>{*this, ranges::end(base_)};.(3)Equivalent toreturn /*sentinel*/<true>{ranges::end(base_)};.(4)Equivalent toreturn /*iterator*/<true>{*this, ranges::end(base_)};.
π«Ά Parameters π«Ά
(none) β literally no parameters, bestie. π«Ά
π Return value π
1,3)sentinel which compares equal to the end iterator2,4)iterator to the element following the last element
π¦ Notes π¦
end() returns an iterator if and only if the underlying view is a common_range:
transform_view<V,F> models common_range whenever V does.
Thatβs the whole tea. ββ¨
π Example π
This section is incompleteReason: no example
not me reading a whole manual page just to find out thereβs no example ππ
π See also π
beginβ returns an iterator to the beginning.(C++20)(public member function)ranges::endβ returns a sentinel indicating the end of a range.(C++20)(customization point object)
πΈ Category πΈ
Category: * Todo no example
mwah π β source/version/date sign-off: http://cppreference.com, 2024.06.10, and the page is std::ranges...m_view::end(3). π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms