Subject: [Boost-bugs] [Boost C++ Libraries] #7567: Shadow warnings in timer.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-24 20:48:50
#7567: Shadow warnings in timer.hpp
--------------------------------------------------+-------------------------
Reporter: Kenneth Moreland <kmorel@â¦> | Owner: bemandawes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: timer
Version: Boost 1.51.0 | Severity: Cosmetic
Keywords: |
--------------------------------------------------+-------------------------
This code
{{{
#include <boost/timer/timer.hpp>
int main(int, char *[]) { return 0; }
}}}
compiled with
{{{
gcc -I/path/to/boost -c -Wshadow test.cxx
}}}
produces several warnings about shadowed class members:
{{{
/opt/local/include/boost/timer/timer.hpp: In member function 'std::string
boost::timer::cpu_timer::format(short int, const std::string&) const':
/opt/local/include/boost/timer/timer.hpp:74: warning: declaration of
'format' shadows a member of 'this'
/opt/local/include/boost/timer/timer.hpp: In constructor
'boost::timer::auto_cpu_timer::auto_cpu_timer(std::ostream&, short int,
const std::string&)':
/opt/local/include/boost/timer/timer.hpp:103: warning: declaration of
'format' shadows a member of 'this'
/opt/local/include/boost/timer/timer.hpp:103: warning: declaration of
'places' shadows a member of 'this'
/opt/local/include/boost/timer/timer.hpp: In constructor
'boost::timer::auto_cpu_timer::auto_cpu_timer(std::ostream&, const
std::string&)':
/opt/local/include/boost/timer/timer.hpp:107: warning: declaration of
'format' shadows a member of 'this'
}}}
This was compile on Mac Snow Leopard, gcc 4.2.1 with the boost
distribution from MacPorts (although I doubt any of that matters).
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7567> 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:11 UTC