#include <iostream>
#include <thread>
using namespace std;
class C
{
public:
C() {
cout << "C()" << endl;
}
C(const C& c)
{
cout << "C(const C&)" << endl;
}
C(C&& c)
{
cout << "C(const C&&)" << endl;
}
~C() {
cout << "~C()" << endl;
}
};
// スレッドで実行される
void threadfunc(C c)
{
cout << __FUNCTION__ << endl;
}
int main()
{
// スレッドを作成して実行
thread th(threadfunc, C());
// スレッド終了を待機
th.join();
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dGhyZWFkPgoKdXNpbmcgbmFtZXNwYWNlICBzdGQ7CgpjbGFzcyBDCnsKcHVibGljOgogICAgQygpIHsKICAgICAgICBjb3V0IDw8ICJDKCkiIDw8IGVuZGw7CiAgICB9CiAgICBDKGNvbnN0IEMmIGMpCiAgICB7CiAgICAgICAgY291dCA8PCAiQyhjb25zdCBDJikiIDw8IGVuZGw7CiAgICB9CiAgICBDKEMmJiBjKQogICAgewogICAgICAgIGNvdXQgPDwgIkMoY29uc3QgQyYmKSIgPDwgZW5kbDsKICAgIH0KICAgIH5DKCkgewogICAgICAgIGNvdXQgPDwgIn5DKCkiIDw8IGVuZGw7CiAgICB9Cn07CgovLyDjgrnjg6zjg4Pjg4njgaflrp/ooYzjgZXjgozjgosKdm9pZCB0aHJlYWRmdW5jKEMgYykKewogICAgY291dCA8PCBfX0ZVTkNUSU9OX18gPDwgZW5kbDsKfQoKaW50IG1haW4oKQp7CiAgICAvLyDjgrnjg6zjg4Pjg4njgpLkvZzmiJDjgZfjgablrp/ooYwKICAgIHRocmVhZCB0aCh0aHJlYWRmdW5jLCBDKCkpOwoKICAgIC8vIOOCueODrOODg+ODiee1guS6huOCkuW+heapnwogICAgdGguam9pbigpOwp9Cg==