Boost logo

Boost :

Subject: Re: [boost] [date_time, Boost 1.40.0]
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2009-09-01 14:50:52


Christoph wrote:
> including
> boost/date_time/posix_time/posix_time.hpp
> or boost/date_time/gregorian/gregorian.hpp
>
> gives lots of warning for the following line(s):
> (boost/date_time/gregorian/conversion.hpp; posix_time, tooo)
> line 44
> std::tm datetm = {}; // zero initialization is needed for extension
> members, like tm_zone

What warnings?

> I admit I don't understand the comment.

std::tm has nonstandard members on some platforms, some of them are
pointers. If these members are not zero initialized functions like
strftime simply crash.

> Is it possible to fix that (correctly) such that including the header does
> not produce like 20 warnings in each .cpp file including the header?
> (I am using linux running gcc 4.1.2)

I don't see what's inappropriate in these lines, hence I don't see what
to fix.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk