|
Boost : |
From: Jeff Garland (jeff_at_[hidden])
Date: 2003-08-13 06:38:34
On Tue, 12 Aug 2003 22:15:28 -0700, Stephan T. Lavavej wrote
> [Dave Abrahams]
> > If I don't hear of any new problems with the RC_1_30_0 branch I'm
> > going to release 1.30.2 tomorrow (Wed) evening or Thursday morning.
>
> There's one little problem... it doesn't compile cleanly under
> -Wshadow with gcc. This is annoying because it forces the user to:
>
> 1. Hack the headers to eliminate the warning (ugh, even if it's
> trivial)
>
> If the headers are unhackable (e.g. someone else is root), then:
>
> 2. Mentally ignore the warning (ugh)
> 3. Stop using the warning (ugh)
>
> The offending part is line 24 of boost/date_time/date_duration.hpp.
> Which is:
>
> explicit date_duration(duration_rep days) : days_(days) {};
>
> This causes problems because the very next line defines a function
> identically named to that duration_rep argument:
>
> duration_rep days() const
>
> gcc complains:
>
> warning: declaration of `days' shadows a member of `this'
>
> The fix is trivial: change the occurrences of "days" in line 24 to "d".
> days_ of course should not be modified.
>
> There are presumably other -Wshadow problems elsewhere in Boost, but
> this is the only one that has affected my code so far.
Steven -
A warning under 1 option of one compiler that has been there all along
isn't enough to stop 1.30.2. I'm not going to check in that change because
I've been making plenty other of changes and I don't want to do anything that
might destabalize 1.30.2. Besides, I would not want to impose any additional
delay for Dave and others by forcing another round of regression testing
before the release.
If you have to have this fixed, you should use the latest CVS where I have
checked in the change (may be 24 hours propagation delay for anonymous
download). This will also allow you to pick up the new from_time_t function
and the new total_seconds functions we dicussed last week. If you're not
comfortable with that then fix it yourself for now and wait for 1.31 for the
final fix.
Jeff
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk