id summary reporter owner description type status milestone component version severity resolution keywords cc 1278 declaration of 'str' shadows a member of 'this' James Boyden Samuel Krempp "When using `boost::format` and compiling with G++ with the `-Wshadow` option enabled, the following warning is generated: {{{ /usr/include/boost/format/format_implementation.hpp:28: warning: declaration of 'str' shadows a member of 'this' }}} The relevant lines of code are: {{{ template< class Ch, class Tr, class Alloc> basic_format:: basic_format(const Ch* str) : style_(0), cur_arg_(0), num_args_(0), dumped_(false), exceptions_(io::all_error_bits) { if( str) parse( str ); } #if !defined(BOOST_NO_STD_LOCALE) template< class Ch, class Tr, class Alloc> basic_format:: basic_format(const Ch* str, const std::locale & loc) : style_(0), cur_arg_(0), num_args_(0), dumped_(false), loc_(loc), exceptions_(io::all_error_bits) { if(str) parse( str ); } }}} This problem would be easily fixed by changing the local variable `str` to `s` -- as is already the case in the next function: {{{ template< class Ch, class Tr, class Alloc> basic_format:: basic_format(const string_type& s, const std::locale & loc) : style_(0), cur_arg_(0), num_args_(0), dumped_(false), loc_(loc), exceptions_(io::all_error_bits) { parse(s); } }}}" Bugs closed Boost 1.35.0 format Boost 1.34.1 Problem fixed esigra@…