Boost C++ Libraries: Ticket #7567: Shadow warnings in timer.hpp https://svn.boost.org/trac10/ticket/7567 <p> This code </p> <pre class="wiki">#include &lt;boost/timer/timer.hpp&gt; int main(int, char *[]) { return 0; } </pre><p> compiled with </p> <pre class="wiki">gcc -I/path/to/boost -c -Wshadow test.cxx </pre><p> produces several warnings about shadowed class members: </p> <pre class="wiki">/opt/local/include/boost/timer/timer.hpp: In member function 'std::string boost::timer::cpu_timer::format(short int, const std::string&amp;) 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&amp;, short int, const std::string&amp;)': /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&amp;, const std::string&amp;)': /opt/local/include/boost/timer/timer.hpp:107: warning: declaration of 'format' shadows a member of 'this' </pre><p> This was compile on Mac Snow Leopard, gcc 4.2.1 with the boost distribution from <a class="missing wiki">MacPorts</a> (although I doubt any of that matters). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7567 Trac 1.4.3