sur*_*esh 6 c++ ubuntu compiler-errors g++ boost-date-time
下面的代码给出了g ++ - 4.7.0的编译错误,但是用g ++ - 4.6编译得很好.
#include <iostream>
#include <boost/date_time/local_time/local_time.hpp>
using namespace std;
int main(){
boost::posix_time::ptime time_t_epoch(boost::gregorian::date(1970,1,1));
cout << time_t_epoch << endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
以下是重复出现的错误消息(编译器输出大量消息)
/usr/include/boost/date_time/local_time/local_date_time.hpp:433:84: error: use of deleted function boost::shared_ptr<boost::date_time::time_zone_base<boost::posix_time::ptime, char> >::shared_ptr(const boost::shared_ptr<boost::date_time::time_zone_base<boost::posix_time::ptime, char> >&)
Run Code Online (Sandbox Code Playgroud)
我使用的是Ubuntu 12.04和libboost-date-time1.46.1.
有什么建议?
| 归档时间: |
|
| 查看次数: |
1556 次 |
| 最近记录: |