std::execution::let_error(3)

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

πŸ’– NAME πŸ’–

std::execution::let_error β€” yes bestie, that's the name, and this page is from the C++ Standard Libary manual (spelled exactly like that in the header, no cap 🫢).


✨ Synopsis ✨

Okay so it's defined in the header <execution>, and here's the signature β€” keep it exact, bestie:

execution::sender auto let_error(

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

);

πŸŽ€ Parameters πŸŽ€

  • input β€” the sender that, once an error occurs, sends the errors to function.
  • function β€” the invocable to be called with the errors if an error occurs by 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 errors sent by the input sender, if an error occurs. That's the whole vibe, periodt πŸ’…


That's the page, bestie πŸŽ€ from cppreference.com, dated 2024.06.10 β€” std::execution::let_error(3) and we're out πŸ’‹βœ¨

πŸ“¦ where this page comes from