std::experi...es::identity(3)

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

πŸ’– std::experimental::ranges::identity πŸ’–

okay bestie, this page comes from the C++ Standard Libary manual (yes, β€œLibary” is literally how the header spells it β€” iconic typo, no notes), and the page label is std::experi...es::identity(3). We are talking about std::experimental::ranges::identity, the ranges TS girlie. It’s short. It’s powerful. Let’s go 🫢

🌸 NAME 🌸

std::experimental::ranges::identity β€” std::experimental::ranges::identity

✨ Synopsis ✨

Defined in header <experimental/ranges/functional>

struct identity;                                    (ranges TS)

ranges::identity is a function object type whose operator() returns its argument unchanged. It is used as the default projection for all Ranges TS algorithms.

πŸ’… Member functions πŸ’…

  • operator() β€” returns the argument unchanged (public member function)

πŸ¦‹ std::experimental::ranges::identity::operator() πŸ¦‹

template< class T >
constexpr T&& operator()( T&& t ) const noexcept;

Returns std::forward<T>(t).

πŸŽ€ Parameters πŸŽ€

  • t β€” argument to return

🌈 Return value 🌈

std::forward<T>(t).

πŸ“ Example πŸ“

This section is incomplete Reason: no example

πŸ’€ Category: πŸ’€

  • Todo no example

mwah πŸ’‹ β€” source http://cppreference.com, version/date 2024.06.10, footer label std::experi...es::identity(3). That’s the whole vibe check, bestie πŸ§šπŸ’œ

πŸ“¦ where this page comes from