std::execution::just_error(3)

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

πŸ’– std::execution::just_error(3) πŸ’–

okay so bestie, welcome to the C++ Standard Libary manual page for std::execution::just_error ✨ (that’s the spelling from the header, not me being chaotic πŸ’…). This one is a tiny little sender-maker and it’s honestly giving β€œshort but important” energy.

🌸 NAME 🌸

std::execution::just_error β€” std::execution::just_error

like, that’s the name and the description, periodt πŸ’–

πŸ¦‹ Synopsis πŸ¦‹

Defined in header <execution>
execution::sender auto just_error( auto && error );  (since C++26)

slay, it’s a C++26 era function ✨

πŸŽ€ Parameters πŸŽ€

  • error β€” the input error which will be injected and returned by the receiver.

πŸ”₯ Return value πŸ”₯

Returns a sender with no completion schedulers, which sends the provided values. That’s the whole vibe: no schedulers, just sending the provided values πŸ’«

πŸ’œ Notes πŸ’œ

Important little details, bestie, pay attention:

  • If the provided error is an lvalue reference, a copy is made inside the returned sender and a non-const lvalue reference to the copy is sent to the receiver’s set_error.
  • If the provided value is an rvalue reference, it is moved into the returned sender and an rvalue reference to it is sent to the receiver’s set_error.

okay bye bestie 🫢 source: http://cppreference.com Β· version/date: 2024.06.10 Β· page: std::execution::just_error(3) πŸŽ€βœ¨

πŸ“¦ where this page comes from