Windows下使用C++默认库函数thread遇到的一个bug记录

点击查看代码
#include <thread>
#include <iostream>

void foo()
{
	std::cout << "good!" << std::endl;
}

int main(int argc, const char **argv)
{

	std::thread task = std::thread(foo);
	task.join();


    return 0;
}
这段代码在Debug,Win32配置下无法运行,而在x86和x64配置下均可正常运行,原因未知。
posted @ 2022-04-15 11:10  JCupupup  阅读(54)  评论(0)    收藏  举报