[thread.thread.assign] (original) (raw)

32 Thread support library [thread]

32.4 Threads [thread.threads]

32.4.2 Class thread [thread.thread.class]

32.4.2.4 Assignment [thread.thread.assign]

🔗

thread& operator=(thread&& x) noexcept;

1

#

Effects:If joinable(), calls terminate().

Otherwise, assigns the state of x to *this and sets x to a default constructed state.

2

#

Postconditions: x.get_­id() == id() and get_­id() returns the value ofx.get_­id() prior to the assignment.

3

#

Returns: *this.