std::thread::operator= - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::thread::operator=

From cppreference.com
< cpp‎ | thread‎ | thread

thread& operator=( thread&& other ); |  | (since C++11)

Assigns the state of `other` to *this using move semantics.

If *this still has an associated running thread (i.e. joinable() == true), std::terminate() is called.

### [edit] Parameters

other | - | another thread object to assign to this thread object

### [edit] Return value

*this

### [edit] Exceptions

`noexcept` specification:
noexcept
Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/thread/thread/operator%3D&oldid=63481"
Category:

- unconditionally noexcept