std::corout...::operator=(3)

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

πŸ’… std::coroutine_handle::operator= πŸ’…

okay so this is the std::corout...::operator=(3) page from the C++ Standard Libary manual, section 3 β€” yes bestie, we're talking about std::coroutine_handle::operator=, and it's giving assignment-operator main character energy.

🌸 NAME 🌸

std::coroutine_handle::operator= β€” std::coroutine_handle::operator=

✨ Synopsis ✨

okay so there are three overloads, and all of them are since C++20. Here's exactly how the page lays them out, line breaks and all β€” I am not touching them, periodt:

          coroutine_handle& operator=( std::nullptr_t ) noexcept;
       (1) (since C++20)
          coroutine_handle& operator=( const coroutine_handle& other ) =
       (2) (since C++20)
          default;
          coroutine_handle& operator=( coroutine_handle&& other ) = default;
       (3) (since C++20)

Replaces the underlying address. That's the whole vibe. 🫢

  • 1) Replaces the underlying address with a null pointer value. After assignment, *this does not refer to a coroutine. This assignment operator is not declared for specialization std::coroutine_handle<std::noop_coroutine_promise>. πŸ’€
  • 2,3) Replaces the underlying address with the one of other. Copy and move assignment operators are equivalent to implicitly declared ones. slay.

πŸŽ€ Parameters πŸŽ€

  • other β€” another coroutine_handle to assign from.

🌈 Return value 🌈

*this β€” that's it, that's the return value. πŸ‘‘


mwah πŸ’‹ source: http://cppreference.com, version date 2024.06.10, and this page is std::corout...::operator=(3). bye bestie! πŸ¦‹

πŸ“¦ where this page comes from