std::future::operator=(3)
π NAME π
okay so bestie, this is the <pink>std::future::operator=</pink> page β page (3), from the C++ Standard Libary manual β and itβs literally all about assigning one std::future to another. slay. β¨
π¦ Synopsis π¦
future& operator=( future&& other ) noexcept; (1) (since C++11)
future& operator=( const future& other ) = delete; (2) (since C++11)
Assigns the contents of another future object. yes bestie, thatβs the whole assignment vibe. π
- Number 1, the move-assign era β releases any shared state and move-assigns the contents of
otherto*this. After the assignment,other.valid() == falseandthis->valid()will yield the same value asother.valid()before the assignment. iconic behavior, honestly. π - Number 2, the deleted copy-assign one β
std::futureis notCopyAssignable. like, not even a little bit. π
bestie, do not try to copy-assign astd::futureβ that one is= delete, periodt. π
πΈ Parameters πΈ
otherβ astd::futurethat will transfer state to*this. sheβs giving main character energy and handing over the state. π¦
π Return value π
*this
thatβs it. thatβs the return. no cap. β¨
thatβs the whole vibe, bestie π
β this oneβs from cppreference.com, dated/versioned 2024.06.10. mwah π«Ά
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms