|
Boost : |
From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2003-09-21 18:27:26
Hi,
Boost CVS from Sept. 20, 2003 does not compile cleanly under gcc's -Wshadow.
This is because of five occurrences of constructor parameters being named
identically to methods in the same class. The fixes are trivial: rename the
constructor parameters. This does not affect the classes' behavior.
Specifically:
(1) In boost/date_time/date_duration.hpp, line 29:
explicit date_duration(duration_rep days) : days_(days) {};
should be changed to:
explicit date_duration(duration_rep d) : days_(d) {};
(or something similar; my choice of alternate name may not be optimal).
The original line conflicts with line 49:
duration_rep_type days() const
(2) In boost/date_time/date_generators.hpp, lines 179-180:
first_kday_of_month(day_of_week_type dow, month_type month) :
month_(month),
should be changed to:
first_kday_of_month(day_of_week_type dow, month_type m) :
month_(m),
The original lines conflict with line 194:
month_type month() const
(3) Also in boost/date_time/date_generators.hpp, lines 228-229:
last_kday_of_month(day_of_week_type dow, month_type month) :
month_(month),
should be changed to:
last_kday_of_month(day_of_week_type dow, month_type m) :
month_(m),
The original lines conflict with line 243:
month_type month() const
(4) In boost/token_iterator.hpp, lines 94-98:
token_iterator(TokenizerFunc f, Iterator begin, Iterator end =
Iterator())
: f_(f),begin_(begin),end_(end),valid_(false),tok_(){
initialize(); }
token_iterator(Iterator begin, Iterator end = Iterator())
: f_(),begin_(begin),end_(end),valid_(false),tok_()
{initialize();}
should be changed to:
token_iterator(TokenizerFunc f, Iterator begin, Iterator e =
Iterator())
: f_(f),begin_(begin),end_(e),valid_(false),tok_(){ initialize();
}
token_iterator(Iterator begin, Iterator e = Iterator())
: f_(),begin_(begin),end_(e),valid_(false),tok_()
{initialize();}
The original lines conflict with line 109:
Iterator end()const{return end_;};
Other than this, the rest of Boost that I've used so far compiles cleanly
under all of my warning switches.
Stephan T. Lavavej
http://stl.caltech.edu
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk