std::execut..._as_optional(3)

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

🌸 NAME 🌸

okay so bestie, you're on the std::execut..._as_optional(3) page from the C++ Standard Library, and the star of the show is std::execution::stopped_as_optional β€” and yes, the name is literally std::execution::stopped_as_optional. say it with your chest πŸ’…

✨ Synopsis ✨

Defined in header <execution>, and it's giving:

execution::sender auto stopped_as_optional(

    single-sender auto snd                   (since C++26)

);

and that (since C++26) is right there in the signature, bestie β€” not me making things up. 🫢

πŸŽ€ Parameters πŸŽ€

  • snd β€” the input sender, and her value channel plus stopped channel are the ones being mapped. that's the whole assignment. ✨

🌈 Return value 🌈

Returns a sender β€” and the way that sender behaves is the moment: it maps the value channel from a T to an std::optional<std::decay_t<T>>, and maps the stopped channel to a value of an empty std::optional<std::decay_t<T>>. no notes. πŸ‘‘


source/version: http://cppreference.com Β· date: 2024.06.10 β€” mwah, stay hydrated, bestie πŸ«ΆπŸ’–

πŸ“¦ where this page comes from