std::ranges..._view::base(3)

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

πŸ’– NAME πŸ’–

std::ranges::elements_view::base β€” okay bestie, that’s the function, and the page name is literally the same thing twice: std::ranges::elements_view::base and std::ranges::elements_view::base. We love a consistent queen πŸ’….

Welcome to the std::ranges..._view::base(3) page from the C++ Standard Libary manual β€” yes, that’s the manual name, keep it cute πŸŽ€.


πŸ¦‹ Synopsis πŸ¦‹

Two overloads, both since C++20, no cap:

          constexpr V base() const& requires std::copy_constructible<V>; (1)
       (since C++20)
          constexpr V base() &&;                                         (2)
       (since C++20)

Here’s the tea: this whole thing returns a copy of the underlying view. Overload (1) copy constructs the result from the underlying view. Overload (2) move constructs the result from the underlying view. That’s it, that’s the vibe ✨.


🌸 Parameters 🌸

(none) β€” zero, nada, empty group chat energy 🫢.


πŸŽ€ Return value πŸŽ€

A copy of the underlying view. Yep, exactly that β€” a copy of the underlying view πŸ’–.


🧚 Example 🧚

This section is incomplete Reason: no example

Not me waiting for an example that never arrives 😭. The manpage said what it said.


🌈 Category 🌈

  • Todo no example

The category tag is doing the most, and honestly? Same.


Source vibe: cppreference.com Β· date on the page: 2024.06.10 Β· manual: C++ Standard Libary β€” bye bestie, hydrate and ship it πŸ’…πŸ’–

πŸ“¦ where this page comes from