会看到一大堆错误:
/usr/include/boost/thread/pthread/thread_data.hpp: In constructor ‘boost::detail::tss_data_node::tss_data_node(boost::shared_ptr, void*)’:
/usr/include/boost/thread/pthread/thread_data.hpp:36:41: error: use of deleted function ‘boost::shared_ptr::shared_ptr(const boost::shared_ptr&)’
func(func_),value(value_)
升级g++ 升级boost
$ sudo add-apt-repository ppa:boost-latest/ppa
$ sudo apt-get update
$ aptitude search boost
$ sudo apt-get install libboost1.54-dev
因为C++11特性的原因,所以都要更新。
参考:http://choorucode.com/2013/12/27/use-of-deleted-function-error-with-boost/