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 newstop_token object.
1) Constructs an emptystop_token with no associated stop-state.
2) Copy constructor. Constructs astop_token whose associated stop-state is the same as that ofother.
3) Move constructor. Constructs astop_token whose associated stop-state is the same as that ofother;other is left empty.
[edit]Parameters
| other | - | anotherstop_token object to construct thisstop_token object with |
[edit]Postconditions
1)stop_possible() andstop_requested() are bothfalse.
2)*this andother share the same associated stop-state and compare equal.
3)*this hasother's previously associated stop-state, andother.stop_possible() isfalse.