std::execution::let_value(3)

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

🌸 NAME 🌸

Hiii bestie!! πŸ’– This is std::execution::let_value(3), folded in from the C++ Standard Libary manual (yes, that’s the manual name β€” spelling and all, no cap).

std::execution::let_value - std::execution::let_value β€” yep, the name is the name, iconic. πŸ‘‘


✨ Synopsis ✨

Okay so here’s the signature in all its glory, bestie:

Defined in header <execution>
execution::sender auto let_value(

    execution::sender auto input,                      (since C++26)
    std::invocable<values-sent-by(input)...> function

);

πŸŽ€ Parameters πŸŽ€

  • input β€” a sender which once executed sends the values upon which the function executes. πŸ’…
  • function β€” an invocable to be called with the values from the input sender. 🫢

πŸ‘‘ Return value πŸ‘‘

Returns a sender describing the task graph described by the input sender, with an added node of invoking the provided function with the values sent by the input sender as arguments. 🌟

let_value is similar to then, however, where the sender returned from then sends exactly what that function ends up returning β€” let_value requires that the function returns a sender, and the sender returned by let_value sends the values sent by the sender returned from the callback. Periodt. πŸ’…πŸ”₯


Bye bestie!! πŸ¦‹ Source/version/date sign-off: http://cppreference.com Β· 2024.06.10 Β· std::execution::let_value(3) πŸ’–βœ¨

πŸ“¦ where this page comes from