#include <iostream>
#include <thread>
using namespace std;

void f() {
	cout<<"hello"<<endl; 
}

int main() {
	thread t1(f); 
	// thread t3 {t1}; // <=== <would cause error: use of deleted function 'std::thread::thread(std::thread&)'
	thread t2 {std::move(t1)}; 
	t2.join();  // t2 is the running the thread now - t1 only an empty shell 
	return 0;
}