std::stop_token::stop_token - cppreference.com (original) (raw)
| 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.
Constructs an empty
stop_tokenwith no associated stop-state.Copy constructor. Constructs a
stop_tokenwhose associated stop-state is the same as that of other.Move constructor. Constructs a
stop_tokenwhose associated stop-state is the same as that of other; other is left empty.
[edit] Parameters
| other | - | another stop_token object to construct this stop_token object with |
|---|
[edit] Postconditions
stop_possible() and stop_requested() are both false.
*this and other share the same associated stop-state and compare equal.
*this has other's previously associated stop-state, and other.stop_possible() is false.