Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4856: compilation error: boost::local_time::local_microsec_clock::local_time()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-06-03 09:32:27
#4856: compilation error: boost::local_time::local_microsec_clock::local_time()
---------------------------------+------------------------------------------
Reporter: dobrov0@⦠| Owner: az_sw_dude
Type: Bugs | Status: new
Milestone: To Be Determined | Component: date_time
Version: Boost 1.42.0 | Severity: Problem
Resolution: | Keywords: local_time
---------------------------------+------------------------------------------
Comment (by Manish Mulimani <manish.mulimani@â¦>):
It works with posix time:
#include <boost/date_time/posix_time/ptime.hpp>
#include <boost/date_time/microsec_time_clock.hpp>
#include <boost/date_time/local_time/local_time.hpp>
int main(int argc, char *argv[])
{
std::cout <<
boost::date_time::microsec_clock<boost::posix_time::ptime>::local_time()
<< std::endl;
return 0;
}
However as reported in bug, it does not work with local time. There is no
overloaded constructor of boost::local_time::local_date_time_base, with
following prototype: local_date_time_base(date_type,time_duration_type).
There are 3 parameterized constructors defined:
i> local_date_time_base(utc_time_type, boost::shared_ptr<tz_type>)
ii> local_date_time_base(date_type, time_duration_type,
boost::shared_ptr<tz_type>, bool)
iii> local_date_time_base(date_type, time_duration_type,
boost::shared_ptr<tz_type>, DST_CALC_OPTIONS)
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4856#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC