std::ranges...::operator*(3)

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

πŸ¦‹ std::ranges::zip_transform_view::iterator::operator* πŸ¦‹

okay bestie, this is the C++ Standard Libary manual page for std::ranges...::operator*(3) β€” manual name folded in near the top so we’re not copy-pasting that header line like a boring NPC. It’s giving β€œiterator dereference but make it zip_transform_view,” and we’re keeping every technical crumb. πŸŽ€

✨ NAME ✨

std::ranges::zip_transform_view::iterator::operator* -
std::ranges::zip_transform_view::iterator::operator*

πŸ“œ Synopsis πŸ“œ

Signature tea, served exactly:

          constexpr decltype(auto) operator*() const  (since C++23)
              noexcept(/* see description */);

It returns the transformed element you get by applying the invocable object of type F to the underlying pointed-to elements.

Equivalent to:

        return
            std::apply
            (
                [&](auto const&... iters) -> decltype(auto)
                {
                    return std::invoke(*parent_->fun_, *iters...);
                },
                inner_.current_
            );

where *parent_->fun_ is the transformation function stored in the parent ranges::zip_transform_view, and current_ is the underlying tuple of iterators into Views....

🌸 Parameters 🌸

  • none. literally none. she takes no parameters. πŸ’…

πŸŽ€ Return value πŸŽ€

The element which is the result of transformation (mapping). Slay. ✨

πŸ”₯ Exceptions πŸ”₯

noexcept specification:

          noexcept(std::invoke(*parent_->fun_,
       *std::get<INTS>(inner_.current_)...))

where INTS is the pack of integers 0, 1, ..., (sizeof...(Views)-1).

πŸ¦‹ Notes πŸ¦‹

  • operator-> is not provided. nope, not invited to the function party. πŸ™ˆ
  • The behavior is undefined if the parent_ pointer to parent ranges::zip_transform_view is null (e.g. if *this is default constructed). This is a danger zone, bestie β€” don’t do it. πŸ’€

πŸ™ˆ Example πŸ™ˆ

This section is incomplete.

Reason: no example.

The manual said β€œno example” and honestly we respect the honesty. 😭

🏷️ Categories 🏷️

  • conditionally noexcept
  • Todo no example

🫢 that’s the page, bestie. Source/version: http://cppreference.com; date: 2024.06.10; page: std::ranges...::operator*(3). Periodt. πŸ’…

πŸ“¦ where this page comes from