std::stop_s...e::operator=(3)

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

πŸ’– NAME πŸ’–

std::stop_source::operator= β€” literally std::stop_source::operator=, bestie. This page is from the C++ Standard Libary man pages (yes, β€œLibary” β€” we’re keeping the spelling exactly 🫢).

🌸 Synopsis 🌸

Okay so here’s the assignment situation, and it’s giving β€œstop-state handoff” energy:

  • (1) (since C++20) β€” copy assignment: std::stop_source& operator=( const std::stop_source& other ) and it’s noexcept; ✨
  • (2) (since C++20) β€” move assignment: std::stop_source& operator=( std::stop_source&& other ) noexcept; πŸ”₯

Both of these replace the stop-state with that of other.

  1. Copy assignment (1) β€” copy-assigns the stop-state of other to that of *this. Equivalent to:
stop_source(other).swap(*this)
  1. Move assignment (2) β€” move-assigns the stop-state of other to that of *this. After the assignment, *this contains the previous stop-state of other, and other has no stop-state. Equivalent to:
stop_source(std::move(other)).swap(*this)

πŸ¦‹ Parameters πŸ¦‹

  • other β€” another stop_source object to share the stop-state with to or acquire the stop-state from. Yes, that’s the exact wording, bestie πŸ˜­πŸ’…

Source/version/date cutie check: http://cppreference.com, 2024.06.10, and the page header is std::stop_s...e::operator=(3). Bye bestie, go assign those stop-states responsibly πŸ’œπŸŽ€

πŸ“¦ where this page comes from