Boost logo

Boost Users :

Subject: Re: [Boost-users] date_time examples problem
From: Dmitry V. Krivenok (krivenok_at_[hidden])
Date: 2009-01-16 02:35:39


Andrew Maclean wrote:
> In building the examples for boost date_time I have come across the
> following issue:
>
> example/tutorial/io_tutorial.cpp:2:
> /usr/local/include/boost-1_37/boost/date_time/tz_db_base.hpp:161:
> error: declaration of 'typedef class
> boost::date_time::dst_adjustment_offsets<typename
> time_zone_type::time_duration_type>
> boost::date_time::tz_db_base<time_zone_type,
> rule_type>::dst_adjustment_offsets'
> /usr/local/include/boost-1_37/boost/date_time/time_zone_base.hpp:76:
> error: changes meaning of 'dst_adjustment_offsets' from 'class
> boost::date_time::dst_adjustment_offsets<typename
> time_zone_type::time_duration_type>'
>
> This also occurs for anywhere
> #include <boost/date_time/local_time/local_time.hpp>
> occurs. E.g. in /example/local_time
>
> I am using boost-1_37 and gcc 4.3.
>
> Is there a fix for this?
>
This bug is already fixed:

krivenok_at_develop2 10:36:35 ~/dev_builds/boost-trunk/boost/date_time $
svn -r 49505 log
------------------------------------------------------------------------
r49505 | andysem | 2008-11-01 13:34:04 +0300 (Sat, 01 Nov 2008) | 7 lines

Fixed various issues, including missing includes, missing IO operators
for local time, windows.h inclusion on Windows, compilation failure on
GCC 4.3, a number of warnings on GCC and MSVC. Added a new format
specifier %O to format and read more than 99 hours in time durations.
All exception throwing moved to boost::throw_exception in order to
support builds with exceptions disabled.

------------------------------------------------------------------------
krivenok_at_develop2 10:39:23 ~/dev_builds/boost-trunk/boost/date_time $

To fix it with boost-1.37 edit the file boost/date_time/tz_db_base.hpp
as follows:

- typedef dst_adjustment_offsets<time_duration_type>
dst_adjustment_offsets;
+ typedef
boost::date_time::dst_adjustment_offsets<time_duration_type>
dst_adjustment_offsets;

>
> Andrew
>
>

-- 
Sincerely yours, Dmitry V. Krivenok
Orange System Company
Saint-Petersburg, Russia
work phone: +7 812 332-32-40
cellular phone: +7 921 576-70-91
e-mail: krivenok_at_[hidden]
web: http://www.orangesystem.ru
skype: krivenok_dmitry
jabber: krivenok_dmitry_at_[hidden]
icq: 242-526-443

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