#include <iostream>
#include <thread>
int main()
{
std::thread th([] { std::cout << "Hello, World\n"; });
th.join();
}
这就是我所拥有的,它会导致运行时错误。这是为什么?我正在使用 GCC 4.8 (Ideone)。
#include <iostream>
#include <thread>
int main()
{
std::thread th([] { std::cout << "Hello, World\n"; });
th.join();
}
这就是我所拥有的,它会导致运行时错误。这是为什么?我正在使用 GCC 4.8 (Ideone)。