std::packag...k::operator=(3)

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

πŸŽ€ 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)
  1. Copy assignment operator is deleted, std::packaged_task is move-only.
  2. Releases the shared state, if any, destroys the previously-held task, and moves the shared state and the task owned by rhs into *this. rhs is left without a shared state and with a moved-from task.

πŸ¦‹ Parameters πŸ¦‹

  • rhs β€” the std::packaged_task to 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 was packaged_task& β€” Correct behavior: added const

πŸ“ 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