std::experi...e::operator=(3)
This is the std::experi...e::operator=(3) page, folded in from the C++ Standard Libary manual (yes, that spelling is straight from the header, bestie β not me π). Itβs giving two overloads, one job: assign a shared_future.
π NAME
std::experimental::shared_future::operator= - std::experimental::shared_future::operator=
Yeah. The NAME section really does say it twice. We love a self-referential moment. β¨
β¨ Synopsis
std::experimental::shared_future<T>& operator=( const
(1)
std::experimental::shared_future<T>& other );
std::experimental::shared_future<T>& operator=(
(2)
std::experimental::shared_future<T>&& other ) noexcept;
Okay so the synopsis block above is exactly as the page gives it, line breaks and all β Iβm not touching that. Overload (1) takes const std::experimental::shared_future<T>& other. Overload (2) takes std::experimental::shared_future<T>&& other and is marked noexcept.
Both overloads assign the contents of another std::experimental::shared_future object.
- Releases any shared state and assigns the contents of
otherto*this. After the assignment,this->valid() == other.valid(). - 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.
πΈ Parameters
otherβ astd::experimental::shared_futureobject to assign from.
π Return value
The return value is literally just *this. Thatβs it. Thatβs the whole vibe. π«Ά
mwah π thatβs the page β from http://cppreference.com, dated 2024.06.10, for std::experi...e::operator=(3). Bye 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