|
Boost Users : |
Subject: Re: [Boost-users] date_time, g++-4.7.0, compile error
From: Artyom Beilis (artyomtnk_at_[hidden])
Date: 2012-04-29 04:32:57
> From: List User <listuser_at_[hidden]>
>To: "boost-users_at_[hidden]" <boost-users_at_[hidden]>
>Sent: Sunday, April 29, 2012 11:17 AM
>Subject: [Boost-users] date_time, g++-4.7.0, compile error
>
>
>The following code gives compile error with g++-4.7.0 but compiles fine with 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;
>}
>The following is the error message that is repeatedly seen (compiler outputs a lot of messages)
>
>
>/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> >&)
>
>
>I am using Ubuntu 12.04 and libboost-date-time1.46.1.
>
I assume you compile with -std=c++0x or -std=c++11 flag.
This is a bug that was fixed in 1.48
Artyom Beilis
--------------
CppCMS - C++ Web Framework: http://cppcms.com/
CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
>________________________________
>
>Any suggestions?
>
>
>thanks
>
>
>suresh
>_______________________________________________
>Boost-users mailing list
>Boost-users_at_[hidden]
>http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net