std::ranges...view::begin(3)

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

🌸 NAME 🌸

std::ranges::transform_view::begin β€” std::ranges::transform_view::begin

Hey bestie πŸ’– welcome to the std::ranges...view::begin(3) page from the C++ Standard Libary manual (yes, that spelling is iconic and we're keeping it πŸŽ€). This is all about std::ranges::transform_view::begin β€” the little member that hands you an iterator to the first element of a transform_view, no cap.


✨ Synopsis ✨

          constexpr /*iterator*/<false> begin();
       (1) (since C++20)
          constexpr /*iterator*/<true> begin() const

            requires ranges::range<const V> &&
       (2) (since C++20)

                     std::regular_invocable<const F&,
          ranges::range_reference_t<const V>>;

Both overloads are (since C++20) 🌈. And yeah, overload 2 has that whole requires clause vibe going on β€” it's right there in the block above, bestie πŸ’….

It returns an iterator to the first element of the transform_view ✨.

  1. Equivalent to return /*iterator*/<false>{*this, ranges::begin(base_)};, where base_ is the underlying view.
  2. Equivalent to return /*iterator*/<true>{*this, ranges::begin(base_)};, where base_ is the underlying view.

πŸ’¬ Parameters πŸ’¬

(none) β€” literally nothing to pass here, bestie 🫢.


πŸ¦‹ Return value πŸ¦‹

Iterator to the first element. That's it. That's the whole serve πŸ’….


πŸŽ€ Example πŸŽ€

This section is incomplete Reason: no example

Not me wishing there was an example 😭 β€” but fr fr, the page says it's incomplete and gives the reason as no example.


πŸ‘€ See also πŸ‘€

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

🏷️ Category 🏷️

  • Todo no example

That's the whole vibe check, bestie 🫢 β€” source/version/date energy: http://cppreference.com Β· 2024.06.10 Β· std::ranges...view::begin(3) πŸ’–βœ¨

πŸ“¦ where this page comes from