次のコードは、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;
}
以下は、繰り返し見られるエラーメッセージです (コンパイラは多くのメッセージを出力します)。
/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> >&)
Ubuntu 12.04 と libboost-date-time1.46.1 を使用しています。
助言がありますか?