使用了c++11的thread库,运行出现了:
terminate called after throwing an instance of 'std::system_error'
what(): Enable multithreading to use std::thread: Operation not permitted
Aborted
解决:g++ -std=c++11 -pthread -Wl,--no-as-needed thread_test.cpp