KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Trying the make simple piece of code work: std::thread threadFoo; std::thread&& threadBar = std::thread(threadFunction); threadFoo = threadBar; // thread& operator=( thread&& other ); expected to be called Getting an error: use of deleted function 'std::thread& std::thread::operator=(const std::thread&)' I explicitly define threadBar as an rvalue reference, not a ordinary one. Why is not expected operator being called? How do I move one thread to another? Thank you!
Tags (comma-separated)
Save Edits
Cancel