#include <thread>
#include <iostream>
int main() {
std::jthread {[] {std::cout << "Hi" << std::endl;}};
}
CMAKEPRINTS
-- The C compiler identification is AppleClang 13.0.0.13000027
-- The CXX compiler identification is AppleClang 13.0.0.13000027
迈克打印错误:
eRror:在命名空间'std'中没有名为“ jthread”成员 std :: jthread {[] {std :: cout
添加
-stdlib=libc++ -fexperimental-library
<< "Hi" << std::endl;}};