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

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

okay so bestie, welcome to the page for std::experi...::operator=(3) β€” that's the title, and yes we're in the C++ Standard Libary manual. πŸ’… This one is about assigning one std::experimental::future to another, and it's giving "move me, don't copy me" energy. ✨

🌸 NAME 🌸

  • std::experimental::future::operator= β€” std::experimental::future::operator= (yes, the NAME section literally does the double-tap, iykyk 🫢)

πŸŽ€ Synopsis πŸŽ€

          std::experimental::future<T>& operator=(
       std::experimental::future<T>&& other ) (1)
          noexcept;
          std::experimental::future<T>& operator=( const
       std::experimental::future<T>&    (2)
          other ) = delete;

It assigns the contents of another future object. That's the whole vibe. πŸ¦‹

  1. Overload (1) releases any shared state and move-assigns the contents of other to *this. After the assignment, other.valid() == false and this->valid() will yield the same value as other.valid() before the assignment. No cap. πŸ’–
  2. Overload (2): std::experimental::future is not CopyAssignable. So this one is = delete;, periodt. πŸ’€

🧚 Parameters 🧚

  • other β€” a std::experimental::future that will transfer state to *this. It's the one handing over the state, main character energy. πŸ‘‘

🌈 Return value 🌈

  • *this β€” that's the return value, literally. πŸŽ€

kisses and sparkles, bestie: this page is from http://cppreference.com and it's dated 2024.06.10. πŸ’œ

πŸ“¦ where this page comes from