2

//test.cpp

#include<iostream>
#include<thread>
using namespace std;
void call()
{
    cout<<"hello world"<<endl;
}
int main()
{
    thread t(call);
    t.join();
    return 0;
}

g++-4.7 -std=c++11 test.cpp -o test -pthread

上面编译得很好,但是当我运行 ./test. 我只是收到一条错误消息,上面写着“调用纯虚拟方法,在没有活动异常的情况下终止调用”

谁能帮我?谢谢!

4

1 回答 1

4

It is a known bug. see http://llvm.org/bugs/show_bug.cgi?id=12730.

Nobody tried to fix it, sadly.

于 2012-12-19T10:27:57.217 回答