std::promise::operator=(3)
okay so welcome to std::promise::operator= from the C++ Standard Libary manual π
yes bestie, that's the vibe, let's get into it.
π NAME
The original NAME line is literally std::promise::operator= - std::promise::operator=, and honestly? no notes. π
β¨ Synopsis β¨
promise& operator=( promise&& other ) noexcept; (1) (since C++11)
promise& operator=( const promise& rhs ) = delete; (2) (since C++11)
Assigns the contents. that's the whole assignment agenda, no cap π
- Move assignment operator. First, abandons the shared state (as in
~promise()), then assigns the shared state ofotheras if by executingstd::promise(std::move(other)).swap(*this). highkey iconic behavior π₯ promiseis not copy-assignable. periodt.
π¨ real talk: item 2 is not a suggestion β promise is not copy-assignable.
π Parameters
otherβ anotherpromiseto acquire the state from π«Ά
π«Ά Return value
*this β that's it, that's the return value, literally the main character returning itself β¨
mwah π β source/version/date: http://cppreference.com, 2024.06.10, std::promise::operator=(3). byeee bestie π¦
π¦ 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