运行以下非常简单的代码
#include <thread>
#include <iostream>
using namespace std;
void test() {cout << "hello" << endl;}
int main(){
thread t(test);
t.join();
}
用
编译g ++ -std = c ++ 14 -pthread multi.cc
在macOS10.12.6上使用clang 900.0.38,程序显示
libc ++ abi.dylib:终止中止陷阱:6
有谁知道可能导致此行为的原因?