std::packag...k::operator=(3)
π NAME π
okay bestie, welcome to the std::packag...k::operator= page from the C++ Standard Libary π β yes, itβs exactly what it sounds like: std::packaged_task::operator=.
β¨ Synopsis β¨
No cap, here are the signatures, verbatim:
packaged_task& operator=( const packaged_task& ) = delete; (1) (since C++11)
packaged_task& operator=( packaged_task&& rhs ) noexcept; (2) (since C++11)
- Copy assignment operator is deleted,
std::packaged_taskis move-only. - Releases the shared state, if any, destroys the previously-held task, and moves the shared state and the task owned by
rhsinto*this.rhsis left without a shared state and with a moved-from task.
π¦ Parameters π¦
rhsβ thestd::packaged_taskto move from
πΈ Example πΈ
This section is incomplete.
Reason: no example.
π Defect reports π
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
- DR:
LWG 2067β Applied to:C++11β Behavior as published: the parameter type of the copy assignment operator waspackaged_task&β Correct behavior: addedconst
π Category π
- Todo no example
fr fr, thatβs the whole page β short, sweet, and very move-only πβ¨
source/version: http://cppreference.com, dated 2024.06.10, for std::packag...k::operator=(3) β slay, thatβs the sign-off π«Άπ
π¦ 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