std::stop_t...::stop_token(3)

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

🌸 std::stop_t...::stop_token(3) 🌸

okay so bestie, this is the <std::stop_token::stop_token> page from the C++ Standard Libary manual, section 3, and it’s giving β€œconstructors for a stop_token” energy. periodt. πŸ’–

✨ NAME ✨

std::stop_token::stop_token β€” std::stop_token::stop_token πŸŽ€

πŸ¦‹ Synopsis πŸ¦‹

stop_token() noexcept;                          (1) (since C++20)
stop_token( const stop_token& other ) noexcept; (2) (since C++20)
stop_token( stop_token&& other ) noexcept;      (3) (since C++20)

Constructs a new stop_token object. 🫢

  1. no cap, this one constructs an empty stop_token with no associated stop-state. ✨
  2. copy constructor behavior: constructs a stop_token whose associated stop-state is the same as that of other. πŸ’–
  3. move constructor behavior: constructs a stop_token whose associated stop-state is the same as that of other; other is left empty. πŸ’…

πŸŽ€ Parameters πŸŽ€

  • other β€” another stop_token object to construct this stop_token object with. 🌸

πŸ’œ Postconditions πŸ’œ

  1. stop_possible() and stop_requested() are both false. πŸ™ˆ
  2. *this and other share the same associated stop-state and compare equal. πŸ’–
  3. *this has other's previously associated stop-state, and other.stop_possible() is false. πŸ’€

source/version: http://cppreference.com, date 2024.06.10, page std::stop_t...::stop_token(3). byeee bestie, go construct responsibly πŸ’…βœ¨

πŸ“¦ where this page comes from