Hello,
I am trying Boost 1.33 ptr_container with GCC 4.0.1 on Linux.
When including a ptr_container header (say, ptr_vector.hpp),
compiling code with the "-Wshadow" flag, some warnings are
issued about shadowed members. I am wondering if this might be a
problem, even if my snippet code compiles and seems to run fine
so far for me.
output example (with boost/ in current directory) :
$ cat main.cpp
#include
int main() {}
$ g++ -I. -Wshadow main.cpp
./boost/ptr_container/detail/move.hpp: In constructor
'boost::ptr_container_detail::move_ptrs::move_source<Ptr>::move_source(Ptr&)':
./boost/ptr_container/detail/move.hpp:18: warning: declaration of 'ptr'
shadows a member of 'this'
./boost/ptr_container/detail/static_move_ptr.hpp: In member function
'void boost::ptr_container_detail::static_move_ptr::check(const
+boost::ptr_container_detail::static_move_ptr&)':
./boost/ptr_container/detail/static_move_ptr.hpp:156: warning:
declaration of 'ptr' shadows a member of 'this'
./boost/ptr_container/exception.hpp: In constructor
'boost::bad_ptr_container_operation::bad_ptr_container_operation(const
char*)':
./boost/ptr_container/exception.hpp:27: warning: declaration of 'what'
shadows a member of 'this'
./boost/ptr_container/exception.hpp: In constructor
'boost::bad_index::bad_index(const char*)':
./boost/ptr_container/exception.hpp:41: warning: declaration of 'what'
shadows a member of 'this'
./boost/ptr_container/detail/reversible_ptr_container.hpp: In member
function 'ForwardIterator
+boost::ptr_container_detail::reversible_ptr_container::advance(ForwardIterator, typename
Config::void_container_type::size_type)':
./boost/ptr_container/detail/reversible_ptr_container.hpp:287: warning:
declaration of 'begin' shadows a member of 'this'
--
Samuel Landau