Description of problem: boost::serialization library generates warnings when all warnings, include -Wshadow, switched on in g++: 1. /usr/include/boost/serialization/nvp.hpp:45: warning: declaration of ‘name’ shadows a member of 'this' /usr/include/boost/serialization/nvp.hpp: In constructor ‘boost::serialization::nvp<T>::nvp(const char*, T&) [with T = unsigned int]’: /usr/include/boost/serialization/nvp.hpp:96: instantiated from ‘const boost::serialization::nvp<T> boost::serialization::make_nvp(const char*, T&) [with T = unsigned int]’ 2. /usr/include/boost/archive/detail/iserializer.hpp:126: warning: unused parameter ‘flags’ /usr/include/boost/archive/detail/oserializer.hpp: In instantiation of ‘bool boost::archive::detail::oserializer<Archive, T>::tracking(unsigned int) const [with Archive = boost::archive::binary_oarchive, T = MyClass]’: 3. /usr/include/boost/archive/detail/oserializer.hpp:118: warning: unused parameter ‘flags’ /usr/include/boost/archive/detail/oserializer.hpp: In instantiation of ‘bool boost::archive::detail::oserializer<Archive, T>::tracking(unsigned int) const [with Archive = boost::archive::binary_oarchive, T = std::pair<unsigned int, unsigned int>]’: Additional info: With the below fixes my code compiled: 1. Add "_" after the name parameter in nvp.hpp at lines 45 and 46, e.g. so it looks like: explicit nvp(const char * name_, T & t) : // note: redundant cast works around borland issue std::pair<const char *, T *>(name_, (T*)(& t)) {} 2. Comment out "flags" in line 126 of iserializer.hpp, e.g. so it looks like: virtual bool tracking(const unsigned int /*flags*/) const { 3. Comment out "flags" in line 118 of oserializer.hpp, e.g. so it looks like: virtual bool tracking(const unsigned int /*flags*/) const {
Same with this one Darren: simple test case would be great.